Hello
We are trying to automatically update shop order quantities whenever the quantity (BUY_QTY_DUE
) of a customer order line changes in IFS Apps 8.
Our approach is to define a Custom Event on CustomerOrderLine
and use an Event Action (type: “Execute Online SQL”) to call a PL/SQL procedure which updates the quantities in SHOP_ORD
.
I have prepared the Custom Event, Action, and Procedure as shown in the image below.However, when I test it, it gives an error.



1PROCEDURE Update_SO_Qty_From_CO (2 order_no_ IN VARCHAR2,3 release_no_ IN VARCHAR2,4 sequence_no_ IN VARCHAR2,5 qty IN NUMBER6)7IS8 info_ VARCHAR2(2000);9 attr_ VARCHAR2(2000);10 objid_ VARCHAR2(2000);11 objversion_ VARCHAR2(2000);12BEGIN13 FOR rec IN (14 SELECT objid, objversion15 FROM ifsapp.shop_ord16 WHERE (order_no = order_no_ OR order_no = 'YI' || SUBSTR(order_no_, 2))17 AND release_no = release_no_18 AND sequence_no = sequence_no_19 AND state <> 'Closed'20 )21 LOOP22 client_sys.Clear_Attr(attr_);23 client_sys.Add_To_Attr('REVISED_QTY_DUE', qty, attr_);2425 ifsapp.SHOP_ORD_API.MODIFY__(26 info_ => info_,27 objid_ => rec.objid,28 objversion_=> rec.objversion,29 attr_ => attr_,30 action_ => 'DO'31 );32 END LOOP;33END Update_SO_Qty_From_CO;