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+7
  • Sidekick (Customer)
  • 41 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.

 

PROCEDURE Update_SO_Qty_From_CO (
   order_no_      IN VARCHAR2,
   release_no_    IN VARCHAR2,
   sequence_no_   IN VARCHAR2,
   qty            IN NUMBER
)
IS
   info_       VARCHAR2(2000);
   attr_       VARCHAR2(2000);
   objid_      VARCHAR2(2000);
   objversion_ VARCHAR2(2000);
BEGIN
   FOR rec IN (
      SELECT objid, objversion
        FROM ifsapp.shop_ord
       WHERE (order_no   = order_no_ OR order_no = 'YI' || SUBSTR(order_no_, 2))
         AND release_no = release_no_
         AND sequence_no = sequence_no_
         AND state     <> 'Closed'
   )
   LOOP
      client_sys.Clear_Attr(attr_);
      client_sys.Add_To_Attr('REVISED_QTY_DUE', qty, attr_);

      ifsapp.SHOP_ORD_API.MODIFY__(
         info_      => info_,
         objid_     => rec.objid,
         objversion_=> rec.objversion,
         attr_      => attr_,
         action_    => 'DO'
      );
   END LOOP;
END 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+7
  • Author
  • Sidekick (Customer)
  • 41 replies
  • May 21, 2025

Thanx. it is worked now.


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