Application Development 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: 

Last Changed By Date

Former Member
0 Kudos

Hi Experts,

In a custom table i need to create a Last Changed by feild which need to be populated automatically when a new record is added or change the existing record.

3 REPLIES 3

Former Member
0 Kudos

Hi Raghvendra,

Are you going to update the Z table through a table maintenance?

If yes, then you have two approaches:

1. Since its a Z table - the table maintenance will be under a Z function group and hence you can create your own PAI module in LOOP~ENDLOOP in PAI section and have the module react to ON INPUT-REQUEST - and update the last changed by field with SY-UNAME

2. Use SAP modification events BEFORE_SAVE

Kind regards,

Aditya

Former Member
0 Kudos

Hi Raghavendra,

If you are updating table through SM30 (Table maintrenace generator ) then you can use events for this purpose.

Refer to this link

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8129f164-0a01-0010-2a8e-87652872...

Former Member
0 Kudos

if it is a z then u can update it by assigning the field name to sy-ucome inside ur program..........