P. 1
Ame Dynamic and Supervisor

Ame Dynamic and Supervisor

|Views: 133|Likes:
Published by Adeyemi Adetunji

More info:

Published by: Adeyemi Adetunji on Apr 05, 2012
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





Page 1 of 3


How to Use Dynamic Queries To Determine Approvers for iProcurement Requisitions - Example Based on Requisition Line Requester? [ID 960944.1] Modified 22-JUN-2011 In this Document Goal Solution References Type HOWTO Status PUBLISHED

Applies to:
Oracle iProcurement - Version: 12.0.6 and later [Release: 12 and later ] Information in this document applies to any platform.

Can AME be used to generate approvers based on the REQUESTER of the requisition line items, rather than based on the PREPARER of the requisition?

This type of functionality requires customization which is not completely covered in this answer, but the information contained here should be helpful in understanding some of the capability and some options to consider. AME provides Dynamic Query functionality that may be used to generate approvers based on the line level REQUESTER or other requisition header or line level values. As an Example, use the following Dynamic Query to generate an Approval group based on the requisition line level REQUESTER (Note: Additional logic may be needed if there are 2 or more different requesters specified on the requisition lines. If all the lines on the requisition have the same requester, then this should work fine.) 1. Please review the following EXAMPLE 1 for details about a new ATTRIBUTE, CONDITION, and RULE that can be created. The ATTRIBUTE returns a true or false value. If all of the requesters on the requisition lines are the same as the preparer of the requisition, then the attribute returns as true. If one or more of the requesters on the requisition lines is different than the preparer of the requisition, then the attribute returns as false. Then the RULE checks the CONDITION and adds an additional approver (using an Approver Group) if the ATTRIBUTE is false - (false in this case means at least one requester is different than the preparer) EXAMPLE 1 1. Navigate to AME responsibility 2. Choose Setup for Purchase Requisition Approval transaction type 3. Create a new Attribute Attribute Name Attribute Description Category Usage Type Item Class Data Type REQUESTERS_SAME_AS_PREPARER True if All Requesters On Req Lines Are Same As Preparer on Req Header Others Dynamic Header Boolean Query used for the new attribute is as follows: select min(myvalue) from (select decode(prla.to_person_id, prha.preparer_id,'true','false') myvalue from po_requisition_headers_all prha, po_requisition_lines_all prla where prla.requisition_header_id = prha.requisition_header_id AND prha.requisition_header_id = :transactionId ) 4. Create a new Condition based on the above new Attribute REQUESTERS_SAME_AS_PREPARER is False 5. Create a new Rule that uses the above new Condition based on the new Attribute Item is Dave-Germany-001 and Requester Not Preparer - if REQUESTERS_SAME_AS_PREPARER is False (i.e., if at least one of the requests is not the same as the preparer of the requisition) - then add an additional post list approver from a specific approval group defined previously

6. Test the issue - Create a new requisition in iProcurement Vision Germany - Specify the requester the same as the preparer - checkout step 2 of 3 (see the approval list does not include the additional post list approver) - go back to checkout step 1 of 3 - change the requester to be different than the preparer - checkout step 2 of 3 (see the approval list DOES include the ADDITIONAL post list approver)

2. To augment the Example 1 further, Example 2 below shows some modifications which retrieves all the Supervisors above the Requester, and adds all these supervisors to the approval list. This example creates multiple approver groups which each return a single approver in the supervisor approver hierarchy above the requester. EXAMPLE 2 Requester --> Supervisor 1 (approver group 1)--> Supervisor 2 (approver group 2) --> Supervisor 3 (approver group 3) ... Supervisor 10 (approver group) Setup Approver groups 1-10 where each approver group is based on a dynamic query that returns the supvisor corresponding to that supervisor level (up to 10 levels). (or up to 20 if you will ever have 20 supervisors above the requester) Below is the query to use (for Supervisor 2 level). You just need to modify the rownum value in the last line of the query to specify the supervisor level for each corresponding supervisor level / approver group definition. Supervisor Level 1 1 1 2 2 2 ... Approver Group rownum

https://support.oracle.com/CSP/main/article?cmd=show& type=NOT& doctype=HOW... 02/04/2012

requisition_header_id AND prha.PERSON_ID AND TRUNC(SYSDATE) BETWEEN PERA1.EFFECTIVE_START_DATE AND PERF.requisition_header_id = :transactionId) AND TRUNC(SYSDATE) BETWEEN PERA.employee_id = c.EFFECTIVE_START_DATE AND PERA.EFFECTIVE_START_DATE AND PERA.'EMP_APL') AND PPT.EFFECTIVE_END_DATE AND PERA.ASSIGNMENT_TYPE = 'E' CONNECT BY PRIOR PERA.com/CSP/main/article?cmd=show& type=NOT& doctype=HOW. rownum myrownum From FND_USER fndu.SYSTEM_PERSON_TYPE IN ('EMP'. 02/04/2012 .employee_id = c. EXAMPLE 3: Check whether a certain person / user is the 1st (or Nth) supervisor above the preparer of the requisition Define attribute [ XX Supervisor is Casey Brown ] based on a dynamic query like the following (this will check if the person associated to username 'CBROWN' is the 1st supervisor above the Preparer of the requisition.to_person_id <> prha.PERSON_TYPE_ID = PERF. then only the first five approver group queries will return a value.EFFECTIVE_END_DATE AND PERA1.oracle. and only 5 supervisors will be in the approval list.myameid from ( select 'PERSON_ID:'||pecx.EFFECTIVE_START_DATE AND PERA.employee_id myameid. ( SELECT PERA. approver group 1. PER_ASSIGNMENTS_F PERA1 WHERE TRUNC(SYSDATE) BETWEEN PERF.PERSON_ID = PERA.ASSIGNMENT_TYPE = 'E' AND EXISTS (SELECT '1' FROM PER_PERSON_TYPES PPT WHERE PPT.employee_id myameid.PRIMARY_FLAG = 'Y' AND PERA1.'false') from ( select 'PERSON_ID:'||pecx.preparer_id AND prla.SUPERVISOR_ID FROM PER_ASSIGNMENTS_F PERA WHERE EXISTS (SELECT '1' FROM PER_PEOPLE_F PERF.EFFECTIVE_START_DATE AND PERA1.SUPERVISOR_ID = PERA.The single RULE will require approval from all 10 of the approver groups..PRIMARY_FLAG = 'Y' AND PERA.SYSTEM_PERSON_TYPE IN ('EMP'..EFFECTIVE_END_DATE AND PERF.supervisor_id and pecx.ASSIGNMENT_TYPE = 'E' CONNECT BY PRIOR PERA..PRIMARY_FLAG = 'Y' AND PERA1.SUPERVISOR_ID FROM PER_ASSIGNMENTS_F PERA WHERE EXISTS (SELECT '1' FROM PER_PEOPLE_F PERF. PER_ASSIGNMENTS_F PERA1 WHERE TRUNC(SYSDATE) BETWEEN PERF.PERSON_TYPE_ID) ) START WITH PERA. Example 3 shows how to check whether a certain user is the Nth supervisor above the preparer.PRIMARY_FLAG = 'Y' AND PERA.supervisor_id and pecx.ASSIGNMENT_TYPE = 'E' )c where fndu.'EMP_APL') AND PPT. 2) require approval from .PERSON_ID = PERA.EFFECTIVE_START_DATE AND PERF.PERSON_ID = PERF..PERSON_ID AND TRUNC(SYSDATE) BETWEEN PERA1.PERSON_TYPE_ID) ) START WITH PERA.EFFECTIVE_END_DATE AND PERA1.Page 2 of 3 10 10 10 select x.employee_id = c.employee_id = c.supervisor_id )x where myrownum = 2 Then create a RULE that uses actions of 1) require approval from .ASSIGNMENT_TYPE = 'E' AND EXISTS (SELECT '1' FROM PER_PERSON_TYPES PPT WHERE PPT.PERSON_ID AND TRUNC(SYSDATE) BETWEEN PERA. etc .) select NVL('true'. po_requisition_lines_all prla where prla.PERSON_ID = (select preparer_id from po_requisition_headers_all prha where prha.EFFECTIVE_END_DATE AND PERA.user_name = 'CBROWN' )x where myrownum = 1 Define a Condition based on the above CUSTOM attribute: XX Supervisor is Casey Brown = true Define a Rule that uses the above condition and adds approvers as required based on this condition https://support.EFFECTIVE_START_DATE AND PERA1.requisition_header_id = prha.. rownum myrownum From FND_USER fndu.SUPERVISOR_ID = PERA.supervisor_id and fndu. approver group 2.PRIMARY_FLAG = 'Y' AND PERA.PRIMARY_FLAG = 'Y' AND PERA.EFFECTIVE_END_DATE AND PERF.EFFECTIVE_END_DATE AND PERA.ASSIGNMENT_TYPE = 'E' )c where fndu.to_person_id) from po_requisition_headers_all prha..EFFECTIVE_END_DATE AND PERA.EFFECTIVE_START_DATE AND PERA. (if there are only 5 supervisors above the requester.PERSON_ID AND TRUNC(SYSDATE) BETWEEN PERA.SUPERVISOR_ID AND PERA1. .SUPERVISOR_ID AND PERA1.. per_employees_current_x pecx. ) 3.PERSON_ID = (select min(prla.requisition_header_id = :transactionId) AND TRUNC(SYSDATE) BETWEEN PERA.. per_employees_current_x pecx.PERSON_ID = PERF.PERSON_TYPE_ID = PERF. ( SELECT PERA.

REQUISITION Back to top Copyright (c) 2007. 2010.iProcurement TOPIC:AME:Approval Management Engine DOCUMENT-ID:960944..BASE APPROVAL OFF OF REQUESTOR BUG:3117789 .6 MAXVER: PORTID-0 FDRSEG-324 FDRSEG-307 FDRSEG-263 FDRSEG-16 References BUG:2638127 .US KEYWORD:FND_USER KEYWORD:EMPLOYEE_ID KEYWORD:PREPARER KEYWORD:APPROVAL~LIST KEYWORD:PER_EMPLOYEES_CURRENT_X KEYWORD:AME KEYWORD:PURCHASE~REQUISITION KEYWORD:IPROCUREMENT PRODID-398 COMPONENT:APPROVALS. Please contact Oracle Consulting for additional options and further customization required to achieve specific functionality depending on the business needs.AME MINVER:12. 02/04/2012 .NEED APPROVAL CONCEPT BASED ON REQUESTER INSTEAD OF PREPARER Related Products Oracle E-Business Suite > Procurement > Procurement > Oracle iProcurement Keywords AME.com/CSP/main/article?cmd=show& type=NOT& doctype=HOW. but is offered as a starting point for using dynamic query capability in AME to achieve custom approval list functionality. All rights reserved. IPROCUREMENT.0.992 DOCUMENT-TYPE:HOWTO ZCXTECH TITLE:How to Use Dynamic Queries To Determine Approvers for iProcurement Requisitions Example Based on Requisition Line Requester? IMPACT:LOW SKILL-LEVEL:NOVICE STATUS:REVIEW_READY DISTRIBUTION:EXTERNAL ZCXCURRENT AUTHOR:DFELTON. APPROVAL LIST. Oracle. FND_USER. EMPLOYEE_ID.Procurement.Mfg.Page 3 of 3 This is not a comprehensive example.oracle.1 ALIAS: SOURCE:AWIZ 7774798. PER_EMPLOYEES_CURRENT_X. <e>> FOLDER:EBS.. Legal Notices and Terms of Use | Privacy Statement https://support. PREPARER.

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->