Friday, August 14, 2015

Find planned orders by supplier

One of our customers wanted to see the value of planned orders for a particular supplier, dollarized at cost. This simple Excel-Out report gives them a simple view of their purchasing power and allows them bargain with the vendor for the entire volume of planned purchasing rather then from one PO to another.

p_paremeter01 -  the name of the ASCP plan, required
p_paremeter02 -  vendor name, optional


SELECT order_type,order_type_text order_type,substr(ORGANIZATION_CODE,5,4) Branch,
       ITEM_SEGMENTS Item,  DESCRIPTION,
       NEW_DUE_DATE Due_date, SOURCE_VENDOR_NAME,SOURCE_VENDOR_SITE_CODE ,  
        quantity, UOM_CODE,NEED_BY_DATE,STANDARD_COST,WEIGHT,BUYER_NAME,
        STANDARD_COST * quantity value
  FROM MSC_ORDERS_V a
 WHERE    plan_id =(select plan_id from msc_plans where compile_designator=p_paremeter01)
 and order_type_text='Planned order'
 and supplier_name =nvl(p_parameter02, supplier_name)
  AND category_set_id = 1
 
 

No comments:

Post a Comment