PO: Tips and useful Query

Posted on February 11th, 2008 by Sanjit Anand | Print This Post | Email This Post The consultant life while working at client site is not easy during ERP transformation projects, many times it's required to provide some adhoc query for extract to ends users, therefore it is important to have a cheat sheet so that such untimely things can be easily handled in sort span. Hope these query and tips useful to all Inhouse IT personals who is part of Implementation Project team. 1. You need to list out all Internal Requisitions that do not have an associated Internal Sales order. Internal Requisitions without Sales order 2. You want to display what requisition and PO are linked(Relation with Requisition and PO ) Requisition and PO 3. You need to list out all cancel Requisitions Cancel Requisition 4. You need to list those PR which havn't auto created to PO.(Purchase Requisition without a Purchase Order) PR without PO 5. You need to list all information form PR to PO ...as a requisition moved from different stages till converting into PR. This query capture all details related to that PR to PO. PR to PO 6.Identifying all PO's which does not have any PR's PO without Requisition 7. Relation between Requisition and PO tables Here is link: PO_DISTRIBUTIONS_ALL =>PO_HEADER_ID, REQ_DISTRIBUTION_ID PO_HEADERS_ALL=>PO_HEADER_ID, SEGMENT1 PO_REQ_DISTRIBUTIONS_ALL =>DISTRIBUTION_ID, REQUISITION_LINE_ID

invoice and Payment info 10. 8.Distribution ID (from po_distributions_all. The following reference fields are used to capture and keep PO information in the GL_JE_LINES table. Budgetary Records from PO (These include reservations..You need to know the link to GL_JE_LINES table for purchasing accrual and budgetary control actions.segment1) .invoice and Payment Details List PO's with Approval .segment1) REFERENCE_5.segment1 or po_requisition_headers_all.po_distribution_id or po_req_distributions_all.po_header_id or po_requisition_headers_all..Source (PO or REQ) REFERENCE_2.Purchase Order or Requisition number (from po_headers_all.PO_REQUISITION_LINES_ALL =>REQUISITION_LINE_ID) PO_REQUISITION_HEADERS_ALL =>REQUISITION_HEADER_ID. REQUISITION_LINE_ID.requisition_header_id) REFERENCE_3. SEGMENT1 What you have to make a join on PO_DISTRIBUTIONS_ALL (REQ_DISTRIBUTION_ID) and PO_REQ_DISTRIBUTIONS_ALL (DISTRIBUTION_ID) to see if there is a PO for the req.distribution_id) REFERENCE_4.PO Header ID or Requisition Header ID (from po_headers_all.. These reference fields are populated when the Journal source (JE_SOURCE in GL_JE_HEADERS) is Purchasing. These two table keeps the data: • • PO_APPROVAL_LIST_HEADERS PO_APPROVAL_LIST_LINES 9. List all the PO's with there approval .(Autocreated Purchase Orders only) Backing requisition number (from po_requisition_headers_all. reversals and cancellations): • • • • • REFERENCE_1. The budgetary (encumbrance) and accrual actions in the purchasing module generate records that will be imported into GL for the corresponding accrual and budgetary journals.You need to find table which hold PO Approval path.

Thats is possible.Distribution ID (from po_distributions_all.There are different authorization_status can a requisition have.po_distribution_id REFERENCE_4.(ON LINE ACCRUALS ONLY) Receiving Transaction ID (from rcv_receiving_sub_ledger.PO Header ID (from po_headers_all.Get po_header_id first and run each query and then analyze the data.rcv_transaction_id) Take a note for Period end accruals.Source (PO) REFERENCE_2. so what you have to do is to analyze which stage it stucked. 13. Navigate to RFQ -> Auto create -> enter a PO and reference it back.segment1) REFERENCE_5.po_header_id) REFERENCE_3. select * from po_headers_all where po_header_id =<po_header_id>.For better understanding this is splited into 5 major stages. 14. • • • • • • Approved Cancelled In Process Incomplete Pre-Approved Rejected and you should note: When we finally close the requisition from Requisition Summary form the authorization_status of the requisition does not change. po_lines_all . I want to debug for a PO . Stage 1: PO Creation : PO_HEADERS_ALL select po_header_id from po_headers_all where segment1 =<po_number>. your PO get stuck somewhere.Purchase Order number (from po_headers_all. Instead it's closed_code becomes 'FINALLY CLOSED'. the REFERENCE_5 column is not used. 11. List me all open PO's List me all Open PO'S 12. A standard Quotations one that you can tie back to a PO. where should I start.Accrual Records from PO: • • • • • REFERENCE_1.

RCV_SUB_LEDGER_DETAILS . po_line_locations_all select * from po_line_locations_all where po_header_id =<po_header_id>. RCV_RECEIVING_SUB_LEDGER select * from rcv_receiving_sub_ledger where rcv_transaction_id in (select transaction_id from rcv_transactions where po_header_id =<po_header_id>). RCV_SHIPMENT_LINES select * from rcv_shipment_lines where po_header_id =<po_header_id>. RCV_TRANSACTIONS select * from rcv_transactions where po_header_id =<po_header_id>. RCV_ACCOUNTING_EVENTS SELECT * FROM rcv_Accounting_Events WHERE rcv_transaction_id IN (select transaction_id from rcv_transactions where po_header_id =<po_header_id>).select * from po_lines_all where po_header_id =<po_header_id>. po_distributions_all select * from po_distributions_all where po_header_id =<po_header_id>. Stage 2: Once PO is received data is moved to respective receving tables and inventory tables RCV_SHIPMENT_HEADERS select * from rcv_shipment_headers where shipment_header_id in (select shipment_header_id from rcv_shipment_lines where po_header_id =<po_header_id>). po_releases_all SELECT * FROM po_releases_all WHERE po_header_id =<po_header_id>.

Stage 3: Invoicing details AP_INVOICE_DISTRIBUTIONS_ALL select * from ap_invoice_distributions_all where po_distribution_id in ( select po_distribution_id from po_distributions_all where po_header_id =<po_header_id>). MTL_TRANSACTION_ACCOUNTS select * from mtl_transaction_accounts where transaction_id in ( select transaction_id from mtl_material_transactions where transaction_source_id = =<po_header_id>).. GL_BC_PACKETS .This is for encumbrances SELECT * FROM gl_bc_packets WHERE reference2 IN ('<po_header_id>'). Stage 4 : Many Time there is tie up with Project related PO PA_EXPENDITURE_ITEMS_ALL select * from pa_expenditure_items_all peia where peia. Stage 5 : General Ledger Prompt 17. MTL_MATERIAL_TRANSACTIONS select * from mtl_material_transactions where transaction_source_id =<po_header_id>. AP_INVOICES_ALL select * from ap_invoices_all where invoice_id in (select invoice_id from ap_invoice_distributions_all where po_distribution_id in ( select po_distribution_id from po_distributions_all where po_header_id =<po_header_id>)).select * from rcv_sub_ledger_details where rcv_transaction_id in (select transaction_id from rcv_transactions where po_header_id =<po_header_id>).orig_transaction_reference in ( select to_char(transaction_id) from mtl_material_transactions where transaction_source_id = <po_header_id> ). GL_INTERFACE SELECT * FROM GL_INTERFACE GLI WHERE user_je_source_name ='Purchasing' .

rcv_transaction_id in (select transaction_id from rcv_transactions where po_header_id =<po_header_id>)) Feel free to share or comment.rcv_transaction_id in (select transaction_id from rcv_transactions where po_header_id <po_header_id>)).reference22 =RRSL. thanks once again .reference_2 =RRSL.. Sanjit Anand Says: February 12th.reference2 AND GLIR.reference24 =RRSL.reference_3 =RRSL. 2008 at 11:23 pm Thanks Ahmad.com/ 1.reference23 =RRSL. http://oracleebusinesssuite. For correcting me some typo.reference3 AND GLI.wordpress.reference3 AND GLIR.reference4 AND RRSL.reference_4 =RRSL. GL_IMPORT_REFERENCES SELECT * FROM gl_import_references GLIR WHERE reference_1='PO' AND gl_sl_link_table ='RSL' AND EXISTS ( SELECT 1 FROM rcv_receiving_sub_ledger RRSL WHERE GLIR.I am really struggling with WordPress editor.reference4 AND RRSL. which seems there spell check does not working properly.AND gl_sl_link_table ='RSL' AND reference21='PO' AND EXISTS ( SELECT 1 FROM rcv_receiving_sub_ledger RRSL WHERE GLI.reference2 AND GLI.

Sign up to vote on this title
UsefulNot useful