Monday, April 9, 2012

WMS - Pending Task Report

SELECT   wt.transaction_temp_id task_no,
         hp.party_name customer,
         wt.item item_number,
         wt.ITEM_DESCRIPTION,
         wt.status_code,
         wt.status,
         wt.TRANSACTION_QUANTITY,
         oel.SHIPPING_METHOD_CODE,
         oeh.order_number,
         fu1.user_name,
         wt.user_task_type_code,
         wt.subinventory_code
  FROM   wms_tasks_v WT,
         apps.oe_order_lines_all oel,
         apps.oe_order_headers_all oeh,
         apps.fnd_user fu1,
         hz_parties hp,
         hz_cust_accounts hca
 WHERE       1 = 1                        --TRANSACTION_SOURCE_TYPE in ('RMA')
         AND TASK_TYPE_DESCRIPTION = 'Pick'
         AND STATUS_CODE <> 'Completed'
         AND oel.line_id = WT.TRANSACTION_SOURCE_LINE_ID
         AND oeh.header_id = oel.header_id
         AND wt.person_id = fu1.employee_id(+)
         AND oeh.sold_to_org_id = hca.cust_account_id
         AND hca.party_id = hp.party_id
         AND wt.status = NVL (:p_status, wt.status)
         AND wt.creation_date BETWEEN NVL (:p_from_date, wt.creation_date)
                                  AND  NVL (:p_to_date, wt.creation_date)

No comments:

Post a Comment