link between OE ,HZ AND WSH Tables in oracle apps r12
select DISTINCT wnd.name shipper_no,
wnd.confirm_date,
hp.party_name,
hcsua.location "Customer address",
hl.address1,
hl.city,
hl.state,
hl.postal_code,
hl.country,
ool.header_id,
msi.segment1 L_L_Item_No,
wlp.license_plate_number,
ool.ordered_item "Customer_Part_No",
wda.delivery_id,
msi.inventory_item_id,
ool.ordered_item "CUST_1",
msi.segment1 "ITEM_1"
from wsh_new_deliveries wnd,
hz_cust_accounts_all hca,
hz_parties hp,
hz_locations hl,
wsh_delivery_assignments wda,
wsh_delivery_details wdd,
oe_order_lines_all ool,
mtl_system_items_b msi,
mtl_parameters mp,
wsh_delivery_details wdd_p,
wms_license_plate_numbers wlp,
hz_cust_site_uses_all hcsua
where wnd.customer_id = hca.cust_account_id
and hca.party_id = hp.party_id
and wnd.delivery_id = wda.delivery_id
and wda.delivery_detail_id = wdd.delivery_detail_id
and hl.location_id = wnd.ultimate_dropoff_location_id
and wdd.source_line_id = ool.line_id
and wdd.source_header_id = ool.header_id
and ool.inventory_item_id = elss.inventory_item_id
and ool.inventory_item_id = msi.inventory_item_id
and ool.ship_from_org_id = msi.organization_id
and mp.organization_code='000'
and wda.parent_delivery_detail_id = wdd_p.delivery_detail_id
and wdd_p.lpn_id = wlp.lpn_id
and ool.ship_to_org_id = hcsua.site_use_id(+)
and wnd.name='7453179';
select DISTINCT wnd.name shipper_no,
wnd.confirm_date,
hp.party_name,
hcsua.location "Customer address",
hl.address1,
hl.city,
hl.state,
hl.postal_code,
hl.country,
ool.header_id,
msi.segment1 L_L_Item_No,
wlp.license_plate_number,
ool.ordered_item "Customer_Part_No",
wda.delivery_id,
msi.inventory_item_id,
ool.ordered_item "CUST_1",
msi.segment1 "ITEM_1"
from wsh_new_deliveries wnd,
hz_cust_accounts_all hca,
hz_parties hp,
hz_locations hl,
wsh_delivery_assignments wda,
wsh_delivery_details wdd,
oe_order_lines_all ool,
mtl_system_items_b msi,
mtl_parameters mp,
wsh_delivery_details wdd_p,
wms_license_plate_numbers wlp,
hz_cust_site_uses_all hcsua
where wnd.customer_id = hca.cust_account_id
and hca.party_id = hp.party_id
and wnd.delivery_id = wda.delivery_id
and wda.delivery_detail_id = wdd.delivery_detail_id
and hl.location_id = wnd.ultimate_dropoff_location_id
and wdd.source_line_id = ool.line_id
and wdd.source_header_id = ool.header_id
and ool.inventory_item_id = elss.inventory_item_id
and ool.inventory_item_id = msi.inventory_item_id
and ool.ship_from_org_id = msi.organization_id
and mp.organization_code='000'
and wda.parent_delivery_detail_id = wdd_p.delivery_detail_id
and wdd_p.lpn_id = wlp.lpn_id
and ool.ship_to_org_id = hcsua.site_use_id(+)
and wnd.name='7453179';
No comments:
Post a Comment