Tuesday, July 17, 2012



How to enable and retrieve FND debug log messages [ID 433199.1] Free Hit Counters 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 = < request_id > 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 > &max_log_from_step2 ORDER BY log_sequence; Or you may select all columns with: SELECT * FROM fnd_log_messages WHERE log_sequence > &max_log_from_step2 ORDER BY log_sequence;

Thursday, June 21, 2012

P2P Tables


REQUISITIONS: SELECT * FROM PO_REQUISITION_HEADERS_ALL WHERE TYPE_LOOKUP_CODE='PURCHASE' AND TRUNC (CREATION_DATE) =TRUNC (SYSDATE) SELECT * FROM PO_REQUISITION_LINES_ALL WHERE TRUNC(CREATION_DATE)=TRUNC(SYSDATE) SELECT * FROM PO_REQ_DISTRIBUTIONS_ALL WHERE TRUNC(CREATION_DATE)=TRUNC(SYSDATE)
RFQ  SELECT * FROM PO_HEADERS_ALL WHERE TYPE_LOOKUP_CODE='RFQ' AND QUOTE_TYPE_LOOKUP_CODE='BID' AND TRUNC(CREATION_DATE)=TRUNC(SYSDATE) SELECT * FROM PO_LINES_ALL WHERE PO_HEADER_ID=110306 SELECT * FROM PO_LINE_LOCATIONS_ALL WHERE PO_HEADER_ID=110306
 QUOTATION SELECT * FROM PO_HEADERS_ALL WHERE TYPE_LOOKUP_CODE='QUOTATION' AND QUOTE_TYPE_LOOKUP_CODE='BID' AND TRUNC(CREATION_DATE)=TRUNC(SYSDATE) SELECT * FROM PO_LINES_ALL WHERE PO_HEADER_ID=110307 SELECT * FROM PO_LINE_LOCATIONS_ALL WHERE PO_HEADER_ID=110307
PURCHASE ORDER SELECT * FROM PO_HEADERS_ALL WHERE TYPE_LOOKUP_CODE='STANDARD' AND SEGMENT1='6025' SELECT * FROM PO_LINES_ALL WHERE PO_HEADER_ID=110308 SELECT * FROM PO_LINE_LOCATIONS_ALL WHERE PO_HEADER_ID=110308 SELECT * FROM PO_DISTRIBUTIONS_ALL WHERE PO_HEADER_ID=110308
 INVOICES SELECT * FROM AP_INVOICES_ALL WHERE INVOICE_NUM='1234' SELECT * FROM AP_INVOICE_LINES_ALL WHERE INVOICE_ID=211300 SELECT * FROM AP_INVOICE_DISTRIBUTIONS_ALL WHERE PO_DISTRIBUTION_ID IN(270850,270851) (OR) SELECT * FROM AP_INVOICE_DISTRIBUTIONS_ALL WHERE INVOICE_ID=211300
PAYMENT SELECT * FROM AP_INVOICE_PAYMENTS_ALL WHERE INVOICE_ID=211300 SELECT * FROM AP_PAYMENT_SCHEDULES_ALL WHERE INVOICE_ID=211300 SELECT * FROM AP_CHECKS_ALL WHERE CHECK_NUMBER=6396 SELECT * FROM AP_CHECK_FORMATS SELECT * FROM AP_PAYMENT_HISTORY_ALL WHERE CHECK_ID=77530 SELECT * FROM AP_BANK_ACCOUNTS_ALL SELECT * FROM AP_BANK_BRANCHES SELECT * FROM AP_TERMS_TL WHERE TERM_ID='10002' SELECT * FROM AP_TERMS_LINES WHERE TERM_ID='10002' SELECT * FROM AP_HOLDS_ALL