Professional Documents
Culture Documents
AME Setup: Assign AME Roles and Responsibilities
AME Setup: Assign AME Roles and Responsibilities
1
Assign AME Roles and Responsibilities
1. Navigate to User Management Responsibility->Users and search for the user to whom you wish to grant AME
roles. (Can navigate from any user which has Security Administrator Role or from SYSADMIN user).
2. Click on Update icon across the user name and in the update user page, click on Assign Role button.
3. Search for “Approval%” and select the Roles: Approvals Management Administrator & Approvals Management
Business Analyst.
4. Specify justification and relevant dates for the newly assigned roles, and click Apply to assign the roles to the user.
Name
You can also set Grantee Type as Specific User and set the your user name as Grantee
3. Click Next button and select the Object Data Context as All Rows.
4. Click Next to define the object parameters and Select Set as AME Calling Applications
5. Click Next, review the setups and then Finish the process
type.
2. Select the application and enter Transaction Type key & Transaction Type Name.Then Click Next button.
3. In the drop down,select Line Item and click on Go button.Another row for Line Item will be created.
Change the order number to 2 and then enter the SQL query in Query window.Click on Validate button and click on
Apply button.
4. Click Next button and enter the details as in below screenshot.(Click Validate button after entering each query).
5. Click Next and then Finish button.
AME Setup
2. Use the Transaction Type LOV to search and select the transaction type.We are using the newly created transaction
Seeded Transaction types available for Purchase Requisitions are Purchase Requisition Approval, Internal
Attributes:
3. Select usage type as Dynamic. Enter the query,validate and click finish.
4. Similarly add ITEM_CATEGORY attribute also.
5 Also add below mentioned Attributes as its required for selecting some basic Action types
Condition:
1. Click on Conditions icon under setup tab.By default there are some conditions available.Still we can create new
2. Select the Attribute,enter the String value/Requisition Total and then click Apply button.
3. You can see the newly created condition along with existing conditions
Action Types:
1. Click on Action Types icon under setup tab and then click on “Use Existing Action Type” button.
Approver Groups:
1. Click on Approver Groups icon under setup tab and then click on Create button.
2. Enter the Group Name,Description,Order Number and select the Voting method.Also add the approvers and click
apply button.
2. Enter the Rule Name,select the Rule Type and click on Next button.
3. Add the Conditions using the Add Conditions button and click next button.
4. Click on Add Actions button to add actions,click next and then Finish.
AME_CATEGORY
Requisition with total amount 900 USD (Less than 10000 USD)
Requisition with total amount 13500 USD(Greater than 10000 USD and less than 1000000 USD)
Requisition with total amount 1000 USD and using category “204.53”
AME Setup
Setup 2 : Enter Application and Profile details and Press Find Button.
Step 3 : Change the AME Installed Value to YES as shown below
Step 6 : Navigate to Approval Tab and Enable ‘Use Invoice Approval Workflow ‘ as shown below
In the Query I have written the function which will return the Accounting Manager in the Test instance.
And select Action type as Pre Chain of Authority Approvals as shown below
You will get the Action value as ‘Require pre-approval from OSD Account Manager Approval’
Step 11 : Create a Rule by following below Steps ,
a) Enter the Name of the Rule Example : osd Approval Management Approval,Rule type : Combination
: List Creation, Item Class : Header as shownbelow
b) Select the Action Type as ‘Pre Chain of Authority Approvals’ and Action as ‘pre-approval from OSD
Account Manager Approval’ .
Step 4 : Finish
Parameters :
You will get the Account Manager details for the Invoice and the notification will be sent to the
Approver.
RETURN VARCHAR
IS
l_person_id NUMBER := 0 ;
l_count NUMBER := 0;
V_OPERATING_UNIT VARCHAR2(2000):=NULL;
V_ORG_ID NUMBER := 0;
BEGIN
BEGIN
SELECT COUNT(*)
INTO l_count
FROM ap_invoices_all ail,
ap_suppliers aps
-- po_lookup_codes plc
EXCEPTION
END;
BEGIN
SELECT org_id
INTO V_ORG_ID
FROM ap_invoices_ALL
WHERE invoice_id=p_invoice_id;
EXCEPTION
END;
BEGIN
SELECT name
INTO V_OPERATING_UNIT
FROM hr_operating_units
WHERE organization_id=v_org_id;
EXCEPTION
END;
BEGIN
SELECT paf1.person_id
INTO l_person_id
PER_JOBS PJB ,
PER_ALL_PEOPLE_F PAF1,
FND_USER FU ,
PER_ALL_ASSIGNMENTS_F PAAF
AND rownum =1
AND SUBSTR(HAPF.name,1,2) IN
(SELECT FLEX_VALUE
FND_FLEX_VALUES FFV ,
FND_FLEX_VALUES_TL FFVT
WHERE FFVS.FLEX_VALUE_SET_ID=FFV.FLEX_VALUE_SET_ID
SELECT paf1.person_id
INTO l_person_id
PER_JOBS PJB ,
PER_ALL_PEOPLE_F PAF1,
FND_USER FU ,
PER_ALL_ASSIGNMENTS_F PAAF
AND rownum =1
AND SUBSTR(HAPF.name,1,2) IN
(SELECT FLEX_VALUE
FND_FLEX_VALUES FFV ,
FND_FLEX_VALUES_TL FFVT
WHERE FFVS.FLEX_VALUE_SET_ID=FFV.FLEX_VALUE_SET_ID
);
SELECT paf1.person_id
INTO l_person_id
PER_JOBS PJB ,
PER_ALL_PEOPLE_F PAF1,
FND_USER FU ,
PER_ALL_ASSIGNMENTS_F PAAF
AND rownum =1
AND SUBSTR(HAPF.name,1,2) IN
(SELECT FLEX_VALUE
FND_FLEX_VALUES FFV ,
FND_FLEX_VALUES_TL FFVT
WHERE FFVS.FLEX_VALUE_SET_ID=FFV.FLEX_VALUE_SET_ID
);
SELECT paf1.person_id
INTO l_person_id
PER_JOBS PJB ,
PER_ALL_PEOPLE_F PAF1,
FND_USER FU ,
PER_ALL_ASSIGNMENTS_F PAAF
AND rownum =1
AND SUBSTR(HAPF.name,1,2) IN
(SELECT FLEX_VALUE
FND_FLEX_VALUES FFV ,
FND_FLEX_VALUES_TL FFVT
WHERE FFVS.FLEX_VALUE_SET_ID=FFV.FLEX_VALUE_SET_ID
);
ELSE
l_person_id:=0;
END IF;
EXCEPTION
l_person_id :=0;
END;
l_person_id :=0;
END IF;
RETURN (l_return_val);
EXCEPTION
l_person_id :=0;
Return (L_Return_Val);
End XX_Get_Approver;
ORACLE APPROVALS MANAGEMENT
(AME) SETUPS AND TEST CASES IN 11I
Oracle Approvals Management or AME, as it is called in general, is a module of Oracle Applications that contains
the hierarchy list for all seeded/standard workflows. We can configure individual approval lists for each workflow in
this module. To enable the workflows to use AME hierarchy list a profile option, AME: Installed, has to be set. Just
like any profile option it can be set at any of the flowing levels,
Site
Responsibility
Application
User
We shall look at setting up the AP Invoice Approval hierarchy in AME. This hierarchy has not been used in the
Attributes
Click on Attributes
We are selecting Attribute, SUPPLIER_INVOICE_AMOUNT. Click Next on the attributes are to find the this attribute
Clicking on this attribute gives the details of the attribute,
You can see how Oracle derives the value of the attribute. Let us go back to the Attributes screen by clicking Return
If you want to modify the logic that Oracle uses on this attribute you can click on Update icon (the pencil icon) for
this attribute.
Note the input parameter for the query. The condition, ai.invoice_id = :transactionId, means that the input to the
AME rule will be validated against the invoice_id from the ap_invoices_all table. Thus the input into AME rule for
this transaction will be invoice_id. We shall use this for testing AME later on. Make the change to the query and
Attribute: SUPPLIER_INVOICE_AMOUNT
Let’s add the condition that an invoice should be sent to 1 selected approver if the invoice amount is between AED
Use the drop down lists to create the condition. Click Apply.
You can see the confirmation message on top that the condition has been added to the list.
Action Types
Now we have created a condition, we have to create an Action Type. Click on Action Types link on the top menu.
We will select an existing Action Type. Click Use Existing Action Type button.
Click on the Next button until you see “Supervisory level“. Select this Action Type
Rules
The Action Type is now created. We now need to create a Rule. Click on the Rules tab to the top right menu.
Click on Next
Click on Add Conditions button. Now we get to select which conditions are to be added to this rule.
Let us select the condition we created named, “SUPPLIER_INVOICE_AMOUNT is greater than 1000 and less than or
Action Type is populated automatically as this is the Action Type that was selected earlier for this transaction type.
Select an Action from the list of values. Select the Action from the List of Values.
Click Next
First we shall create a test invoice for testing the AME rule.
We have put a condition in AME for currency, AED, and amount between 1000 and 5000. Hence we have created
Enter the transaction id 720374. This is the invoice_id from the ap_invoices_all table (explained in Attributes
section above). The invoice amount is between AED 1000 and AED 5000, (AED1500 for the invoice we have
Click Go
Now the AME transaction data is shown on this page. We also have a warning message from Oracle. The message
for item 278866“. Approver listmay not be generated if this attribute used in conditions”.
Click on Setup tab on the top menu. Then click on Attributes underneath the top menu. Select the attribute
by entering the name in Search form in the middle of the form.
Click Update
Select the query from the Value field and paste it in SQL.
1 SELECT assets_tracking_flag
FROM ap_invoice_distributions_all
2 WHERE invoice_id = :transactionid AND invoice_distribution_id IN (SELECT
3 invoice_distribution_id
4 FROM
5 ap_invoice_distributions_all
WHERE invoice_i
6 :transactionid)
ORDER BY invoice_distribution_id
Execute the sql and pass the invoice_id, 130384 (that was being used for the AME test).
The output is ‘Y’. If you notice the Attribute Data Type in the Attribute screen in AME, it is Number. Hence there is
a mismatch.
Let us change this query to return only 1. Change the query to the following and paste it on the Value field in the
SELECT 1
1 FROM ap_invoice_distributions_all
2 WHERE invoice_id = :transactionId AND invoice_distribution_id IN (SELECT
3 invoice_distribution_id
FROM
4 ap_invoice_distributions_all
5 WHERE invoice_i
6 :transactionId)
ORDER BY invoice_distribution_id
The message on top shows that the query is valid. Click on Apply. Go back to the Test Workbench page by clicking
on Test Workbench tab on the top right menu. Click on Run Real Transaction Test (1) button.
Oracle throws an error, “This transaction’s requestor lacks a person ID, so AME cannot locate the requestor’s
supervisor to begin the chain of authority“. This means the requester_id field has to be populated in the table.
Let us populate the requester_id field for this invoice. For demonstration we shall perform this action using an
update statement. Go back to the AP invoices form and query for the invoice. Click on Folder > Show field. Query
for Re%
2 levels.
Save the form. Go back to Test Workbench in AME. Enter Transaction Id: 720374. Click on Run Test Case
(1) button.
Now the approver list comes up for AME as the requester has been set for the invoice.
We get to see the AME rule information. Now by clicking Show button for the 2 nd approver, i.e. the approver on
top.
The AME rule is now setup. Once the Invoice is sent for approval after setting the requester name the flow will be
similar to what we tested now. The same logic applies to all AME approval rules.
We have used a very simple example to illustrate setting up AME rules. The same method is used to create AME
rules for all transactions. Certain setup options have not been used, like Approval Groups, etc. Once AME setup is
We have tested the approval list for the AP invoice workflow through AME. Once we send the invoice for approval,
the workflow will be executed and the approval notifications will be sent in the same hierarchy.