Table maintenance events are useful tool to do the validations, checks or some other custom requirements as per the business need.
Event – What is it?
Events allow you to change the generated table maintenance dialog at predefined positions, which cannot be reached by user modules in the screen flow logic.
The user routines are called dynamically at runtime. For this reason, the routines must be in a user include in the table/view maintenance dialog function group. All extended table maintenance global data is available.
Steps to create Event
1. Create and activate the table in SE11/SE80.
2. Generate the table maintenance generator and save it.
3. In the Generate Table Maintenance screen go to Menu Environment –> Modification –> Events.
5. Click the New Entries button and select the event you want to use and the Routine name.
There are many events to suit your business need. Here for demo, I have used the event 05 i.e. Creating a new entry.
For example, below I have written a code to pull the material description automatically when material number is entered.
* Convert the input data
CALL FUNCTION ‘CONVERSION_EXIT_MATN1_INPUT’
INPUT = ztest_rs-zmatnr
OUTPUT = ztest_rs-zmatnr
LENGTH_ERROR = 1
OTHERS = 2.
* Get the description of the material automatically
Select maktx from makt
WHERE matnr = ztest_rs-zmatnr
and spras = sy-langu.
Go to transaction SM30. Give the table name and press new entry button
Provide material 38 and plant 1000.
Material Description is automatically populated.
If you want to get more practical issues and resolutions straight to your inbox, please SUBSCRIBE. We respect your privacy and take protecting it seriously.
Thank you very much for your time!!
If you liked it, please share it.
Image source : cliparts.co