Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

table maintenance events

Former Member
0 Likes
371

Hi,

I have written below code in table maintenance events '01' - 'Before saving the data in the database' in one of my table.

 LOOP AT total.
IF <action> EQ 'U'.
      wa_zins_log-mandt              = sy-mandt.
      wa_zins_log-execution_date     = sy-datum.
      wa_zins_log-execution_time     = sy-uzeit.
      wa_zins_log-userid             = sy-uname.
      wa_zins_log-modification_ind   = 'M'.
      wa_zins_log-program_id         = 'ZINS_RTO'.
      wa_zins_log-program_name       = 'ZINS_RTO'.
      wa_zins_log-field_name         = ''.
      wa_zins_log-old_val               = ''
      wa_zins_log-new_val            = total+3(4).
      wa_zins_log-serial_no          = '1'.
      INSERT zins_log FROM wa_zins_log.
      CLEAR wa_zins_log.
    ENDIF.
  ENDLOOP. 

in above code, I have to populate field_name, old_val from system. Field name should be the changed field of the table and old_val should be fieldvalue before change.

How to do this?

Regards,

Santosh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
341

Hi,

Use the Event 25 for this.

With Regards,

Sumodh.P

Hi,

Use the Event 25 for this.

With Regards,

Sumodh.P

1 REPLY 1
Read only

Former Member
0 Likes
342

Hi,

Use the Event 25 for this.

With Regards,

Sumodh.P