o2c imp tables.docx
Post on 04-Jun-2018
230 Views
Preview:
TRANSCRIPT
-
8/14/2019 O2C IMP TABLES.docx
1/37
*************************** Imp
Table********************************************
1)study report query
2)_check flwxfild query in toy folder
*****************************************************
select * from oe_order_headers_all where order_number=66407
select * from oe_order_lines_all where header_id=193361
select * from oe_order_lines_all
select * from oe_transaction_types_tl where TRANSACTION_TYPE_ID=1437
select * from qp_list_headers_all where LIST_HEADER_ID=1000
-- imp tables in sales order from
select * from mtl_parameters where organization_id=207
-- imp tables in sales order from
select ship_to_location_i from mtl_parameters where organization_id=207
select * from org_organization_definitions where organization_id=1424
-
8/14/2019 O2C IMP TABLES.docx
2/37
select * from ra_customers
select * from hz_parties where
select distinct party_type from hz_parties
select * from hz_cust_acct_sites_All where cust_acct_site_id=1340--2
select * from hz_cust_site_uses_all where site_use_id=1425--3
select * from hz_party_sites where party_site_id=1340--1
select * from hz_parties where party_id=1290 --0
select * from wsh_carrier_ship_methods where SHIP_METHOD_CODE='DHL'
select * from ra_salesreps_all where salesrep_id=1006
select * from hz_cust_accounts --where CUST_ACCOUNT_ID=1143
-
8/14/2019 O2C IMP TABLES.docx
3/37
select * from hz_parties where party_number='1143'
select * from oe_order_lines_all WHERE HEADER_ID=193361
*****************************************************************************
*
30/10/13
select * from oe_order_headers_all where header_id=93000
select * from oe_order_lines_all where line_id=392293
select line_type_id from oe_order_lines_all where line_id=392293
select * from oe_order_lines_all
select * from oe_transaction_types_tl where TRANSACTION_TYPE_ID=1437
select * from qp_list_headers_all where LIST_HEADER_ID=1000
-
8/14/2019 O2C IMP TABLES.docx
4/37
-- imp tables in sales order from
select * from mtl_parameters where organization_id=207
-- imp tables in sales order from
select ship_to_location_i from mtl_parameters where organization_id=207
select * from org_organization_definitions where organization_id=1424
select * from ra_customers
select * from hz_parties where
select distinct party_type from hz_parties
select * from hz_cust_acct_sites_All where cust_acct_site_id=1340--2
select * from hz_cust_site_uses_all where site_use_id=1425--3
select * from hz_party_sites where party_site_id=1340--1
-
8/14/2019 O2C IMP TABLES.docx
5/37
select * from hz_parties where party_id=1290 --0
select * from wsh_carrier_ship_methods where SHIP_METHOD_CODE='DHL'
select * from ra_salesreps_all where salesrep_id=1006
select * from hz_cust_accounts --where CUST_ACCOUNT_ID=1143
select * from hz_parties where party_number='1143'
select * from oe_order_lines_all WHERE HEADER_ID=193361
select * from oe_transaction_types_tl where transaction_type_id=1427--where
name like 'R%'
select * from mtl_uom_conversions
select * from mtl_system_items
select *
-
8/14/2019 O2C IMP TABLES.docx
6/37
from mtl_items_types
select * from fnd_lookup_values
OE_PRICE_LIST_LINES
select distinct source_code from wsh_delivery_details --where
source_line_id=392293
select * from fnd_lookup_values --where lookup_type='SOURCE_CODE'
select * from oe_lookups --where lookup_type='SOURCE_CODE'
select * from wsh_delivery_details where source_line_id=392293
select * from hz_locations where location_id=1107
select * from wsh_carrier_ship_methods where carrier_id=12521
select requested_quantity from wsh_carrier_ship_methods where
carrier_id=12521
select * from wsh_delivery_details
-
8/14/2019 O2C IMP TABLES.docx
7/37
select * from wsh_delivery_assignments
select * from wsh_new_deliveries where delivery_id=1000
select requested_quantity,SHIPPED_QUANTITY from wsh_delivery_details
select * from hr_locations where location_id=109k0
select * from hz_locations where location_id=1090
select * from mtl_onhand_quantities_detail
select * from mtl_secondary_inventories
select * from MTL_RESERVATIONS --where DEMAND_SOURCE_LINE_ID=392293
ra_interface_lines_all
select * from mtl_demand where INVENTORY_ITEM_ID=199
select * from mtl_reservations
select * from mtl_transaction_accounts where INVENTORY_ITEM_ID=199
select * from ra_interface_lines_all
-
8/14/2019 O2C IMP TABLES.docx
8/37
select * from ra_customer_trx_lines_all
******************************************************************
31-10-13
AS SINGLE QUERY FOR O2C
select header_id,flow_status_code,open_flag,booked_flag fromoe_order_headers_all where order_number=66409
select line_id,line_number,flow_status_code,open_flag,bookeD_flag from
oe_order_lines_all where header_id=195322
select DELIVERY_DETAIL_ID,RELEASED_STATUS from wsh_delivery_details where
source_line_id=394283
select DELIVERY_DETAIL_ID,RELEASED_STATUS from wsh_delivery_details where
source_line_id=394284
select DELIVERY_ASSIGNMENT_ID, DELIVERY_ID from wsh_delivery_assignments
where DELIVERY_DETAIL_ID=3965467
select DELIVERY_ASSIGNMENT_ID, DELIVERY_ID from wsh_delivery_assignments
where DELIVERY_DETAIL_ID=3965468
-
8/14/2019 O2C IMP TABLES.docx
9/37
select * from wsh_new_deliveries where delivery_id=3776372
select * from mtl_demand where DEMAND_SOURCE_LINE=394283
select * from mtl_demand where DEMAND_SOURCE_LINE=394284
SELECT * FROM MTL_ONHAND_QUANTITIES_DETAIL WHERE INVENTORY_ITEM_ID=199 AND
ORGANIZATION_ID=207
SELECT * FROM MTL_RESERVATIONS WHERE INVENTORY_ITEM_ID=199 AND
ORGANIZATion_id=207
SELECT * FROM MTL_MATERIAL_TRANSACTIONS -- SOURCE_LINE_ID=394283 AND
ORGANIZATION_ID=207
SELECT * FROM MTL_MATERIAL_TRANSACTIONS_TEMP
SELECT * FROM MTL_TXN_REQUEST_HEADERS --WHERE
SELECT * FROM MTL_TXN_REQUEST_HEADERS WHERE REQUEST_NUMBER='1289893'
SELECT * FROM MTL_TXN_REQUEST_LINES WHERE HEADER_ID=3906032
SELECT * FROM MTL_TXN_REQUEST_LINES WHERE TXN_SOURCE_LINE_ID=394283
-
8/14/2019 O2C IMP TABLES.docx
10/37
select * from mtl_material_transactions where trx_SOURCE_LINE_ID=394283
select * from mtl_transaction_types where TRANSACTION_TYPE_ID=33
select * from mtl_serial_numbers
select * from mfg_lookups where
lookup_type like 'MTL_SERIAL_NUMBER%'
select * from ra_interface_lines_all where SALES_ORDER_LINE=394283
select * from ra_interface_lines_all where sales_order='66409'
select * from ra_customer_trx_lines_all where
INTERFACE_LINE_ATTRIBUTE1='66409'
select * from ra_customer_trx_all where CUSTOMER_TRX_ID=758704
1271489
-
8/14/2019 O2C IMP TABLES.docx
11/37
SELECT * FROM AR_RECEIVABLE_APPLICATIONS_ALL WHERE
APPLIED_CUSTOMER_TRX_ID=758704 --CISTOMER_TRX_ID
CASH_RECEIPT_ID
SELECT * FROM AR_CASH_RECEIPTS_ALL WHERE RECEIPT_NUMBER=10101'
************************************
select * from oe_order_headers_all where header_id=93000
select * from oe_order_lines_all where line_id=392293
select line_type_id from oe_order_lines_all where line_id=392293
select * from oe_order_lines_all
select * from oe_transaction_types_tl where TRANSACTION_TYPE_ID=1437
select * from qp_list_headers_all where LIST_HEADER_ID=1000
-- imp tables in sales order from
select * from mtl_parameters where organization_id=207
-
8/14/2019 O2C IMP TABLES.docx
12/37
-- imp tables in sales order from
select ship_to_location_i from mtl_parameters where organization_id=207
select * from org_organization_definitions where organization_id=1424
select * from ra_customers
select * from hz_parties where
select distinct party_type from hz_parties
select * from hz_cust_acct_sites_All where cust_acct_site_id=1340--2
select * from hz_cust_site_uses_all where site_use_id=1425--3
select * from hz_party_sites where party_site_id=1340--1
select * from hz_parties where party_id=1290 --0
select * from wsh_carrier_ship_methods where SHIP_METHOD_CODE='DHL'
-
8/14/2019 O2C IMP TABLES.docx
13/37
-
8/14/2019 O2C IMP TABLES.docx
14/37
select distinct source_code from wsh_delivery_details --where
source_line_id=392293
select * from fnd_lookup_values --where lookup_type='SOURCE_CODE'
select * from oe_lookups --where lookup_type='SOURCE_CODE'
select * from wsh_delivery_details where source_line_id=392293
select * from hz_locations where location_id=1107
select * from wsh_carrier_ship_methods where carrier_id=12521
select requested_quantity from wsh_carrier_ship_methods wherecarrier_id=12521
select * from wsh_delivery_details
select * from wsh_delivery_assignments
select * from wsh_new_deliveries where delivery_id=1000
select requested_quantity,SHIPPED_QUANTITY from wsh_delivery_details
-
8/14/2019 O2C IMP TABLES.docx
15/37
select * from hr_locations where location_id=109k0
select * from hz_locations where location_id=1090
select * from mtl_onhand_quantities_detail
select * from mtl_secondary_inventories
select * from MTL_RESERVATIONS --where DEMAND_SOURCE_LINE_ID=392293
ra_interface_lines_all
select * from mtl_demand where INVENTORY_ITEM_ID=199
select * from mtl_reservations
select * from mtl_transaction_accounts where INVENTORY_ITEM_ID=199
select * from ra_interface_lines_all
select * from ra_customer_trx_lines_all
******
-
8/14/2019 O2C IMP TABLES.docx
16/37
select onh.tran_qty - (res.res_qty + onh_sec.sec_tra_qty) UNRESERVED_ITEM,
tran_qty,res_qty,sec_tra_qty FROM
(SELECT SUM(nvl(transaction_quantity,0)) tran_qty
FROM
MTL_ONHAND_QUANTITIES_DETAIL
WHERE
inventory_item_id = :P_INV
AND organization_id = :ORG_ID) ONH
,
(SELECT SUM(nvl(RESERVATION_QUANTITY,0)) res_qty
FROM MTL_RESERVATIONS
WHERE inventory_item_id = :P_INV
AND organization_id = :ORG_ID) RES,
(SELECT SUM(nvl(transaction_quantity,0)) sec_tra_qty
FROM
MTL_ONHAND_QUANTITIES_DETAIL
WHERE inventory_item_id = :P_INV
AND organization_id = :ORG_ID
AND subinventory_code IN (SELECT SECONDARY_INVENTORY_NAME
FROM
MTL_SECONDARY_INVENTORIES
WHERE organization_id = :ORG_ID
-
8/14/2019 O2C IMP TABLES.docx
17/37
AND RESERVABLE_TYPE = '2')) ONH_SEC
--select * from fnd_lookups where lookup_type='RESERVABLE_TYPE'
*************************
1)study report query
2)_check flwxfild query in toy folder
*****************************************************
select * from oe_order_headers_all where order_number=66407
select * from oe_order_lines_all where header_id=193361
select * from oe_order_lines_all
select * from oe_transaction_types_tl where TRANSACTION_TYPE_ID=1437
select * from qp_list_headers_all where LIST_HEADER_ID=1000
-- imp tables in sales order from
-
8/14/2019 O2C IMP TABLES.docx
18/37
select * from mtl_parameters where organization_id=207
-- imp tables in sales order from
select ship_to_location_i from mtl_parameters where organization_id=207
select * from org_organization_definitions where organization_id=1424
select * from ra_customers
select * from hz_parties where
select distinct party_type from hz_parties
select * from hz_cust_acct_sites_All where cust_acct_site_id=1340--2
select * from hz_cust_site_uses_all where site_use_id=1425--3
select * from hz_party_sites where party_site_id=1340--1
-
8/14/2019 O2C IMP TABLES.docx
19/37
select * from hz_parties where party_id=1290 --0
select * from wsh_carrier_ship_methods where SHIP_METHOD_CODE='DHL'
select * from ra_salesreps_all where salesrep_id=1006
select * from hz_cust_accounts --where CUST_ACCOUNT_ID=1143
select * from hz_parties where party_number='1143'
select * from oe_order_lines_all WHERE HEADER_ID=193361
*****************************************************************************
*
30/10/13
select * from oe_order_headers_all where header_id=93000
select * from oe_order_lines_all where line_id=392293
select line_type_id from oe_order_lines_all where line_id=392293
-
8/14/2019 O2C IMP TABLES.docx
20/37
select * from oe_order_lines_all
select * from oe_transaction_types_tl where TRANSACTION_TYPE_ID=1437
select * from qp_list_headers_all where LIST_HEADER_ID=1000
-- imp tables in sales order from
select * from mtl_parameters where organization_id=207
-- imp tables in sales order from
select ship_to_location_i from mtl_parameters where organization_id=207
select * from org_organization_definitions where organization_id=1424
select * from ra_customers
select * from hz_parties where
select distinct party_type from hz_parties
-
8/14/2019 O2C IMP TABLES.docx
21/37
select * from hz_cust_acct_sites_All where cust_acct_site_id=1340--2
select * from hz_cust_site_uses_all where site_use_id=1425--3
select * from hz_party_sites where party_site_id=1340--1
select * from hz_parties where party_id=1290 --0
select * from wsh_carrier_ship_methods where SHIP_METHOD_CODE='DHL'
select * from ra_salesreps_all where salesrep_id=1006
select * from hz_cust_accounts --where CUST_ACCOUNT_ID=1143
select * from hz_parties where party_number='1143'
select * from oe_order_lines_all WHERE HEADER_ID=193361
-
8/14/2019 O2C IMP TABLES.docx
22/37
-
8/14/2019 O2C IMP TABLES.docx
23/37
select * from hz_locations where location_id=1107
select * from wsh_carrier_ship_methods where carrier_id=12521
select requested_quantity from wsh_carrier_ship_methods where
carrier_id=12521
select * from wsh_delivery_details
select * from wsh_delivery_assignments
select * from wsh_new_deliveries where delivery_id=1000
select requested_quantity,SHIPPED_QUANTITY from wsh_delivery_details
select * from hr_locations where location_id=109k0
select * from hz_locations where location_id=1090
select * from mtl_onhand_quantities_detail
select * from mtl_secondary_inventories
select * from MTL_RESERVATIONS --where DEMAND_SOURCE_LINE_ID=392293
ra_interface_lines_all
-
8/14/2019 O2C IMP TABLES.docx
24/37
select * from mtl_demand where INVENTORY_ITEM_ID=199
select * from mtl_reservations
select * from mtl_transaction_accounts where INVENTORY_ITEM_ID=199
select * from ra_interface_lines_all
select * from ra_customer_trx_lines_all
******************************************************************
31-10-13
AS SINGLE QUERY FOR O2C
select header_id,flow_status_code,open_flag,booked_flag from
oe_order_headers_all where order_number=66409
select line_id,line_number,flow_status_code,open_flag,bookeD_flag from
oe_order_lines_all where header_id=195322
select DELIVERY_DETAIL_ID,RELEASED_STATUS from wsh_delivery_details where
source_line_id=394283
-
8/14/2019 O2C IMP TABLES.docx
25/37
select DELIVERY_DETAIL_ID,RELEASED_STATUS from wsh_delivery_details where
source_line_id=394284
select DELIVERY_ASSIGNMENT_ID, DELIVERY_ID from wsh_delivery_assignments
where DELIVERY_DETAIL_ID=3965467
select DELIVERY_ASSIGNMENT_ID, DELIVERY_ID from wsh_delivery_assignments
where DELIVERY_DETAIL_ID=3965468
select * from wsh_new_deliveries where delivery_id=3776372
select * from mtl_demand where DEMAND_SOURCE_LINE=394283
select * from mtl_demand where DEMAND_SOURCE_LINE=394284
SELECT * FROM MTL_ONHAND_QUANTITIES_DETAIL WHERE INVENTORY_ITEM_ID=199 AND
ORGANIZATION_ID=207
SELECT * FROM MTL_RESERVATIONS WHERE INVENTORY_ITEM_ID=199 AND
ORGANIZATion_id=207
SELECT * FROM MTL_MATERIAL_TRANSACTIONS -- SOURCE_LINE_ID=394283 AND
ORGANIZATION_ID=207
SELECT * FROM MTL_MATERIAL_TRANSACTIONS_TEMP
-
8/14/2019 O2C IMP TABLES.docx
26/37
SELECT * FROM MTL_TXN_REQUEST_HEADERS --WHERE
SELECT * FROM MTL_TXN_REQUEST_HEADERS WHERE REQUEST_NUMBER='1289893'
SELECT * FROM MTL_TXN_REQUEST_LINES WHERE HEADER_ID=3906032
SELECT * FROM MTL_TXN_REQUEST_LINES WHERE TXN_SOURCE_LINE_ID=394283
select * from mtl_material_transactions where trx_SOURCE_LINE_ID=394283
select * from mtl_transaction_types where TRANSACTION_TYPE_ID=33
select * from mtl_serial_numbers
select * from mfg_lookups where
lookup_type like 'MTL_SERIAL_NUMBER%'
select * from ra_interface_lines_all where SALES_ORDER_LINE=394283
-
8/14/2019 O2C IMP TABLES.docx
27/37
select * from ra_interface_lines_all where sales_order='66409'
select * from ra_customer_trx_lines_all where
INTERFACE_LINE_ATTRIBUTE1='66409'
select * from ra_customer_trx_all where CUSTOMER_TRX_ID=758704
1271489
SELECT * FROM AR_RECEIVABLE_APPLICATIONS_ALL WHERE
APPLIED_CUSTOMER_TRX_ID=758704 --CISTOMER_TRX_ID
CASH_RECEIPT_ID
SELECT * FROM AR_CASH_RECEIPTS_ALL WHERE RECEIPT_NUMBER=10101'
************************************
select * from oe_order_headers_all where header_id=93000
select * from oe_order_lines_all where line_id=392293
select line_type_id from oe_order_lines_all where line_id=392293
select * from oe_order_lines_all
select * from oe_transaction_types_tl where TRANSACTION_TYPE_ID=1437
-
8/14/2019 O2C IMP TABLES.docx
28/37
select * from qp_list_headers_all where LIST_HEADER_ID=1000
-- imp tables in sales order from
select * from mtl_parameters where organization_id=207
-- imp tables in sales order from
select ship_to_location_i from mtl_parameters where organization_id=207
select * from org_organization_definitions where organization_id=1424
select * from ra_customers
select * from hz_parties where
select distinct party_type from hz_parties
select * from hz_cust_acct_sites_All where cust_acct_site_id=1340--2
-
8/14/2019 O2C IMP TABLES.docx
29/37
select * from hz_cust_site_uses_all where site_use_id=1425--3
select * from hz_party_sites where party_site_id=1340--1
select * from hz_parties where party_id=1290 --0
select * from wsh_carrier_ship_methods where SHIP_METHOD_CODE='DHL'
select * from ra_salesreps_all where salesrep_id=1006
select * from hz_cust_accounts --where CUST_ACCOUNT_ID=1143
select * from hz_parties where party_number='1143'
select * from oe_order_lines_all WHERE HEADER_ID=193361
select * from oe_transaction_types_tl where transaction_type_id=1427--wherename like 'R%'
select * from mtl_uom_conversions
-
8/14/2019 O2C IMP TABLES.docx
30/37
select * from mtl_system_items
select *
from mtl_items_types
select * from fnd_lookup_values
OE_PRICE_LIST_LINES
select distinct source_code from wsh_delivery_details --where
source_line_id=392293
select * from fnd_lookup_values --where lookup_type='SOURCE_CODE'
select * from oe_lookups --where lookup_type='SOURCE_CODE'
select * from wsh_delivery_details where source_line_id=392293
select * from hz_locations where location_id=1107
select * from wsh_carrier_ship_methods where carrier_id=12521
select requested_quantity from wsh_carrier_ship_methods where
carrier_id=12521
-
8/14/2019 O2C IMP TABLES.docx
31/37
select * from wsh_delivery_details
select * from wsh_delivery_assignments
select * from wsh_new_deliveries where delivery_id=1000
select requested_quantity,SHIPPED_QUANTITY from wsh_delivery_details
select * from hr_locations where location_id=109k0
select * from hz_locations where location_id=1090
select * from mtl_onhand_quantities_detail
select * from mtl_secondary_inventories
select * from MTL_RESERVATIONS --where DEMAND_SOURCE_LINE_ID=392293
ra_interface_lines_all
select * from mtl_demand where INVENTORY_ITEM_ID=199
select * from mtl_reservations
-
8/14/2019 O2C IMP TABLES.docx
32/37
select * from mtl_transaction_accounts where INVENTORY_ITEM_ID=199
select * from ra_interface_lines_all
select * from ra_customer_trx_lines_all
******
select onh.tran_qty - (res.res_qty + onh_sec.sec_tra_qty) UNRESERVED_ITEM,tran_qty,res_qty,sec_tra_qty FROM
(SELECT SUM(nvl(transaction_quantity,0)) tran_qty
FROM
MTL_ONHAND_QUANTITIES_DETAIL
WHERE
inventory_item_id = :P_INV
AND organization_id = :ORG_ID) ONH
,
(SELECT SUM(nvl(RESERVATION_QUANTITY,0)) res_qty
FROM MTL_RESERVATIONS
WHERE inventory_item_id = :P_INV
AND organization_id = :ORG_ID) RES,
-
8/14/2019 O2C IMP TABLES.docx
33/37
(SELECT SUM(nvl(transaction_quantity,0)) sec_tra_qty
FROM
MTL_ONHAND_QUANTITIES_DETAIL
WHERE inventory_item_id = :P_INV
AND organization_id = :ORG_ID
AND subinventory_code IN (SELECT SECONDARY_INVENTORY_NAME
FROM
MTL_SECONDARY_INVENTORIES
WHERE organization_id = :ORG_ID
AND RESERVABLE_TYPE = '2')) ONH_SEC
--select * from fnd_lookups where lookup_type='RESERVABLE_TYPE'
*************************
-
8/14/2019 O2C IMP TABLES.docx
34/37
***********************O2C QUERY************************************
selectooha.order_number,oola.line_id,oola.ordered_quantity,oola.shipped_quantity,
oola.invoiced_quantity,wdd.delivery_detail_id,wda.delivery_id,oola.org_id,rct
a.trx_numberfromoe_order_headers_all ooha
,oe_order_lines_all oola,wsh_delivery_details wdd
,wsh_delivery_assignments wda,ra_customer_trx_lines_all rctla
,ra_customer_trx_all rctawhereooha.header_id=oola.header_idandwdd.SOURCE_LINE_ID=oola.line_id
andwdd.delivery_detail_id=wda.delivery_detail_idandrctla.CUSTOMER_TRX_ID=rcta.CUSTOMER_TRX_ID
andrctla.INTERFACE_LINE_ATTRIBUTE6=to_char(oola.line_id)andooha.order_number=66409
1) Query for o2c********************2)3) Selectooha.order_number,ooha.org_id,4) hca.account_name,5) hp.party_name "Customer Name",6) hcasab.orig_system_reference BILL_TO_ORIG_REF,7) hpsb.status BILL_TO_STATUS,8) 'ADDRESS1 - '||bill_loc.address1||','||CHR(10)|| 'ADDRESS2 -
'||bill_loc.address2||','||CHR(10)||
9) 'ADDRESS3 - '||bill_loc.address3||','||CHR(10)|| 'CITY -'||bill_loc.city||','||CHR(10)||
10) 'POSTAL CD- '||bill_loc.postal_code||','||CHR(10)||'COUNTRY - '|| bill_loc.country BILL_TO_ADDRESS,
11) hcasas.orig_system_reference SHIP_TO_ORIG_REF,12) hpss.status SHIP_TO_STATUS,13) 'ADDRESS1 - '||ship_loc.address1||','||CHR(10)|| 'ADDRESS2
- '||ship_loc.address2||','||CHR(10)||14) 'ADDRESS3 - '||ship_loc.address3||','||CHR(10)|| 'CITY
- '||ship_loc.city||','||CHR(10)||
15) 'POSTAL CD- '||ship_loc.postal_code||','||CHR(10)||'COUNTRY - '|| ship_loc.country SHIP_TO_ADDRESS,
16) oola.inventory_item_id,oola.ordered_item,17) msib.description item_description,18)
wnd.namedelivery_number,19) rct.trx_number "AR Invoice Number",
20) acr.receipt_number "AR Receipt Number",21) gjh.ledger_id,22) gjh.name23) fromoe_order_headers_all ooha,24) oe_order_lines_all oola,25) hz_parties hp,26) hz_cust_accounts hca,27) hz_party_sites hpss,
-
8/14/2019 O2C IMP TABLES.docx
35/37
28) hz_party_sites hpsb,29) hz_locations bill_loc,30) hz_locations ship_loc,31) hz_cust_acct_sites_all hcasab,32) hz_cust_acct_sites_all hcasas,33) hz_cust_site_uses_all hzsuab,34) hz_cust_site_uses_all hzsuas,35) mtl_system_items_b msib,36) wsh_delivery_details wdd,37) wsh_new_deliveries wnd,38) wsh_delivery_assignments wda,39) ra_customer_trx_all rct,40) ra_customer_trx_lines_all rctl,41) ra_cust_trx_line_gl_dist_all rctld,42) ar_cash_receipts_all acr,43) xla.xla_transaction_entities xte,44) xla_events xe,45) xla_ae_headers xah,46) xla_ae_lines xal,47) xla_distribution_links xdl,48) gl_import_references gir,49) gl_je_batches gjb,50) gl_je_headers gjh,51) gl_je_lines gjl52) whereooha.order_number =:SalesOrderNumber --Right click
:RequitionNumber from Toad Enable Prompt For Substitution Variables53) andooha.org_id =20754) andhca.cust_account_id =ooha.sold_to_org_id55) andhp.party_id =hca.party_id56) andhpss.party_id =hca.party_id57) andhpsb.party_id =hca.party_id58) andbill_loc.location_id =hpss.location_id59) andship_loc.location_id =hpsb.location_id60) ANDhcasas.cust_account_id =hca.cust_account_id61) ANDhcasab.cust_account_id =hca.cust_account_id62) ANDhcasas.party_site_id =hpss.party_site_id63) ANDhcasab.party_site_id =hpsb.party_site_id64) andhzsuas.cust_acct_site_id =hcasas.cust_acct_site_id65) andhzsuab.cust_acct_site_id =hcasab.cust_acct_site_id66) andhzsuas.site_use_id =ooha.ship_to_org_id67) andhzsuab.site_use_id =ooha.invoice_to_org_id68) andwda.delivery_id =wnd.delivery_id(+)69) andwdd.delivery_detail_id =wda.delivery_detail_id70) andwdd.source_header_id =ooha.header_id71) andwdd.source_line_id =oola.line_id72) andwdd.organization_id =msib.organization_id(+)73) andwdd.inventory_item_id =msib.inventory_item_id(+)74) andrct.interface_header_attribute1 =to_char(ooha.order_number)75) andrct.org_id =ooha.org_id76) andrctl.customer_trx_id =rct.customer_trx_id77) andrctl.sales_order =to_char(ooha.order_number)78) andrctld.customer_trx_id =rct.customer_trx_id79) andrctld.customer_trx_line_id =rctl.customer_trx_line_id80) andacr.receipt_number ='10101'81) andacr.pay_from_customer =rct.sold_to_customer_id82) andacr.org_id =ooha.org_id83) andacr.customer_site_use_id =rct.bill_to_site_use_id
-
8/14/2019 O2C IMP TABLES.docx
36/37
84) andxte.transaction_number =acr.receipt_number85) andxte.entity_code ='RECEIPTS'86) andxe.entity_id =xte.entity_id87) andxah.event_id =xe.event_id88) andxal.ae_header_id =xah.ae_header_id89) andxal.accounting_class_code ='CASH'90) andxdl.ae_header_id =xah.ae_header_id91) andxdl.ae_line_num =xal.ae_line_num92) --and xdl.source_distribution_id_num_193) andgir.reference_5 =xte.entity_id -- Entity Id94) andgir.reference_6 =to_char(xe.event_id)--Event Id95) andgir.reference_7 =to_char(xah.ae_header_id)-- AE Header Id96) andgir.gl_sl_link_id =xal.gl_sl_link_id97) andgir.created_by =101343798) andgjb.je_batch_id =gir.je_batch_id99) andgjh.je_batch_id=gjb.je_batch_id100) andgjh.je_header_id =gir.je_header_id101) andgjl.je_header_id=gjh.je_header_id102) andgjl.je_line_num=gir.je_line_num
SELECTh.order_number,l.line_id,l.ordered_quantity,l.shipped_quantity,l.invoiced_qua
ntity,wdd.delivery_detail_id,wnd.delivery_id,wdd.shipped_quantity,a.org_id,a.creation_date ,a.trx_number,b.quantity_ordered ,b.quantity_invoiced
,b.interface_line_attribute1,b.interface_line_attribute3,b.interface_line_attribute6,interface_line_attribute12
fromra_customer_trx_all a,ra_customer_trx_lines_all b,
oe_order_headers_all h,oe_order_lines_all l,
wsh_delivery_details wdd,wsh_delivery_assignments wda,wsh_new_deliveries wnd
wherea.customer_trx_id =b.customer_trx_idanda.interface_header_context ='ORDER ENTRY'
andb.interface_line_attribute1 =to_char(h.order_number)
andh.header_id =l.header_idandto_char(l.line_id)=b.interface_line_attribute6
andl.line_id =wdd.source_line_idandwdd.delivery_detail_id =wda.delivery_detail_id
andwda.delivery_id =wnd.delivery_idandto_char(wnd.delivery_id)=b.interface_line_attribute3andh.order_number=:order_num
*******************************hz tabvles**********************************
select party_id,party_number,party_name,party_type fromhz_parties whereparty_id=1290
-
8/14/2019 O2C IMP TABLES.docx
37/37
select
party_site_id,party_id,location_id,party_site_number,party_site_name,addressee
fromhz_party_sites wherePARTY_id=1290
select* fromhz_locations wherelocation_id=1029
selectcust_account_id,party_id,account_number,customer_type,customer_class_codefromhz_cust_accounts whereparty_id=1290
SELECTDISTINCTaccount_number FROMhz_cust_accounts
select
cust_acct_site_id,cust_account_id,party_site_id,bill_to_flag,ship_to_flag,market_flag
fromhz_cust_acct_sites_all wherecust_account_id=1290
selectsite_use_id,cust_acct_site_id,site_use_code,primary_flag from
hz_cust_site_uses_all wherecust_acct_site_id=1487
selectcust_account_profile_id,cust_account_id,status from
hz_customer_profiles
top related