Skip to Content
avatar image
Former Member

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.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Apr 30, 2006 at 03:33 PM

    Hi Praveen,

    Go through this weblog on table maintenance.

    /people/sudheer.cheedella/blog/2006/02/20/extracting-data-in-table-maintenance

    Hope this works for you .let me know if you need more details

    Regards,

    Vicky

    Add comment
    10|10000 characters needed characters exceeded