Skip to main content
Solved

How to Pass Event Attribute Values as Parameters to a PL/SQL Procedure in Custom Event Action? (IFS Apps 8)


Forum|alt.badge.img+8
  • Sidekick (Customer)
  • 48 replies

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 NUMBER
6)
7IS
8 info_ VARCHAR2(2000);
9 attr_ VARCHAR2(2000);
10 objid_ VARCHAR2(2000);
11 objversion_ VARCHAR2(2000);
12BEGIN
13 FOR rec IN (
14 SELECT objid, objversion
15 FROM ifsapp.shop_ord
16 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 LOOP
22 client_sys.Clear_Attr(attr_);
23 client_sys.Add_To_Attr('REVISED_QTY_DUE', qty, attr_);
24
25 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;

 

Best answer by SNBSHAN

You have to pass like below with &.

Use single quotes for string values, but not for numeric fields.

View original
Did this topic help you find an answer to your question?

2 replies

Forum|alt.badge.img+6
  • Sidekick (Customer)
  • 17 replies
  • Answer
  • May 21, 2025

You have to pass like below with &.

Use single quotes for string values, but not for numeric fields.


Forum|alt.badge.img+8
  • Author
  • Sidekick (Customer)
  • 48 replies
  • May 21, 2025

Thanx. it is worked now.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings