5
We have a following custom table which contains the fields “Date on which record was created” and “Name of the person who created the object”. We would like to have these to be filled up with SY-DATUM and SY-UNAME respectively. Go to Table Maintenance Generator: Enter the details as shown below:

21168634-Events-in-SM30

Embed Size (px)

Citation preview

Page 1: 21168634-Events-in-SM30

We have a following custom table which contains the fields “Date on which

record was created” and “Name of the person who created the object”. We would

like to have these to be filled up with SY-DATUM and SY-UNAME respectively.

Go to Table Maintenance Generator:

Enter the details as shown below:

Page 2: 21168634-Events-in-SM30

Now click on Environment -> Modification -> Events

Following screen is displayed.

Page 3: 21168634-Events-in-SM30

Click on F4. Following entries are displayed:

Here you can observe that there are different types of events available like before

saving the data, after saving the data, before deleting, after deleting and others. Let

us go with “Creating a new entry”.

Page 4: 21168634-Events-in-SM30

Click on the button in the Editor column and enter the following code: (Please

note that you should also code FORM and ENDFORM as well).

Save and activate the table.

Testing the scenario:

Go to SM30 and try creating new entries. Do not enter the values for “Created on”

and “Created by”.

Page 5: 21168634-Events-in-SM30

Check your entries in the database table. You can observe that the date and user

name are automatically filled-in. See the screenshot below: