Thursday, November 7, 2013

Pending Receiving Query

Your Ad Here



select 'Pending Receiving'||'~'||
       ood.organization_code||'~'||
       to_char(rti.creation_date,'DD-MON-RRRR HH24:MI:SS') ||'~'||
       rti.interface_transaction_id||'~'||
       msi.segment1||'~'||
       quantity ||'~'||
       pha.segment1||'~'||
       rti.transaction_type||'~'||
       rti.request_id||'~'||
       fu.user_name||'~'||
       ood.organization_id  l_out
  from rcv_transactions_interface rti,
       org_organization_definitions ood,
       mtl_system_items msi,
       po_headers_all pha,
       fnd_user fu
 where rti.to_organization_id = ood.organization_id
   and fu.user_id = rti.created_by
   and pha.po_header_id(+) = rti.po_header_id
   and msi.inventory_item_id = rti.item_id
   and msi.organization_id   = 28
   and rti.destination_type_code = 'INVENTORY'
   and ood.organization_id   = nvl(p_org_id,ood.organization_id)
   and (:p_minutes is null or rti.creation_date < SYSDATE - (:p_minutes/(24*60)) )
   order by ood.organization_code, rti.creation_date;


Your Ad Here

0 comments:

Post a Comment