Search 800 + Posts

Dec 9, 2010

Query to check all the Picked Delivery Deatils where Reservation not exists

 Select ool.line_id,
  from wsh_delivery_details wdd , oe_order_lines_all ool
  where wdd.source_line_id  = ool.line_id
        and ool.open_flag ='Y'
        and wdd.source_code ='OE'
        and Picked_quantity > 0
        and released_status= 'Y'
        and ool.header_id = &enter_Sales_Order_Header_id
        and not exists
        select 1 from mtl_reservations mr
         where mr.demand_source_line_id = wdd.source_line_id
            and mr.inventory_item_id = wdd.inventory_item_id) 

Above sample script is with Order_Header_id as a Parameter. If you want to check for all the Orders , then remove the parameter Condition.

Hope that Helps.

No comments:

Post a Comment