Tuesday, May 9, 2017

Conditions Causing Invoice Not Selected for payment PPR issue R12


Why invoices are not picked for payment  by ppr 

The following is a checklist and description of conditions that prevent an
invoice from being selected for payment.  You can use this bulletin to
investigate why your invoice may not be getting paid.

CHECKLIST OF CONDITIONS:

    o Is the invoice approved?
    o Is there a hold on the invoice?
    o Is the invoice due?
    o Is the invoice currently selected in another payment batch?
    o Does the payment method (i.e., check) match the payment method in
      the invoice?
    o Does payment currency you requested match the invoice currency?
    o Has the invoice already been paid?
    o Is the invoice for $0? (not selected by Autoselect and Quickcheck)
    o Does the invoice match criteria specified in the payment batch?
      (Paygroup, Minimum or Maximum amounts, Payment Priority ...)

DESCRIPTION OF CONDITIONS:

a. Invoice has not been approved.
    o An invoice MUST be approved in order to be paid.
    o Remember that an invoice must be re-approved if it has been modified.
      (This is important to remember if you rely on a daily autoapproval
      batch)
    o You can verify that an invoice is approved by running the following
      SQL script. (The vendor_id is included in case you have an invoice
      number that is used by more than one vendor)

         select   aid.match_status_flag, ah.hold_lookup_code,
                  ah.release_lookup_code, ai.vendor_id
         from     ap_invoices ai, ap_invoice_distributions aid, ap_holds ah
         where    ai.invoice_id = aid.invoice_id
         and      ah.invoice_id(+) = ai.invoice_id
         and      ai.invoice_num = '&invoice_number'

      The invoice is approved if the line(s) that are returned have:
         1. match_status_flag = 'A'
         2. match_status_flag = 'T', and also has a release_lookup_code

b. A hold is preventing payment of the invoice. (Character Mode)

    o There are the 3 types of holds that can prevent payment and where to
      check if there is a hold on your invoice.
    o Invoice Hold:
      \Navigate Invoice Entry: 'Active Holds' field
      \Navigate Invoice Inquiry: 'On Hold' field
    o Payment Schedule Hold:
      \Navigate Invoice Update PaymentSchedule: 'On Hold' field
      \Navigate Invoice Entry: Payment Option, 'On Hold' field
    o Vendor Hold:
      \Navigate Vendor Entry: Payment Option, 'Hold All Payments' and
      'Hold Future Invoices' fields

c. The invoice is not due yet. Ensure that the Due Date found on the Scheduled 
   Payment window for the invoice is on or after the Payment Date in order for 
   the payment batch to pick up the invoice.  This Due Date is calculated based 
   on the Payment Terms and Terms Date entered on the invoice.

d. Invoice has already been selected for payment in a payment batch.
    o Payables prevents you from paying an invoice which has already been
      selected for payment.
    o Check \Navigate Payments Automatic Modify to see if there is an existing
      payment batch, if so, query on the vendor to see if the invoice has been
      selected.

e. Payment method for payment request does not match payment method for
   invoice
    o The value in the 'Payment Method' field in the Detail options zone of
      \Navigate Invoice Entry must match the 'Payment Method' for the payment
       request.
    o Check the 'Payment Method' field for Autoselect Payments.
    o Check the 'Payment Method' for the chosen Payment Document for Manual or
      QuickCheck payments.
    o Example: Payment Method for the invoice is 'EFT', but you are doing a
      payment request for 'Check'

f. Payment request currency does not match the invoice currency.
    o The Invoice currency and Payment Request currency must be the same.
    o Make sure the currency used on the invoices matches the currency for the
      payment format you are using.  If the payment format is to handle a 
      currency other than the functional currency, the field "Multiple" 
      under the Currency region must be checked.

g. Invoice has already been paid.
    o You cannot fully pay an invoice twice.
    o Check \Navigate Invoice Inquiry, 'Paid' field.

h. Invoice is for $0 (AutoSelect and QuickCheck payment methods only)
    o AutoSelect and QuickCheck will not select $0 invoices.
    o You can record a $0 invoice as paid in \Navigate Payments Manual

i. Invoice does not match payment criteria (AutoSelect only)
    o The invoice must match the criteria you select when you run AutoSelect.
      If used, the following criteria may prevent your invoice from being
      selected.
    o Minimum and Maximum payment amounts.
    o Is your invoice above the minimum and below the maximum amounts?
    o PayGroup.
    o Is your invoice in the PayGroup selected?
    o Pay Through Date.
    o Is the date used greater than or equal to the Due Date for the
      invoice? (Check the Invoice Payment Schedule)
    o Priority Range.
    o Did you specify a range other than the default '1 - 99'?
      If so, is your invoice's payment priority in the range?

Wednesday, May 3, 2017

How to enable FND Debug Log in oracle apps r12

What is FND Debug Log ?


  1. It helps you pinpoint the cause of error in standard Oracle Code, by making debug messages to appear in a centralized table named FND_LOG_MESSAGES
  2. You can design and build your custom extensions in a manner that can easily be debugged. This can be done by calling Oracle delivered API’s in your custom code. 

 A program written in any technology, either form, report, PL/SQL, java concurrent program, OAF has their debug message stored in FND_LOG_MESSAGES.

How does this work? 

How to use FND debug Log to pinpoint the error?

Step 1: Set up profiles for the User / Responsibility to be used to reproduce the issue

FND: Debug Log Enabled -> YES This turns the debugging feature on
FND: Debug Log Filename -> NULL Use when you want debug messages to get stored to a file FND: Debug Log Level -> STATEMENT
FND: Debug log module -> %
If the error pertains to a specific module use the application short name.
Ex: For receivable use FND: Debug log module -> ar%

Log into the Oracle application

Step 2: Since the debugging routine will start writing messages to the table, we want to know which messages pertain to our test. If you are tracking the debug messages for a concurrent request, note down the Concurrent Request id. Otherwise, note down current max value of log sequence retrieved as follows :

SELECT MAX(LOG_SEQUENCE) FROM FND_LOG_MESSAGE 

Step 3: Run the test case, avoiding extraneous steps to avoid stacking the table.

Step 4:

a) For a concurrent process:

  SELECT LOG.module, LOG.MESSAGE_TEXT MESSAGE
    FROM fnd_log_messages LOG, fnd_log_transaction_context con
   WHERE     request_id = <Conc Req ID>
         AND con.transaction_type = 'REQUEST'
         AND con.transaction_context_id = LOG.transaction_context_id
ORDER BY LOG.log_sequence;


b) For any other debugging:

SELECT module, MESSAGE_TEXT
  FROM fnd_log_messages
 WHERE log_sequence = (SELECT MAX (LOG_SEQUENCE) FROM FND_LOG_MESSAGE);


 Obtaining the log messages via Oracle Application:

1) Query Profile: %FND%DEBUG%



2) Set the FND: Debug Log Enabled: Yes



3) System Administrator > Help > Debug Logging > View


4) set the values and run any concurrent program
5) Then navigate to the above screen and download the complete fnd log messages report by exporting as a CSV.

How to enable and retrieve FND debug log messages [ID 433199.1]



Starting in 11.5.10, FND has incorporated a debugging technique to enable debug messages to get stored into the table FND_LOG_MESSAGES. This method was introduced in 11.5.10 and it is available in subsequent releases. This note gives simple steps on how to enable and retrieve the debug messages.

This method will pick up *all* debug messages from a particular log_sequence value. As such, it is particularly useful when you are having trouble retrieving the debug messages associated to a particular concurrent request, or user. However, if there are multiple users with FND debugging enabled running various processes, you could end up picking up debug messages pertaining to their activities.
Solution
1) set up profiles for the User / Responsibility to be used to reproduce the issue

Profile Name     Suggested value     Comments
FND: Debug Log Enabled     YES     This turns the debugging feature on
FND: Debug Log Filename      NULL     Use when you want debug messages to get stored to a file
FND: Debug Log Level     STATEMENT   

Following are options listed from least to most detailed debugging :

Unexpected, Error, Exception, Event, Procedure, Statement

FND: Debug Log Module
    %   

Indicate what modules to debug. You can use something like 'ar%' or even  '%arp_rounding%' to limit modules debugged

Following are examples on how you would set the above profiles depending on what you want to debug :

sample setting to debug everything :

FND: Debug Log Enabled YES
FND: Debug Log Filename NULL
FND: Debug Log Level STATEMENT
FND: Debug Log Module %

sample setting to debug ONLY Receivables :

FND: Debug Log Enabled YES
FND: Debug Log Filename NULL
FND: Debug Log Level STATEMENT
FND: Debug Log Module ar%

2) Since the debugging routine will start writing messages to the table, we want to know which messages pertain to our test. If you are tracking the debug messages for a concurrent request, note down the Concurrent Request id. Otherwise, note down current max value of log sequence retrieved as follows :

SELECT MAX(LOG_SEQUENCE)
FROM FND_LOG_MESSAGES

3) Run your test case, try to stay on track in reproducing the issue and leave out extraneous steps so that you don't end up with debug messages that are not relevant to your issue. It is ideal to not have anyone else using the Responsibility you have enabled debug for, so that only messages pertaining to your testcase are picked up.

4) For ease of review by Development, spool the output of the following to a .xls spreadsheet :

a) If you are debugging a concurrent process :

SELECT log.module , log.message_text message
FROM fnd_log_messages log,
            fnd_log_transaction_context con
WHERE con.transaction_id = &lt; request_id &gt;
AND con.transaction_type = 'REQUEST'
AND con.transaction_context_id = log.transaction_context_id
ORDER BY log.log_sequence;

b) Otherwise,

SELECT module, message_text
FROM fnd_log_messages
WHERE log_sequence &gt; &amp;max_log_from_step2
ORDER BY log_sequence;

Or you may select all columns with:

SELECT * FROM fnd_log_messages
WHERE log_sequence &gt; &amp;max_log_from_step2
ORDER BY log_sequence;

How to improve blog performance

Improving the performance of a blog can involve a variety of strategies, including optimizing the website's technical infrastructure, im...