Главная > Oracle e-Business Suite, SQL > Модуль PO — Сколько заказано по позициям


Модуль PO — Сколько заказано по позициям

-- заказы на приобретение
Select pll.ship_to_organization_id as org_id,
       pll.need_by_date            as date_val,
       pla.item_id                 as item_id,
       msi.segment1                as item,
       msi.primary_uom_code        as uom_code,
       -- заказано
       pla.quantity                as ordered_qty
from po_line_locations_all pll,
       po_lines_all          pla,
       po_headers_all        pha,
       mtl_system_items_b    msi
where 1=1
      -- pll
      and pll.po_line_id = pla.po_line_id
       -- ! ограничиваем период
      and pll.need_by_date >= trunc(sysdate, 'mm')
      -- msi
      and msi.inventory_item_id  = pla.item_id
      and msi.organization_id    = pll.ship_to_organization_id
      --  pha
      and pha.po_header_id = pla.po_header_id
      and pha.authorization_status = 'APPROVED' -- только утвержденные ЗП
order by pll.ship_to_organization_id, msi.inventory_item_id, pll.need_by_date

Похожие записи:

  1. Пока что нет комментариев.
  1. Пока что нет уведомлений.