Oracle Payables


Oracle Payables

Create Invoice Approval Process in Oracle Payables Using AME

 

It is important to know how Invoice Approval process will work under Accounts Payables in Oracle Application using AME (Approval Management Engine)

AME works as per our definitions of delegations and if payables require the AP Invoices to be routed for approval based on the invoice pay group, invoice source, invoice type

The AP Invoice approval workflow has been customized to handle the routing of invoices
AME is used to derive the approvers to whom the workflow will route the invoices for approval
To satisfy the approval requirements for AP Invoice approval, new rules have to be created along 3 custom attributes

In the following we will know how AME will work and how to define all setups require to work AME properly. The following are the required setups for AME.

Define Attributes:

We need to create 3 custom attributes which will be used in the rules to satisfy Clients requirements

Please note that these 3 custom attributes have already been created and should not be disturbed; otherwise this will affect the work flow process. These attributes refer to custom packages

The 3 new custom attributes are:
LMAP_ASSOCIATED_INVOICE_TYPE,
LMAP_DM_CM_%,
LMAP_DM_CM_AMOUNT
Navigation:
Responsibility = AME Application Administrator
Approvals> select the 'Attributes' tab
Steps to create custom attribute ABCDAP_ASSOCIATED_INVOICE_TYPE:

1. Click on the 'Transaction Type' drop down menu and select 'Payable Invoice Approval'
option from the list of values.Click on Continue

2. Scroll down and click on the 'Add Attribute' button.

3. The next screen displayed will be 'Choose an Attribute Level'. In this screen select 'header attribute' as the Attribute Level.

4. Click on 'Continue' button.

5. In the next screen 'Create an Attribute-Step 1', click on button 'Create New Name' to create a new custom attribute.

6. In the next step 'Create an Attribute- Step 2', enter the Name for the custom attribute
'LMAP_ASSOCIATED_INVOICE_TYPE'.

7. Click Continue

8. In the next screen 'Create an Attribute- Step 3', Enter the Attribute Type = 'String', Description = 'Attribute to check the type of associated invoice type', Status Usage = 'No', Usage = 'SELECT LMAP_WFAPPROVAL_PKG_36.get_dm_cm_type (:transactionId) FROM DUAL'..

9. Click on 'Continue'.

10. The custom attribute 'LMAP_ASSOCIATED_INVOICE_TYPE' has now been created.
In the same way other 2 custom attributes can be created.
Steps to create other 2 custom attributes:
The other 2 attributes are also created in the same way with the following values:

1. LMAP_DM_CM_%:
Name = 'LMAP_DM_CM_%:'
Enter the Attribute Type = 'number',
Dscription = 'LMAP attribute to calculate DM/CM value as a percentage for related
interfaced invoice',
Status Usage = 'No',
Usage =
'SELECT LMAPLMAP_WFAPPROVAL_PKG_36.get_dm_cm_percent(:transactionId)
FROM ap_invoices_all inv1
,ap_system_parameters_all asp
WHERE inv1.org_id = asp.org_id'
AND inv1.invoice_id =:transactionId

2. LMAP_DM_CM_AMOUNT:
Name = 'LMAP_DM_CM_AMOUNT'
Enter the Attribute Type = 'Currency',
Dscription = 'LMAP attribute to calculate DM/CM amount for approval routing',
Status Usage = 'No',
Usage =
'SELECT abs(LMAP_WFAPPROVAL_PKG_36.get_dm_cm_amt(:transactionId))
,NVL(inv1.Invoice_Currency_Code,asp.Invoice_Currency_Code)
,NVL(inv1.Exchange_Rate_Type,asp.Default_Exchange_Rate_Type)
FROM ap_invoices_all inv1
,ap_system_parameters_all asp
WHERE inv1.org_id = asp.org_id
AND inv1.invoice_id =:transactionId'
Conditions

Define Conditions:
Responsibility = AME Application Administrator
Navigation:
Responsibility- AME Application Administrator
Approvals - Select the 'Conditions' tab
The following example shows the creation of a condition and a rule:
A rule needs to be created as per following conditions and the approver will be DAVID.
1. Invoice Paygroup(Concept) can be 'NON TRADE' and 'EMPLOYEE'

2. Operating unit = ABCD

3. All invoices except Prepayments

4. Manually created invoices

5. Invoice amount in the range 0 to 50,000 $
Steps to create the first condition:
1. Click on the 'Transaction Type' drop down menu and select 'Payable Invoice Approval'
option from the list of values.
2. Click on 'Continue'.
3. Next screen is 'Conditions' screen as shown below. Scroll down and Click on the button 'Add a Condition'.
4. In the next screen, 'Choose a Condition Type', select Condition Type = 'ordinary header'.
5. In the next screen, 'Choose the Condition's attribute' screen shown below, select the
attribute name 'SUPPLIER_PAY_GROUP_LOOKUP_CODE' as shown below and click on 'Continue' button.
6. In the next screen, create a Condition on a String Attribute', enter the values for the
attribute as NON TRADE and EMPLOYEE as shown below and click on 'Continue'.
Now click on 'Quit' to come out of Condition creation. In the next screen, you can see that your condition has been created as shown below.
Define Rules:
Responsibility = AME Application Administrator
Responsibility = AME Application Administrator
> Approvals>'Rules' Alternate Region
1. Select the Transaction Type = Payables Invoice Approval from the drop down list as shown below.
2. Click on Continue
3. Next screen will display the list of existing rules in AME.
4. In this screen, scroll down to the end of the page and click on 'Add Rule and Usage' button.
5. Next screen displayed is 'Add a Rule-Ste 1.
6. Enter the description for the rule as shown below. The description of the rule should summarize the conditions of the rule as given below as an example and click "continue'.
'LMAP(ABCD) NON TRADE, EMPLOYEE(SOMNATH) Invoice for INR 0-50K range'
7. In the next screen 'Add a Rule-Step 2', select the radio button for the approval type. Please select the approval type = 'chain of authority includes an approval group'
8. In the next screen, 'Add a Rule-Step 3', select the approver from the drop down menu for 'Approval'.
9. The next screen is 'Add a Rule-Step 4'. Here you select a condition to complete the rule. The minimum requirements to create a rule include an approval group and a condition.
Here please select one of the condition attributes 'SUPPLIER_INVOICE_PAYGROUP_LOOKUP_CODE' as shown below. In the list of conditions for paygroup, select the required condition and click on 'Continue'.
10. When clicked on 'Continue', the rule is created and will be redirected to a confirmation.
11. Now click on this rule to add the rest of the conditions. When clicked on this rule in the above page, you will be redirected to the screen 'Edit a Rule'.
12. In the drop down menu for 'Item to Change', select the option 'ordinary conditions', to add new conditions to the same rule.
13. In the next screen, please click on 'Add Condition' to add the conditions.
14. The next screen is 'Select Ordinary-Condition Attributes' select the other conditions.
15. From the drop down menu, select the attribute 'SUPPLIER_INVOICE_SOURCE' and select the condition for the attribute as 'Manual Invoice Entry' and click on 'Continue'
16. When clicked on 'Continue', this condition will be added to the rule as shown below.
17. Follow the steps to create other conditions for Invoice type, Invoice amount and Org id as shown below.
** Please observe that there are 5 conditions in this rule one for each of the requirements.
With this, the rules have been created as per requirements described above and from now Invoice Approval works as per the conditions and rules that we defined.
By completion of this document you will be able to create AME for Accounts Payables.

Query to Select Prepayment Invoice Status in Oracle Payablesl:

SELECT   pv.VENDOR_NAME,
           ai.invoice_num,
           NVL (
              DECODE (
                 SIGN (SUM (amount - NVL (prepay_amount_remaining, amount))),
                 1,
                 DECODE (SUM (prepay_amount_remaining), 0, 'Y', NULL),
                 NULL
              ),
              'N'
           )
              AS PP_F     -- Y is Fully Applied, N is Partially or Not Applied
    FROM   ap_invoice_distributions_all aid, ap_invoices_all ai, po_vendors pv
   WHERE       aid.invoice_id = ai.INVOICE_ID
           AND pv.VENDOR_ID = ai.VENDOR_ID
           AND aid.line_type_lookup_code = 'ITEM'
           AND ai.invoice_type_lookup_code = 'PREPAYMENT'
           AND ai.INVOICE_ID = :P_INVOICE_ID
           AND NVL (reversal_flag, 'N') <> 'Y'
GROUP BY   pv.vendor_name, ai.invoice_num
  HAVING   NVL (
              DECODE (
                 SIGN (SUM (amount - NVL (prepay_amount_remaining, amount))),
                 1,
                 DECODE (SUM (prepay_amount_remaining), 0, 'Y', NULL),
                 NULL
              ),
              'N'
           ) <> 'Y';

No comments:

Post a Comment

How to find all cancel Requisitions

SELECT prha . *   FROM po_Requisition_headers_all prha , po_action_history pah   WHERE      1 = 1        AND pah . object_id ...