Skip to main content

Hello all,

we want to see the coordinator (authorize_code) of the external customer order in an inter-company process in the shipment-header of the supply site.

I created the following three-step-logic which is working ok. 
But does anyone of you have a smarter way of finding the right coordinator? It is a bid of a mess I have to admit:

 

CF$_C_COORD_PRCPL in supply_order_analysis:
select authorize_code from customer_order where order_no in (select order_ref1 from supply_order_analysis where tree_id = :tree_id and node_id = '0')

 

CF$_C_COORD_PRCPL_SPM_LINE in shipment_line_cfv:
select CF$_C_COORD_PRCPL from supply_order_analysis_cfv where order_ref1 = :source_ref1 and order_ref2 = :SOURCE_REF2 and order_ref3 = :SOURCE_REF3

 

Cf$_C_Coord_prcpl_shp in shipment_cfv
select CF$_C_COORD_PRCPL_SPM_LINE from shipment_line_cfv where shipment_id = :shipment_id and rownum<=1

 

Is there even an API that I did not find so far?
Any ideas to fetch the value in a smarter way?

 

Thank you!


Best
Mattis

I found an alternative which is working in a better way:

SELECT
coo.authorize_code,

FROM 
shipment_line sl
INNER JOIN customer_order co 
ON sl.source_ref1 = co.order_no

INNER JOIN customer_order_pur_order copo
ON  copo.po_order_no = co.internal_po_no

INNER JOIN customer_order coo
ON copo.oe_order_no = coo.order_no

INNER JOIN shipment_cfv s
ON s.shipment_id = sl.shipment_id
WHERE
co.customer_no = '111'
and coo.authorize_code = Person_Info_API.Get_Id_For_Current_User()


Reply