This document will give the step of configuring customs table maintenance screen to have automated Created Date, Created By, Changed Date, Changed By.
Created Date, Created By, Changed Date, Changed By will be automatically entered when a new record is done through the maintenance screen.
Changed Date, Changed By will be automatically changed when a record has been changed.
2 Step by step guide
- Create the table with following fields included: ERNAM, ERDAT, AENAM, AEDAT and the data element should have the same name as the field name.
- In SE11 Table dictionary, go to Utilities > Table Maintenance Generator
- If you have not already generated the maintenance dialog for the table, generate one before next step.
- Go to Environment > Modification > Maintenance Screens
- Select the screen number you have generated
- Click on the Element List tab and uncheck inputs for ERNAM,ERDAT,AENAM,AEDAT. Be sure to Activate
- Go back to the maintenance generator screen. Now go to Environment > Modification > Maintenance Screens
- Add new entry to the table with
Event : 18
Form name : set_changeauditdate
- Hit Enter once, then click on the editor button beside the routine we have just added
- They will prompt you to create a subroutine. Hit yes to proceed.
- Put in this code. In the newly created include.
Field Created by, Created On, Changed by, Changed on will be greyed out.
- Creating data: after hitting save & back:
- After saving on a different day, it will not change the data on screen instantly, but the back end will change it automatically. The result will be this when we refresh the view.