Skip to main content

hi,

 

i have a event action on “PROJECT_TRANSACTION_TAB”.

i want to update :NEW.REPORT_COST_CODE value but icant do it.

i think standart oracle trigger syntax wont work.

how can i do it?

 thanks

 

Hi @aykuty 

Please go through the reply given in below post and check whether a similar thing is applicable in your scenario as well.

 

In your case the Step 2 event action should be as follows.

DECLARE

   Arge_Durum_   VARCHAR2(20);

   attr_ VARCHAR2(2000);

   info_ VARCHAR2(2000);

   objid_ VARCHAR2(2000);

   objversion_ VARCHAR2(2000);

CURSOR get_rec IS

   SELECT rowid, to_char(rowversion,'YYYYMMDDHH24MISS')

   FROM  project_transaction_tab

   WHERE project_transaction_seq = '&PROJECT_TRANSACTION_SEQ';

BEGIN

   -- Get the value of Arge_Durum_ as per your requirement

   OPEN get_rec;

   FETCH get_rec INTO objid_, objversion_;

   CLOSE get_rec;

   Client_SYS.Clear_Attr(attr_);

   Client_SYS.Add_To_Attr('REPORT_COST_CODE',   Arge_Durum_,   attr_);

   Project_Transaction_API.Modify__(info_,  objid_, objversion_, attr_, 'DO');

END;


thank you Randini 


Reply