Skip to main content

Hello ALL,

Is there a query that I can execute to get all the pegged CO lines with PO number included? 

I tried this table CUST_ORDER_PUR_ORDER_PEG but I get only released lines, I want all the status included.

 

Thank you,

Hanane

Have you taken a look at the view PURCHASE_ORDER_LINE_PART, this view has the Order Refs 1 which will allow you to refer back to the CO Lines for the data etc

 


Here is a quick and dirty query that should pull any CO Line that has an intersite PO source.

 

select STATE,ORDER_NO,LINE_NO,REL_NO,LINE_ITEM_NO,DEMAND_ORDER_REF1,DEMAND_ORDER_REF2,DEMAND_ORDER_REF3 from CUSTOMER_ORDER_LINE 
where DEMAND_ORDER_REF1 = &ao.Customer_Order_API.Get_Customer_Po_No(ORDER_NO)


Just to add to the alternatives, if it’s the pegged lines you’re after, the “base” view Customer_Order_Pur_Order doesn’t have the extra join and filter that Cust_Order_Pur_Order_Peg has.


Thank you all for the replies.

Eventually, I used PURCHASE_ORDER_LINE_PART and referred to demand_order_no as I didn’t have any results from the others queries 


Reply