Solved

how to change value in event action

  • 11 November 2021
  • 2 replies
  • 500 views

Userlevel 1
Badge +3

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

 

icon

Best answer by aykuty 30 December 2021, 09:53

View original

2 replies

Userlevel 6
Badge +12

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;

Userlevel 1
Badge +3

thank you Randini 

Reply