Friday, August 15, 2008

AME and the new Responsibilities-Roles Setup

You go to system Administrator responsibility and assign to yourself or to someone else a desired responsibility, so you think, the job was done; but surprise even the user is able to select such responsibility, it does not work ... why? this is because Oracle change the way some responsibilities can be assigned, probably it is going to be the future for all of them.

So here are the steps to assign the AME responsibilities to any user.

by the way, What is AME?
From http://www.oracle.com/: AME is a self-service web application, which lets users define business rules governing who should approve transactions that originate in other Oracle applications.
I think it stands for Approval Management Engine.

The new approach Oracle is using to assign those resp. are call Role Based Access Control o RBAC.

Be aware this could not work in you own environment, it depends on your patch level, it should be AME.B.


- Approvals Management Business Analyst 
and
- Approvals Management Administrator 
are the responsibilities to be assigned to the user.

Be sure profile AME:Installed is set to YES.

1. Log on into EBS and use resp. "User Management "
2. Click in Users function.
3. Look for the user name
4. Click on the update link or icon
5. Click on the assign roles button
6. In the LOv look for Approval%
7. Five roles should be displayed
8. Select all of them if this is the case, if not, just select what you need.
9. Now enter a justification and date for each row.
-------------------------
10. switch to responsibility Functional Administrator
11. Click on Create Grant button
12. Type a Grant Name a enter a date
13. Select grant type as 'Specific User' in the Security Context region.
14. select the user name in the Grantee field .
15. now select AME Transaction Types in the object field.
---------------------------
16. click Next.
17. select all rows in Data Context type
---------------------------
18. click Next.
19. Select AME Calling Applications in the SET field.
---------------------------
20. click Next, and review it.
21. click summit.


Reference:
- Oracle Approvals Management Implementation Guide Release 11i.
- AME.B 11i/R12 TOI Doc.


If you can see any function in User management Responsibility, it is because you need the role 'Security Administrator' , so better use SYSADMIN.

Tuesday, June 10, 2008

There is an error in external function HR FastFormula

well, how Fastformula works?


1. Logon using US Super User HRSM Manager.

2. Go to Other Definitions > Formula Function.

And look for the function with the problem.


Definition is the actual Database Package name and the function.

3. Describe the code:
FUNCTION get_plan_year
( -- Input values --
p_date_earned IN DATE
)
RETURN DATE
IS
--
l_out_date DATE;
--
BEGIN
select start_date
i nto l_out_date
from BEN_YR_PERD
where p_date_earned between start_date and end_date;
RETURN l_out_date;
END get_plan_year;
-----------------------------------------------------------
END amri_ff_ben;


4. To see the register parameters for that function click in the button Context Usages:


also using next query we can see the parameter in the back end:
SELECT context_id
,context_name
,data_type
,fl.meaning
FROM ff_contexts, hr_lookups fl
WHERE fl.lookup_code = data_type
AND fl.lookup_type = 'DATA_TYPE'
and context_name = 'DATE_EARNED'


Parameters button do not have anything define in this case, because there are not any user defined parameter.


5. Find the Fast Formula definition.


Total Compensation > Basic > Write Formulas > query up formula you need.






6. Press Edit button. (sample script)

/************************************************************************

FORMULA NAME: AGE_AS_OF_PLAN_YEAR

FORMULA TYPE : Age Determination Date

DESCRIPTION : The Age determination date is 01-MAR-YYYY.

*************************************************************************

Change History:Name Date Description

----------------------------------------------------------------------------------------

Initial Version

**************************************************************************

FORMULA TEXT: Logic in simple terms.*

***************************************************************************/

/*=========== DATABASE ITEM DEFAULTS BEGIN =========*/

/*=========== DATABASE ITEM DEFAULTS ENDS==========*/

/*============ INPUT VALUES DEFAULT BEGIN ===========*/

/*============== INPUT VALUES DEFAUT ENDS ==========*/

/*================= INPUTS SECTION BEGIN =============*/

/*================== INPUTS SECTION ENDS ============*/

/*================ FORMULA SECTION BEGIN ============*/

DEFAULT FOR l_plan_date is '01-JAN-1951'(date)
l_plan_date = GET_PLAN_YEAR() /*this is the call to the external function*/
return l_plan_date

/*================ FORMULA SECTION END ==============*/



7. if you change the PLSQL, then you have to compile the formula.

to find the invalid plsql use following query:


sELECT object_type, object_name, status, last_ddl_time
FROM all_objects
WHERE owner = 'APPS'
and status != 'VALID'
AND object_type LIKE 'PACKA%%'
AND object_name LIKE 'FFP_%'
--OR object_name LIKE 'FFW_%'

but do not compile using sql*plus instea use the program:

$FF_TOP/bin/FFXBCP apps/apps 0 Y %% %%

or

$FF_TOP/bin/FFXBCP apps/apps 0 Y %% %formula_group%

or

Processes and Reports -> Submit Processes and Reports and Select Bulk Compile of Formulas

good luck.