Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Extended Table Maintenance Events

Hi,

Requirement:

1. Table Name: ZORDER_RESTRICT.

2. Contains many custom fields + Changed By and Changed

On fields.

3. When any user changes an existing record, I need to populate the Changed By and Changed On fields.

Issue:

1. I have coded the events on SE54 as follows:

FORM Z_MODIFY_USER_INFO_GENERATION.

DATA: F_INDEX LIKE SY-TABIX.

DATA: WA_ZORDER_RESTRICT TYPE ZORDER_RESTRICT.

BREAK-POINT.

LOOP AT TOTAL.

IF <ACTION> = AENDERN.

READ TABLE EXTRACT WITH KEY <VIM_XTOTAL_KEY>.

IF SY-SUBRC EQ 0.

F_INDEX = SY-TABIX.

ELSE.

CLEAR F_INDEX.

ENDIF.

WA_ZORDER_RESTRICT = TOTAL.

WA_ZORDER_RESTRICT-CHANGED_BY = SY-UNAME.

WA_ZORDER_RESTRICT-CHANGE_DATE = SY-DATUM.

TOTAL = WA_ZORDER_RESTRICT.

MODIFY TOTAL.

CHECK F_INDEX GT 0.

EXTRACT = TOTAL.

MODIFY EXTRACT INDEX F_INDEX.

ENDIF.

ENDLOOP.

SY-SUBRC = 0.

ENDFORM. "Z_MODIFY_USER_INFO_GENERATION

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.

Regards,

GPK.

Tags:
Not what you were looking for? View more on this topic or Ask a question