Skip to main content
Solved

Pegged Co PO

  • September 12, 2024
  • 4 replies
  • 93 views

Forum|alt.badge.img+9

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

Best answer by COVJAMIEB

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

 

4 replies

COVJAMIEB
Hero (Partner)
Forum|alt.badge.img+11
  • Hero (Partner)
  • Answer
  • September 12, 2024

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

 


spetkus27
Do Gooder (Customer)
Forum|alt.badge.img+6
  • Do Gooder (Customer)
  • September 12, 2024

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)


Forum|alt.badge.img+10
  • Hero (Partner)
  • September 12, 2024

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.


Forum|alt.badge.img+9
  • Author
  • Sidekick
  • September 13, 2024

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