Oracle Ebs-sql (PO-4): Check purchase order details. SQL

Source: Internet
Author: User

SELECT

Pha. SEGMENT1 Order number,

Pha.approved_flag Approval Status,

Pha.closed_code Order off status,

Pha.comments Order Description,

Pvs.vendor_site_code Suppliers Location,

PLA. Line_num order lines,

Plla.need_by_date Commitment Date,

Plla.promised_date Demand Date,

PLA. Closed_code Line State,

Msi. SEGMENT1 Material Code,

Msi. DESCRIPTION description,

PLA. QUANTITY order line Quantity,

Plla.shipment_num Hair Run,

PLLA. Closed_code Shipment Status,

PLLA. QUANTITY Number of runs,

Pda.distribution_num allocation lines,

Pda.quantity_ordered the number of allocated rows,

pda.quantity_billed Order Quantity,

pda.quantity_delivered Receive Quantity,

Plla.attribute1

From PO. Po_lines_all PLA,

PO. Po_headers_all PHA,

INV. Mtl_system_items_b MSI,

Po.po_vendors PV,

Po.po_vendor_sites_all PVs,

Po. Po_distributions_archive_all PDA,

Po.po_line_locations_all PLLA

WHERE PLA. Po_header_id=pha. PO_HEADER_ID and PLA. Item_id=msi. inventory_item_id

and msi.organization_id=x

and pha.org_id=y

and pha.org_id=pla.org_id

and PLLA. Po_header_id=pla. po_header_id

and PLLA. Po_line_id=pla. po_line_id

--and (PLLA. QUANTITY =0 or pla.quantity=0)

and pha.vendor_id=pv.vendor_id

and pv.vendor_id=pvs.vendor_id

and pda.po_header_id (+) =plla.po_header_id

and pda.po_line_id (+) =plla.po_line_id

and pda.line_location_id (+) =plla.line_location_id

and pda.org_id (+) =plla.org_id

and plla.org_id=pla.org_id

--and trunc (plla.promised_date) between to_date (' 20**-01-01 ', ' yyyy-mm-dd ') and to_date (' 20**-01-31 ', ' yyyy-mm-dd ')

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.