Monday, October 8, 2012

How to rectify error "More than one user has been assigned the Marketing Default Approver role"

 This error is the standard system functionality, only one resource should be assigned to Marketing Default Approver Role

 Use the following SQL query to check the setup
 
 SELECT a.role_resource_id ,
   a.role_name,
   b.resource_name ,
   a.ROLE_TYPE_CODE,
   a.role_id
 FROM jtf_rs_defresroles_vl a,
   ams_jtf_rs_emp_v b
 WHERE a.role_type_code  IN ('MKTGAPPR','AMSAPPR')
 AND a.role_resource_type = 'RS_INDIVIDUAL'
 AND a.delete_flag        = 'N'
 AND TRUNC(SYSDATE) BETWEEN TRUNC(a.res_rl_start_date) AND
 TRUNC(NVL(a.res_rl_end_date,SYSDATE))
 AND a.role_resource_id = b.resource_id;

 Remove the duplicate and assign only one user to the Role Marketing Default Approver and try the flow again.

Query to find the application id of a product in Oracle Applications

SELECT application_id,
  application_name
FROM fnd_application_tl
WHERE application_name ='Trade Management';

FND_GLOBAL.APPS_INITIALIZE - Setting up Applications context for Oracle Applications

Use the Procedure FND_GLOBAL.APPS_INITIALIZE to set the applications context in standalone sessions that were not initialized through normal means. Typically, you would use this API in external custom programs that are establishing their own connections

procedure APPS_INITIALIZE(
        user_id         IN number
       ,resp_id         IN number
       ,resp_appl_id         IN number
       ,security_group_id     IN number);

USER_ID - The User ID number.

RESP_ID - The ID number of the responsibility.

RESP_APPL_ID - The ID number of the application to which the responsibility belongs.

SECURITY_GROUP_ID - The ID number of the security group. This argument is automatically defaulted by the API. The caller should not pass a value for it.

Example

fnd_global.APPS_INITIALIZE (1002795,22371,682);


You can also use sql like the following to get the values from sqlplus (as apps):

SELECT application_id,
  Responsibility_id,
  responsibility_name
FROM fnd_responsibility_vl
WHERE responsibility_name LIKE 'Oracle%Trade%';

- change 'Oracle%Trade%' to identify your responsibility.

select user_id, user_name
from fnd_user
where user_name='TRADEMGR'

Request only offer created in Trade Management is not getting applied in Order Management


Please note that when you choose "Request only " in offer you have to choose it manually in sales order. Please follow the following step

  1) Enter Order line
  2) Click on Action Button
  3) Choose "Promotion and Payments"
  4)  Query for the offer created manually., choose the same
  5) Click on Apply
  6) Go ahead once again to View Adjustment and find that the offer is applied.

How to create, enable or disable a descriptive flex fields (DFF)?

1. Go to Responsibility: Application Developer > Flex field > Descriptive > Segment > F11 to search.
2. Choose Application > Marketing, Choose Title >Budget
3. Find the Global Data Element populated
4. Now Uncheck the field "Freeze Flexfield Definition"
5. Click on Segments button
6. Find the value of the Segments created
7. Now uncheck the Displayed and Enabled buttons
8. Come back to the original screen and Check the "Freeze Flexfield Definition"
9. CC job gets fired wait for it to complete.(Compile)
10.Bounce the Middle tier and re launch the application.

Query to get the Profile option values at all levels


Execute the following query with valid value for any of the following columns.
profile_option_id
profile_option_name
user_profile_option_name


SELECT *
FROM
  (SELECT po.profile_option_name "NAME",
    po.user_profile_option_name "FRIENDLYNAME",
    po.description "DESCRIPTION",
    DECODE(TO_CHAR(pov.level_id), '10001', 'SITE', '10002', 'APPLICATION', '10003', 'RESPONSIBILITY', '10004', 'USER', '???') "LEV",
    DECODE(TO_CHAR(pov.level_id), '10001', '', '10002', app.application_id, '10003', rsp.responsibility_id, '10004', usr.user_id, '???') "CONTEXTID",
    DECODE(TO_CHAR(pov.level_id), '10001', '', '10002', app.application_name, '10003', rsp.responsibility_name, '10004', usr.user_name, '???') "CONTEXT",
    DECODE(TO_CHAR(pov.level_id), '10001', '', '10002', '', '10003', rsp.application_id, '10004', to_number(NULL), '???') "RESPAPPID",
    pov.profile_option_value "VALUE",
    fpc.description category_name,
    po.sql_validation
  FROM fnd_profile_options_vl po,
    fnd_profile_option_values pov,
    fnd_user usr,
    fnd_application_tl app,
    fnd_responsibility_tl rsp,
    fnd_profile_cats_tl fpc,
    fnd_profile_cat_options fpco
  WHERE pov.application_id                   = po.application_id
  AND pov.profile_option_id                  = po.profile_option_id
  AND usr.user_id (+)                        = pov.level_value
  AND rsp.application_id (+)                 = pov.level_value_application_id
  AND rsp.responsibility_id (+)              = pov.level_value
  AND app.application_id (+)                 = pov.level_value
  AND fpco.category_name                     = fpc.name (+)
  AND fpco.profile_option_id (+)             = po.profile_option_id
  AND fpco.profile_option_application_id (+) = po.application_id
    --AND po.profile_option_id = <>
    --AND po.profile_option_name = '<>'
  AND po.user_profile_option_name = <>
    --It is language dependent and gets stored in table  FND_PROFILE_OPTIONS_TL
  AND app.LANGUAGE (+) = USERENV('LANG')
  AND rsp.LANGUAGE (+) = USERENV('LANG')
  ) QRSLT
ORDER BY FRIENDLYNAME ASC

Wednesday, October 3, 2012

Attribute Attribute is invalid. Please re-enter - Pricing Error

Set the profile Option QP: Pricing Transaction Entity to Order Fulfillment

This will solve the issue