Extended Table Maintenance Events
1. Table Name: ZORDER_RESTRICT.
2. Contains many custom fields + Changed By and Changed
3. When any user changes an existing record, I need to populate the Changed By and Changed On fields.
1. I have coded the events on SE54 as follows:
DATA: F_INDEX LIKE SY-TABIX.
DATA: WA_ZORDER_RESTRICT TYPE ZORDER_RESTRICT.
LOOP AT TOTAL.
IF <ACTION> = AENDERN.
READ TABLE EXTRACT WITH KEY <VIM_XTOTAL_KEY>.
IF SY-SUBRC EQ 0.
F_INDEX = SY-TABIX.
WA_ZORDER_RESTRICT = TOTAL.
WA_ZORDER_RESTRICT-CHANGED_BY = SY-UNAME.
WA_ZORDER_RESTRICT-CHANGE_DATE = SY-DATUM.
TOTAL = WA_ZORDER_RESTRICT.
CHECK F_INDEX GT 0.
EXTRACT = TOTAL.
MODIFY EXTRACT INDEX F_INDEX.
SY-SUBRC = 0.
2. The event is "01 = Before saving the data in the database".
3. When saving the record, I see the changed By and Changed On being populated, but they arent saved onto the databasee.
Any help in regards to this will be of great help for me.