Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select
- wnd.organization_id,
- WND.DELIVERY_ID DELIVERY_ID,
- ACA.CUSTOMER_NAME,
- wnd.name delivery_name,
- ol.ordered_item item_code,
- wdd.item_description,
- wdd.CURRENCY_CODE,
- ol.unit_selling_price unit_price,
- mmt.transaction_date pick_confirm_date,
- wdd.requested_quantity_uom,
- sum(wdd.shipped_quantity) as shipped_quantity,
- sum(wdd.picked_quantity) as picked_quantity,
- ZISAD.BL_NO_2,
- ZISAD.FLIGHT_NO_1,
- ZISAD.FLIGHT_NO_2,
- ZISAD.FLIGHT_NO_3
- from
- APPS.wsh_delivery_details wdd,
- APPS.wsh_new_deliveries wnd,
- APPS.wsh_delivery_assignments wda,
- APPS.mtl_material_transactions mmt,
- APPS.oe_order_lines_all ol,
- apps.ZZ_INV_SHIP_ADT_DATA ZISAD,
- APPS.AR_CUSTOMERS_ACTIVE_V ACA
- where
- wnd.delivery_id = wda.delivery_id
- and WND.NAME(+)= ZISAD.INVOICE_NUMBER
- and wdd.delivery_detail_id = wda.delivery_detail_id
- and mmt.transaction_id = wdd.transaction_id
- and ol.line_id = wdd.source_line_id
- and wdd.CUSTOMER_ID = ACA.CUSTOMER_ID
- and (
- wnd.organization_id = 108
- or wnd.organization_id = 107
- or wnd.organization_id = 109
- or wnd.organization_id = 145
- )
- and wdd.CURRENCY_CODE = 'USD'
- group by
- wnd.organization_id,
- WND.DELIVERY_ID,
- ACA.CUSTOMER_NAME,
- wnd.name,
- ol.ordered_item,
- wdd.item_description,
- wdd.CURRENCY_CODE,
- ol.unit_selling_price,
- mmt.transaction_date,
- wdd.requested_quantity_uom,
- ZISAD.BL_NO_2,
- ZISAD.FLIGHT_NO_1,
- ZISAD.FLIGHT_NO_2,
- ZISAD.FLIGHT_NO_3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement