DBA Data[Home] [Help]

VIEW: APPS.IBE_ORDER_HEADER_ADV_V

Source

View Text - Preformatted

SELECT oh.header_id , oh.order_number , oh.cust_po_number , oh.ordered_date , oh.booked_date , oh.order_category_code , oh.flow_status_code, oel.meaning order_status, oh.source_document_id , oh.orig_sys_document_ref , oh.source_document_type_id , oh.sold_to_org_id, sold_to_party.party_id , sold_to_party.party_name customer_name , inv_acct_site.cust_account_id, inv_site_use.cust_acct_site_id, shp_acct_site.cust_account_id, oh.end_customer_id, oh.AGREEMENT_ID, oh.created_by, oh.org_id org_id FROM oe_order_headers_all oh, hz_cust_accounts sold_to_account, hz_parties sold_to_party, hz_cust_site_uses_all inv_site_use, hz_cust_acct_sites_all inv_acct_site, hz_cust_site_uses_all shp_site_use, hz_cust_acct_sites_all shp_acct_site, oe_lookups oel WHERE oh.sold_to_org_id = sold_to_account.cust_account_id AND sold_to_account.party_id = sold_to_party.party_id AND oh.invoice_to_org_id = inv_site_use.site_use_id(+) AND inv_site_use.cust_acct_site_id = inv_acct_site.cust_acct_site_id(+) AND oh.ship_to_org_id = shp_site_use.site_use_id(+) AND shp_site_use.cust_acct_site_id = shp_acct_site.cust_acct_site_id(+) AND oel.lookup_code = oh.flow_status_code AND oel.lookup_type = 'FLOW_STATUS'
View Text - HTML Formatted

SELECT OH.HEADER_ID
, OH.ORDER_NUMBER
, OH.CUST_PO_NUMBER
, OH.ORDERED_DATE
, OH.BOOKED_DATE
, OH.ORDER_CATEGORY_CODE
, OH.FLOW_STATUS_CODE
, OEL.MEANING ORDER_STATUS
, OH.SOURCE_DOCUMENT_ID
, OH.ORIG_SYS_DOCUMENT_REF
, OH.SOURCE_DOCUMENT_TYPE_ID
, OH.SOLD_TO_ORG_ID
, SOLD_TO_PARTY.PARTY_ID
, SOLD_TO_PARTY.PARTY_NAME CUSTOMER_NAME
, INV_ACCT_SITE.CUST_ACCOUNT_ID
, INV_SITE_USE.CUST_ACCT_SITE_ID
, SHP_ACCT_SITE.CUST_ACCOUNT_ID
, OH.END_CUSTOMER_ID
, OH.AGREEMENT_ID
, OH.CREATED_BY
, OH.ORG_ID ORG_ID
FROM OE_ORDER_HEADERS_ALL OH
, HZ_CUST_ACCOUNTS SOLD_TO_ACCOUNT
, HZ_PARTIES SOLD_TO_PARTY
, HZ_CUST_SITE_USES_ALL INV_SITE_USE
, HZ_CUST_ACCT_SITES_ALL INV_ACCT_SITE
, HZ_CUST_SITE_USES_ALL SHP_SITE_USE
, HZ_CUST_ACCT_SITES_ALL SHP_ACCT_SITE
, OE_LOOKUPS OEL
WHERE OH.SOLD_TO_ORG_ID = SOLD_TO_ACCOUNT.CUST_ACCOUNT_ID
AND SOLD_TO_ACCOUNT.PARTY_ID = SOLD_TO_PARTY.PARTY_ID
AND OH.INVOICE_TO_ORG_ID = INV_SITE_USE.SITE_USE_ID(+)
AND INV_SITE_USE.CUST_ACCT_SITE_ID = INV_ACCT_SITE.CUST_ACCT_SITE_ID(+)
AND OH.SHIP_TO_ORG_ID = SHP_SITE_USE.SITE_USE_ID(+)
AND SHP_SITE_USE.CUST_ACCT_SITE_ID = SHP_ACCT_SITE.CUST_ACCT_SITE_ID(+)
AND OEL.LOOKUP_CODE = OH.FLOW_STATUS_CODE
AND OEL.LOOKUP_TYPE = 'FLOW_STATUS'