Skip to main content

Oracle Approvals Management Engine (AME) Extensions for iExpenses


Oracle Approvals Management (AME) Header-Level Approver Client Extension

Use the predefined AP_WEB_CUST_AME_PKG.getHeaderLevelApprover function to set the first approver for approvals routing for the entire expense report. You can also use this function to change the order of precedence for approvals and route expense reports to the cost center owner, cost center business manager, project manager, or award manager. If you do not configure the order of precedence, the approvals are routed in the following order: awards approvers, projects approvers, cost center approvers. The AP_WEB_CUST_AME_PKG.getHeaderLevelApprover function returns the person ID.

Cost Center Approvers

When the approval is set to be routed to the cost center approvers, the system will return:
  • The person ID of the approver that is entered in the Approver field on the General Information page.
  • Null if no value is entered in the Approver field and the cost center entered on the General Information page is the same as the employee's default cost center.
  • The cost center business manager's person ID, if no value is entered in the Approver field and the header cost center is different from the employee's default cost center. If the business manager is not defined, then the cost center owner ID is returned.

Project Approvers

When the approval is set to be routed to the project approvers, the system will return:
  • The person ID of the approver that is entered in the Approver field on the General Information page.
  • The project manager's person ID if no value is entered in the Approver field and all the expenses in the expense report are charged to the same project number.
  • Null if there is no value entered in the Approver field, and there are multiple project numbers in the expense report.

Awards Approvers

When the approval is set to be routed to the awards approvers, the system will return:
  • The person ID of the approver that is entered in the Approver field on the General Information page.
  • The award manager's person ID if no value is entered in the Approver field and all the expenses in the expense report are charged to the same award number.
  • Null if there is no value entered in the Approver field, and there are multiple award numbers in the expense report.
The AP_WEB_CUST_AME_PKG.getHeaderLevelApprover function resides in the apwamecb.pls file in the directory: /apdev/ap/11.5/patch/115/sql.
See: Integrating with Oracle Approvals Management.

The query for the applicable AME attribute is:
 
SELECT ap_web_cust_ame_pkg.Getheaderlevelapprover(:transactionId)FROM   ap_expense_report_headers_allWHERE  report_header_id = :transactionId 
 
Note: The JOB_LEVEL_NON_DEFAULT_STARTING_POINT_PERSON_ID attribute in AME is seeded with a query to get the value for the Approver field. Therefore, to use this client extension, you should update this attribute with the query provided above.

AME Cost Center Approver Client Extension

Use the predefined AP_WEB_CUST_AME_PKG.getCostCenterApprover function to route an expense report for approval to cost center owners. This API is only supported when you use Oracle Approvals Management for expense report approvals.
You can only use the call to this API with an AME dynamic approval group. The AP_WEB_CUST_AME_PKG.getCostCenterApprover function returns the person ID.
To use the AME Cost Center Approver Client Extension:
  1. Create a cost center approval group with this dynamic query:
     
    SELECT 'person_id:'
           || ap_web_cust_ame_pkg.Getcostcenterapprover(:transactionId) person_id
    FROM   ap_expense_report_headers_all
    WHERE  report_header_id = :transactionId

     The AP_WEB_CUST_AME_PKG.getCostCenterApprover function resides in the apwamecb.pls file in the directory: /apdev/ap/11.5/patch/115/sql. The file name is apwamecb.pls.
  2. According to your business requirements, set up a rule with Approval Type pre-chain-of-authority approvals or post-chain-of-authority approvals, then select "Require pre/post-approval from Cost Center Approval Group" for Approval.
  3. Before you enable the new rule, test the Approval Group using the AME Test tab.
    This table describes the different expenses entry scenarios and the value returned by the function for each scenario. The Cost Center default value refers to the value defined in the employee's HR setup.

    Cost Center Approver Field Value Returned
    Default Null Null
    Default Employee's supervisor Null
    Default Not employee's supervisor, but approver belongs to employee's cost center Null
    Default Not employee's supervisor, and approver does not belong to employee's cost center Cost center business manager ID or, if business manager is not defined, cost center owner ID
    Changed Null Cost center business manager ID or, if business manager is not defined, cost center owner ID
    Changed Employee's supervisor Cost center business manager ID or, if business manager is not defined, cost center owner ID
    Changed Not employee's supervisor, but approver belongs to employee's cost center Cost center business manager ID or, if business manager is not defined, cost center owner ID
    Changed Not employee's supervisor, approver not in employee's cost center, and approver's default cost center is different from the cost center entered Cost center business manager ID or, if business manager is not defined, cost center owner ID
    Changed Not employee's supervisor, but approver's default cost center is the same as the cost center entered Nu

Source : iExpenses Client Extensions
   https://docs.oracle.com/cd/E18727_01/doc.121/e13454/T214904T214911.htm

Comments

Popular posts from this blog

SQL Query to extract Oracle Purchase Order Information

SELECT   poh.po_header_id,    poh.type_lookup_code PO_TYPE,   poh.authorization_status PO_STATUS,   poh.segment1 PO_NUMBER,   pov.vendor_name SUPPLIER_NAME,   povs.vendor_site_code Location,   hrls.location_code Ship_To,   hrlb.location_code Bill_to,   pol.line_num ,   msib.segment1 Item,   pol.unit_price,   pol.quantity,   pod.amount_billed Amount,   pod.destination_subinventory,   ppf.full_name Buyer_Name,   poh.closed_Code  FROM   PO_HEADERS_ALL poh,   PO_LINES_ALL pol,   mtl_system_items_b msib,   PO_LINE_LOCATIONS_ALL poll,   PO_DISTRIBUTIONS_ALL pod,   po_vendors pov,   po_vendor_sites_All povs,   hr_locations_all hrls,   hr_locations_all hrlb,   per_all_people_f ppf,   po_line_types polt WHERE   1                         =1 AND polt.line...

Query to find Operating Unit, Business Group and Legal Entity Information

SELECT   DISTINCT   hrl . country ,                  hroutl_bg . name              bg ,                  hroutl_bg . organization_id ,                  lep . legal_entity_id ,                  lep . name                    legal_entity ,                  hroutl_ou . name              ou_name ,               ...

How To Enable / Disable Forms Personalization Option

Forms Personalization gives great flexibility to execute custom business logic without performing so much of technical work. To start forms personalization navigate to Help -> Diagnostics -> Custom Code -> Personalize But many time when we click on personalize it give below error  " Function is not available for this respnosibility. Change responsibilities or contact your System Administrator " To Enable access to forms personalization function we need to set below profile option.  -  Utilities:Diagnostics -> Yes / No It determines the diagnostics option is enabled for a user / responsibility or site, depending on the level profile option is set. Navigate to System Administrator -> Profile -> System Query for your user / responsibility for which you want to provide access. Set the value to 'Yes' , If you want allow access to forms personalization Since we change the profile option please change the respons...