Featured post

General Ledger Revaluation

General Ledger Revaluation Account balances denominated in foreign currencies are adjusted through the revaluation procedure. Revaluat...

Monday, 28 December 2015

Oracle Payment Processing Request (PPR) in AP – R12

PAYMENT PROCESSING REQUEST FUNCTIONALITY-
In 11i we used Payment batches to pay for multiple invoices same time. In R12, PPR is the replacement of Payment batches. R12 PPR process enables payment Administrator to select multiple invoices for payment by selection criteria and he can pause the invoice selection and payment build process. During the invoice selection review, payment manager can review the invoice selected; if the invoices were validated or approved and hence did not get included in the payment process request. He can add or remove the invoices in the Payment process and also can check the cash requirements for the full payment. Payment manager can also dismiss the individual documents or payments if necessary, and restart the payment build process.
Steps in Pay run Process-
Managing a Pay run involves 3 main processes
  • Selection of the invoices for payment
  • Grouping the invoices into payments
  • Building the payment instruction files to either print checks or send instructions to bank.
There are four steps in the processing of PPR:-
  • Document selection – Handled by Payables(AP)
  • Build Payments – Handled by Payments(IBY)
  • Format Payments – Handled by Payments(IBY)
  • Confirm Payments – Handled by Payables(AP)
Submitting a Single Payment Process Request
Mandatory fields – Payment Process Request name, pay through date, Payment date, and Exchange rate type.
Under Processing tab, options are available to stop the process after document selection/payment and also how to create the payment instructions:
  1. Maximize Credits.
  2. Stop Process for review after scheduled payment selection.
  3. Calculate payment withholding and interest during scheduled payment selection.
  4. Stop process for review after creation of proposed payments.
Click on submit to submit the Payment process request.
Document Selection – Payables
This process calls AP_AUTOSELECT_PKG.
When a payment process request is submitted, a record is inserted in AP_INV_SELECTION_CRITERIA_ALL with a checkrun_name i.e payment process request name. Invoices are then selected based on the due date, discount date, paygroup, and other criteria provided by the user while submitting the PPR.
The AP_SELECTED_INVOICES_ALL table is populated with the selected invoices and AP_UNSELECTED_INVOICES_ALL table by the unselected invoices.
Note: After selecting the documents, the invoices are locked to prevent other check runs from selecting the same invoices.
If the PPR has been setup to ‘Stop Process for Review after Scheduled Payment Selection’, the process stops for user review.
Then the status of the PPR is set to Invoices Pending Review.
If the ‘Stop Process for Review after Scheduled Payment Selection’ was not enabled, at the end of invoice selection, build program is submitted automatically.
If no invoices met the selection criteria and no payment schedules selected for payment, the PPR is cancelled automatically and the status of the PPR is set to “Cancelled – No Invoices Selected”. Then void all invoices
For others, the actions available are
a) Terminate the PPR
b) Modify / proceed to submit the PPR and start the build process.
Build Payments – Payments
Call IBY_DISBURSE_SUBMIT_PUB_PKG
Build payment creates records in IBY_PAY_SERVICE_REQUESTS with call_app_pay_service_req_code = checkrun_name.
A payment process request is a group of documents payable that a source product submits to Oracle Payments for payment service processing. This table contains the parameters like Calling application identifier, Internal bank account, Allow zero payments flag, etc. selected in the Payment Process Request.
PAYMENT_SERVICE_REQUEST_IDNUMBERSystem generated primary key
CALLING_APP_IDNUMBERSource product Identifier
CALL_APP_PAY_SERVICE_REQ_CODEVARCHAR2Source product’s payment process request Identifier. Since the source product’s Identifiers may be alphanumeric, even numeric document Identifiers are stored as VARCHAR2.
PAYMENT_SERVICE_REQUEST_STATUSVARCHAR2Payment process request status. Values from the lookup IBY_REQUEST_STATUSES include PAYMENTS_CREATED.
PROCESS_TYPEVARCHAR2Specifies the process by which documents payable are built into payments and payments into payment instructions. Values from the lookup IBY_PROCESS_TYPES include STANDARD, IMMEDIATE, and MANUAL.
ALLOW_ZERO_PAYMENTS_FLAGVARCHAR2Y or N flag that indicates whether zero payments are allowed for this payment request. If set to N, any zero value payments created for this payment request is failed.
INTERNAL_BANK_ACCOUNT_IDNUMBERInternal bank account identifier
MAXIMUM_PAYMENT_AMOUNTNUMBERMaximum payment amount used to override default maximum payment amount
MINIMUM_PAYMENT_AMOUNTNUMBERMinimum payment amount used to override default minimum payment amount
Note: The displayed status of the PPR is generated by ibyvutlb.pls
Following are the possible values of PAYMENT_SERVICE_REQUEST_STATUS column-
  • DOCUMENTS_VALIDATED
  • INFORMATION_REQUIRED
  • INSERTED
  • PAYMENTS_CREATED
  • PENDING_REVIEW
  • TERMINATED
  • VALIDATION_FAILED
  • COMPLETED
 In 11i AP_SELECTED_INVOICE_CHECKS_ALL table is populated by the Build Payment process.
The Build Program also populates IBY_DOCS_PAYABLE_ALL table
IBY_DOCS_PAYABLE_ALL– This table contains the documents payable which are updated by system while processing “Build Payments” program. A document payable is a supplier invoice or similar document that needs to be paid.  In addition, this table contains whatever document information is necessary for payment processing.
This table contains transaction details, document details, payer, payee, etc.”
NameDatatypeComments
PAY_PROC_TRXN_TYPE_CODEVARCHAR2Type of payment processing transaction or document
CALLING_APP_IDNUMBERCalling product Identifier
CALLING_APP_DOC_REF_NUMBERVARCHAR2Reference number entered by user of the source product. Need not be unique
DOCUMENT_PAYABLE_IDNUMBEROracle Payments’ unique internal document payable Identifier
PAYMENT_FUNCTIONVARCHAR2Function or purpose of the payment. Values from the lookup IBY_PAYMENT_FUNCTIONS include SUPPLIER_PAYMENT, CUSTOMER_REFUNDS, and others.
PAYMENT_DATEDATEPayment date
DOCUMENT_DATEDATEDate of document
DOCUMENT_TYPEVARCHAR2Type of document payable. Values from the IBY_DOCUMENT_TYPES lookup include INVOICE.
DOCUMENT_STATUSVARCHAR2Document status. Values from the lookup IBY_DOCS_PAYABLE_STATUSES include PAYMENT CREATED.
DOCUMENT_CURRENCY_CODEVARCHAR2Document currency code
DOCUMENT_AMOUNTNUMBERTotal amount in document currency
PAYMENT_CURRENCY_CODEVARCHAR2Payment currency code
PAYMENT_AMOUNTNUMBERAmount to be paid in payment currency
PAYMENT_SERVICE_REQUEST_IDNUMBERIdentifier of the payment process request in which this document was submitted
PAYMENT_METHOD_CODEVARCHAR2Payment method Identifier
EXCLUSIVE_PAYMENT_FLAGVARCHAR2Y or N flag indicating whether this document payable should not be grouped with any other documents payable.
CALLING_APP_DOC_UNIQUE_REF1VARCHAR2Source product’s first unique document payable Identifier
CALLING_APP_DOC_UNIQUE_REF2VARCHAR2Source product’s second unique document payable Identifier (Invoice_id)
CALLING_APP_DOC_UNIQUE_REF3VARCHAR2Source product’s third unique document payable Identifier(Payment_number)
CALLING_APP_DOC_UNIQUE_REF4VARCHAR2Source product’s fourth unique document payable Identifier
CALLING_APP_DOC_UNIQUE_REF5VARCHAR2Source product’s fifth unique document payable Identifier
A.  Internal Bank Account/Payment Process Profile Assignment:
Call IBY_ASSIGN_PUB
If the payment process request has the internal bank account and payment profile assigned to it, the same is assigned to all the documents in the PPR.If a default internal bank account and PPP were not provided when submitting the PPR, Oracle Payments attempts to default the values. If it cannot find a default value for all the documents, the PPR is set to INFORMATION REQUIRED status. The display status of the PPR is “Information Required – Pending Action
User should complete the missing information and Run Payment Process to continue.
B.    Document Validation
Call IBY_VALIDATIONSETS_PUB
During this step, Oracle Payments validates all the documents using Payment Method based validations and then payment format based validations.b.1 – If all the documents pass validation, all the documents are set to a status of VALIDATED and the request status is set to ‘Documents Validated’.b.2 – If there are any validation failures, Oracle Payments uses the system option used while submitting the PPR to determine the next action.TheDOCUMENT_REJECTION_LEVEL_CODE of the PPR can have the following values which determine how the document processing will continue when there is a validation failureb.2.1 – REQUEST
The status of the payment process request is updated to ‘Failed Document Validation’. Oracle Payments calls the calling application and AP releases the rejected documents so they can be paid through another Payment process request.
b.2.2 – DOCUMENT
Oracle Payments rejects all documents that failed validation. Oracle Payments then calls the calling application and AP releases the rejected documents so they can be paid through another Payment process request. The rest of the documents are set to VALIDATED status and the ppr is set to ‘Documents Validated’ status.
b.2.3 – PAYEE
Oracle Payments rejects all documents for the supplier that had one or more documents that failed validation. Oracle Payments calls the calling application and AP releases the rejected documents so they can be paid through another Payment process request. The rest of the documents are set to VALIDATED status and the ppr is set to ‘Documents Validated’ status.
c.     Create Payments
Call IBY_PAYGROUP_PUBThe validated documents are then grouped into proposed payments based on the grouping rules, both users defined and hard coded.
Example: If exclusive_payment_flag = Y on a document, it is paid on a separate payment.
It then numbers the payments (internal identifier not the check numbering) and validates the created payments.Records are inserted into IBY_PAYMENTS_ALL that holds the payment information for the selected documents.The build program then updates theIBY_DOCS_PAYABLE_ALL table with the payment_id and formatting_payment_id values that corresponding to the payment that pays the document.

IBY_PAYMENTS_ALL
This table contains all the payments created by system while processing “Build Payments”. A Payment can be single check or an electronic fund transfer between first party payer and third party payee. A row in this table corresponds to one or more documents payable. Payments are built by grouping documents payable according to Oracle Payments’ grouping rules.
This table also stores information of payments at grouping level. The groups can be Single, Mixed and grouped as defined in Payment Process Profile for the purpose of SEPA.
The payment details are displayed on the Payments tab of the Funds Disbursement Process Home page.
NameDatatypeComments
PAYMENT_IDNUMBERUnique internal Identifier for this record. Generated using a database sequence.
PAYMENT_METHOD_CODEVARCHAR2Payment method used for making the payments.
PAYMENT_SERVICE_REQUEST_IDNUMBERPayment service request Id and it is the foreign key to the table iby_pay_service_requests.
PROCESS_TYPEVARCHAR2Specifies the process by which the payment is built into a payment instruction. Values, from the lookup IBY_PROCESS_TYPES, include STANDARD, IMMEDIATE, and MANUAL.
PAYMENT_STATUSVARCHAR2The status of the Payment. Values are derived from the lookup IBY_PAYMENT_STATUSES. The possible values are CREATED, FORMATTED, TRANSMITTED, VOID_BY_OVERFLOW, REJECTED, FORMATTED, VOID, etc.
PAYMENTS_COMPLETE_FLAGVARCHAR2Y or N flag that indicates if the payment is complete
PAYMENT_FUNCTIONVARCHAR2Function or purpose of the payment. Values from the lookup IBY_PAYMENT_FUNCTIONS include SUPPLIER_PAYMENT, CUSTOMER_REFUNDS, and others.
PAYMENT_AMOUNTNUMBERAmount of the payment
PAYMENT_CURRENCY_CODEVARCHAR2Currency of the payment
BILL_PAYABLE_FLAGVARCHAR2Y or N flag indicating whether a payment is a bill payable, that is, a future dated payment
EXCLUSIVE_PAYMENT_FLAGVARCHAR2Y or N flag indicating whether this payment is made up of a single document payable that was meant to be paid alone
SEPARATE_REMIT_ADVICE_REQ_FLAGVARCHAR2Y or N flag indicating whether a separate remittance advice needs to be generated for a payment.
INTERNAL_BANK_ACCOUNT_IDNUMBERInternal bank account id used for making the payment.
ORG_IDNUMBERUnique internal identifier of the Operating Unit. Validated against HR_OPERATING_UNITS.ORGANIZATION_ID.
ORG_TYPEVARCHAR2Organization type. Values, from the lookup IBY_ORGANIZATION_TYPES Include Operating Unit, Business Group, and Legal Entity
LEGAL_ENTITY_IDNUMBERLegal entity identifier
The PAYMENT_REJECTION_LEVEL_CODE can have the following values which determine how the payment processing will continue when there is a validation failure
Request – Entire PPR is rejected. Oracle Payments raises a business event that calls AP to release the documents. The status of the payment process request and proposed payments is updated to ‘REJECTED’.
Payment – Payments that failed validation are rejected and AP releases the documents that belong to the payment that failed validation. The other payments are accepted. The accepted payments get a status of ‘CREATED’.
None – Payments that failed Validation are set to ‘Failed Validation’ and allows for user intervention. Status of the PPR is set to ‘PENDING REVIEW’
If in the PPR setup, ‘Stop Process for Review After Creation of Proposed Payments’ is enabled, the PPR status is set to ‘Pending Proposed Payment Review’. This status prevents further processing until user takes action. If this option to stop for review is not enabled, the status of the PPR is set to ‘Payments Created’. In this status, payment instruction can be created for the PPR.

Format Payments – Payments

Call IBY_PAYINTSR_PUB, IBY_CHECKNUMBER_PUB
When a PPR is submitted, there are two options
The CREATE_PMT_INSTRUCTIONS_FLAG can be a Y or N
Y – Payment Instruction will be automatically created after payments are created.
N – Application waits for standard request submission for Payment Instruction.
The table IBY_PAYMENT_INSTRUCTIONS_ALL stores the payment instruction information.
If the PPR is setup to automatically submit instruction, the payment_service_request_id will be populated in iby_payment_instructions_all because the instruction will be specific to the PPR In this case, the instruction can be linked to the PPR using PAYMENT_SERVICE_REQUEST_ID
If the PPR processing is setup for the user to submit the instruction as a standard request, then when the instruction is submitted, then the instruction is linked to the PPR through the payments selected by the instruction.
The link in this case will be through iby_payments_all.payment_instruction_id
Key Columns of IBY_PAYMENT_INSTRUCTIONS_ALL table
Payment_instruction_id
Payment_profile_id
Payment_instruction_status
Payments_complete_code
Payment_count
Print_instruction_immed_flag
Transmit_instr_immed_flag
Internal_bank_account_id
Payment_document_id
Payment_date
Payment_reason_code
Payment_currency_code
Format:
The following processing occurs during the format step.
a) Number the payments – Check Numbering
b) Create XML Extract message
c) Pass the extract to XML publisher
d) Oracle XML Publisher (BI publisher) applies the format template
e) BI publisher formats and stores the output
f) Oracle Payments then updates the status of the Payment Instruction and the Payments. If successful, the status of Payments and Instruction is ‘Formatted’.
Print Checks:
a) Users can load stationery into the printer and print checks at this stage.
b) Determine if the checks printed ok. If not reprint
Confirm Payments – Payables
Call AP_PMT_CALLOUT_PKG
Record Print Status of the checks to confirm the payments. Oracle Payments callsap_pmt_callout_pkg.payment_completed to confirm the payments.
This does the following:
a) Assigns sequence/values – Document sequencing.
b) Creates data in AP_CHECKS_ALL with appropriate data from IBY tables.
Checkrun_name = ppr name and checkrun_id = checkrun_id from IBY table.
c) Data inserted into AP_INVOICE_PAYMENTS_ALL for the corresponding checks.
d) AP_PAYMENT_SCHEDULES_ALL for the invoices are updated to indicate the payment details and status.
e) The documents paid in this PPR are released by setting the checkrun_id on the payment schedules to null.
f) AP_INVOICES_ALL is updated to show payment status
g) Data is deleted from the AP_SELECTED_INVOICES_ALL
h) Data is deleted from AP_UNSELECTED_INVOICES_ALL

Saturday, 21 November 2015

AP/AR Netting Setups In R12

What is AP/AR Netting?

Oracle AP/AR Netting allows you to net your Payable  invoice balances against your Receivables invoice balances for those Customers who are also your Suppliers.
For example, If you have a customer who is also your supplier, then rather than him paying you and then you paying him, AP/AR netting allows you to pay the net difference between how much you owe the supplier and how much he owes you.
After establishing a netting agreement with such trading partners, you set up the agreement and the rules associated with it in eBusiness Suite and you can then start to net AP and AR transactions.

Setups for AP/AR Netting:

In Brief

Netting Bank Account

  • ·         Receivables System Options
  • ·         Netting batch
  • ·         Approver Chargeable Subcontracting
  • ·         Netting Agreement
  • ·         Define and Assign Document sequences

In Detail

 Netting Bank Account

Navigation: Payable Manager --> Setup --> Payments --> Bank Accounts

Click on Create button. 

Create a Bank Account, which can be used by the netting process. Set the Netting Account flag to yes.


 Enable Default Settlement Account



Assign this bank account to the seeded Receivables receipt class “AP/AR Netting”

 Navigation: Receivable Manager --> Setup --> Receipts --> Receipts Class.

Query AP/AR Netting and then click on Bank Accounts and assign the Netting bank account.






 Receivables System Options

Check the “Allow payment of unrelated transactions”check box under the Receivables system options, if you
want to create netting agreements across multiple unrelated customers.
  
Navigation: Receivable Manager --> Setup --> System --> System Options.



• Netting batch approver

If approval is required for a netting agreement, the approver must be set up as a contact for the trading
partner (Customer / Supplier). The contact must be setup with an email address.

• Chargeable Subcontracting

Navigation: System administrator --> Profile --> Systems

When the Profile option “Chargeable Subcontracting Enabled” is set to:

Yes – This will select invoices that were matched to purchase orders with outsourced assemblies by the
netting process.
No – This will select invoices that were matched to purchase orders without outsourced assemblies by the
netting process.
D (disregard) – This means all eligible invoices will be selected for netting irrespective of whether or not they
are matched to purchase orders.

• Netting Agreement
Create netting agreement to setup the rules that will decide which transactions are selected for netting and
how they are ordered and processed once selected.

 Navigation: Receivable Manager --> Receipts --> Netting --> Netting Agreement.

Click on Create Agreement. 



Enter the information



click on Next.

Enter Supplier Name and Customer Name

Click on Next and then Finsh.

Define and Assign Document Sequential Numbering.

Define Sequential Numbering:

Navigation: System Administrator --> Application --> Sequential Numbering --> Define.

Assign Document Sequential to categories:

 Navigation: System Administrator --> Application --> Sequential Numbering -->Assign

Document Tab:


Assignment Tab:



Criteria used for Selecting AP Invoices:

• Transaction due date must be less than or equal to AP scheduled payment due date.
• AP scheduled payment due date must be between the Netting Agreement Start Date and End Date.
• Only invoices for the Supplier and supplier sites (if specified) in the agreement are selected.
• Only invoices with the selected invoice types in the agreement are included.
• Operating unit of the invoices must be the same as the operating unit of the batch.
• Invoices must be approved
• Invoices must not be on Hold
• Invoices that have already been included in a batch that is not yet in status ‘Complete’ are not included.
• Locking AP invoices:
o Selected AP invoices are locked by populating AP_PAYMENT_SCHEDULES.Checkrun_id Column
for the selected invoices
o The same Checkrun_id value is populated in FUN_NET_BATCHES.Checkrun_Id for the given batch

Criteria used for Selecting AR Transactions:

• AR Payment Schedule due date must be less than or equal to transaction date mentioned in Netting.
• AR payment schedule date should be between the Agreement Start Date and end date.
• Transactions must be complete
• Only Transactions for customer and customer sites (if specified) in the agreement are selected.
• Only transactions with the selected transaction types in the agreement are included.
• Operating unit of the transactions must be the same as the operating unit of the batch.






• The Receipt method associated with the transaction should not have a Payment_type_code = ‘CREDIT_CARD’
• Transaction must not be in dispute
• Payment schedule status must be open
• Transaction must not be a prepayment (RA_CUSTOMER_TRX.PREPAYMENT_FLAG = ‘N’)


Criteria used for ordering the transactions:
• Invoices and transactions are first ordered by Supplier and Customer priority associated in the agreement.
• They are then ordered by Netting order rule selected in the agreement.
• The priority is important as this determines which transaction/invoice will be netted first.


What happens when we submit a Netting Batch?

The following validations are performed when a netting batch is submitted, as there might be a time lag between when the batch is created and when the batch is submitted. It is also possible that the batch may have been modified.

• If the current date has passed the batch settlement date, then the batch is set to status ‘SUSPENDED’ and the AP invoices are unlocked.
• AP and AR balances for transactions are validated again. If the validation fails then the batch is set to
status ‘ERROR’ and the AP invoices are unlocked.
• If the batch has passed all validations, it is sent for approval, if approval is required, else the settle Netting
batch process is initiated.

How Netting Batches are settled?

• Validation
o The process starts off with the validation of AR transactions. This is necessary as the AR transactions are not locked when the netting batch is created and therefore there is a possibility that the AR transaction may have been modified since it was included in the netting batch
o If any validations fail, the batch is set to Cancelled Status.
o Validations are also performed to check whether the GL, AR, and AP periods are open for the batch
settlement date. If not, then the batch is set to status ‘ERROR’ and an error message is displayed in the
Report log.

• Derive Netting Bank Details

o Netting bank details like bank account name, bank account owner and number are derived based on the
FUN_AGREEMENTS.bank_account_id for the given batch.


Settle AP invoices
o Invoices in each batch are grouped by vendor, vendor site and invoice currency code.
o AP payment APIs are called to process the payments. These APIs return the check id which is
updated in FUN_NET_AP_INVS_ALL.Check_ID

• Settle AR transactions
o AR receipt APIs are called to create and apply the receipts. These APIs return the receipt id which is
updated in FUN_NET_AR_TXNS.RECEIPT_ID
o If all processing goes through successfully then the batch is set to COMPLETE and the AP invoices and
netting agreements are unlocked.

What are various Netting Batch Statuses?

Netting Batch Status                                  Event

RUNNING                                  User creates the netting batch
SELECTED                                 Review Batch option is set to YES
ERROR                                       Error encountered while validating or selecting transactions
SUSPENDED                             Current date has gone passed the batch settlement date
CLEARING                                 Review batch option is set to NO but no approval is required.
SUBMITTED                               Review batch option is set to NO and approval is required.
REJECTED                                  Batch has been reversed
APPROVED                                User approves batch requiring approval
COMPLETE                                Netting process completed for transactions
REVERSING                               User chooses to reverse the batch
REVERSED                                 Batch has been reversed


What tables are involved?

AP/AR Netting engine is owned by ‘Oracle Financials Common Modules’ (FUN) Product. All tables behind the scene will be stored under the FUN schema. Information related to Netting is stored in the following
tables:

Table Name                                                    Table Purpose

FUN_NET_AR_TRX_TYPES_ALL    Netting Agreement – Transaction types of AR

FUN_NET_AP_INV_TYPES_ALL     Netting Agreement – Transaction types of AP

FUN_NET_AGREEMENTS_ALL       Netting Agreement – Details

FUN_NET_SUPPLIERS_ALL             Netting Agreement – Supplier Details

FUN_NET_CUSTOMERS_ALL         Netting Agreement – Customer Details

FUN_NET_BATCHES_ALL                Netting Batch – Details

FUN_NET_AR_TXNS_ALL                Netting Batch – Details of AR transactions

FUN_NET_AP_INVS_AL                    Netting Batch – Details of AP invoices