Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. select
  2. wnd.organization_id,
  3. WND.DELIVERY_ID DELIVERY_ID,
  4. ACA.CUSTOMER_NAME,
  5. wnd.name delivery_name,
  6. ol.ordered_item item_code,
  7. wdd.item_description,
  8. wdd.CURRENCY_CODE,
  9. ol.unit_selling_price unit_price,
  10. mmt.transaction_date pick_confirm_date,
  11. wdd.requested_quantity_uom,
  12. sum(wdd.shipped_quantity) as shipped_quantity,
  13. sum(wdd.picked_quantity) as picked_quantity,
  14. ZISAD.BL_NO_2,
  15. ZISAD.FLIGHT_NO_1,
  16. ZISAD.FLIGHT_NO_2,
  17. ZISAD.FLIGHT_NO_3
  18. from
  19. APPS.wsh_delivery_details wdd,
  20. APPS.wsh_new_deliveries wnd,
  21. APPS.wsh_delivery_assignments wda,
  22. APPS.mtl_material_transactions mmt,
  23. APPS.oe_order_lines_all ol,
  24. apps.ZZ_INV_SHIP_ADT_DATA ZISAD,
  25. APPS.AR_CUSTOMERS_ACTIVE_V ACA
  26. where
  27. wnd.delivery_id = wda.delivery_id
  28. and WND.NAME(+)= ZISAD.INVOICE_NUMBER
  29. and wdd.delivery_detail_id = wda.delivery_detail_id
  30. and mmt.transaction_id = wdd.transaction_id
  31. and ol.line_id = wdd.source_line_id
  32. and wdd.CUSTOMER_ID = ACA.CUSTOMER_ID
  33. and (
  34. wnd.organization_id = 108
  35. or wnd.organization_id = 107
  36. or wnd.organization_id = 109
  37. or wnd.organization_id = 145
  38. )
  39. and wdd.CURRENCY_CODE = 'USD'
  40. group by
  41. wnd.organization_id,
  42. WND.DELIVERY_ID,
  43. ACA.CUSTOMER_NAME,
  44. wnd.name,
  45. ol.ordered_item,
  46. wdd.item_description,
  47. wdd.CURRENCY_CODE,
  48. ol.unit_selling_price,
  49. mmt.transaction_date,
  50. wdd.requested_quantity_uom,
  51. ZISAD.BL_NO_2,
  52. ZISAD.FLIGHT_NO_1,
  53. ZISAD.FLIGHT_NO_2,
  54. ZISAD.FLIGHT_NO_3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement