Purchase Order Receipt details query in Oracle apps

By admin

Purchase Order Receipt details query in Oracle apps
Query to find PO receipts in Oracle EBS R12
po receipts table in oracle apps r12
po receipt oracle apps
po receiving tables in oracle apps r12

SQL Querysql
1SELECT pha.segment1                            "PO#",
2       pla.line_num || '.' || pll.shipment_num "Line-Ship#",
3       pod.distribution_num                    "Distribution#",
4       pll.quantity                            "PO Line_qty_ordered",
5       pod.quantity_ordered                    "Distribution_qty_ordered",
6       plt.line_type                           "Line_Type",
7       pv.vendor_name                          "Vendor Name",
8       msi.segment1                            "Item#",
9       rsh.receipt_num,
10       rt.transaction_id,
11       rt.transaction_type,
12       rt.quantity                             "RCV_quantity",
13       apid.INVOICE_ID,
14       apid.QUANTITY_INVOICED,
15       pod.po_distribution_id,
16       rsh.SHIPMENT_HEADER_ID,
17       RSL.SHIPMENT_LINE_ID,
18       PLL.LINE_LOCATION_ID,
19       pla.PO_HEADER_ID,
20       pla.PO_LINE_ID
21  FROM rcv_transactions                  rt,
22       rcv_shipment_headers              rsh,
23       rcv_shipment_lines                rsl,
24       apps.po_distributions_all         pod,
25       apps.gl_code_combinations         gcc1,
26       apps.gl_code_combinations         gcc2,
27       apps.po_line_locations_all        pll,
28       apps.po_lines_all                 pla,
29       apps.po_line_types_tl             plt,
30       apps.po_releases_all              pra,
31       apps.po_headers_all               pha,
32       apps.po_vendors                   pv,
33       apps.mtl_system_items_b           msi,
34       apps.ap_invoice_distributions_all apid
35 WHERE     rsl.shipment_line_id = rt.shipment_line_id
36       AND rsh.shipment_header_id = rt.shipment_header_id
37       AND rsh.shipment_header_id = rsl.shipment_header_id
38       --AND apid.rcv_transaction_id(+) = rt.transaction_id
39       AND apid.po_distribution_id(+) = pod.po_distribution_id
40       AND NVL (apid.REVERSAL_FLAG, 'N') = 'Y'
41       AND pv.vendor_id = pha.vendor_id
42       AND rt.po_header_id = pha.po_header_id
43       AND rt.po_line_id = pla.po_line_id
44       AND rt.po_line_location_id = pll.line_location_id
45       AND rt.po_distribution_id = pod.po_distribution_id
46       AND gcc1.code_combination_id = pod.code_combination_id
47       AND gcc2.code_combination_id = pod.accrual_account_id
48       AND pod.line_location_id = pll.line_location_id
49       AND pra.po_release_id(+) = pll.po_release_id
50       AND plt.line_type_id = pla.line_type_id
51       AND msi.inventory_item_id = pla.item_id
52       AND msi.organization_id = rt.organization_id
53       AND pll.po_line_id = pla.po_line_id
54       AND pla.po_header_id = pha.po_header_id
55       AND rt.source_document_code = 'PO'
56       AND rt.transaction_type IN ('RECEIVE', 'MATCH')
57       AND pha.type_lookup_code IN ('BLANKET', 'STANDARD', 'PLANNED')
58       AND pll.shipment_type IN ('BLANKET', 'STANDARD', 'SCHEDULED')
59       AND pha.segment1 = '1234'  --Enter PO number here

Related posts: