Table maintenance events are a valuable tool for performing validations, checks, or handling other custom requirements as needed. When you add events in the table to meet custom requirements, it allows you to tailor the functionality to your specific needs, ensuring the system behaves as expected.
Event – What is it?
Events allow you to modify the generated table maintenance transaction at predefined points, which cannot be accessed by user modules in the screen flow logic. To add events in the table to meet custom requirements, the user routines are dynamically called at runtime. Therefore, the routines must be included in the user memory within the table/view maintenance transaction function group, where all extended table maintenance global data is available.
Steps to create Event
1. Make and actuate the table in SE11/SE80.
2. Produce the table upkeep generator and save it.
3. In the Create Table Upkeep screen go to Menu Climate – > Adjustment – > Occasions.
4. You will see the accompanying screen.
5. Click the New Passages button and select the occasion you need to utilize and the Standard name.
There are numerous occasions to suit your business need. Here for demo, I have utilized the occasion 05 for example Making another passage.
6. Click the Manager and make your daily practice in the Incorporate program and compose the code in the daily schedule to meet your prerequisite.
For instance, underneath I have composed a code to pull the material portrayal consequently when material number is placed.
FORM Z_AUTO_POPULATE.
* Convert the input data
CALL FUNCTION ‘CONVERSION_EXIT_MATN1_INPUT’
EXPORTING
INPUT = ztest_rs-zmatnr
IMPORTING
OUTPUT = ztest_rs-zmatnr
EXCEPTIONS
LENGTH_ERROR = 1
OTHERS = 2.
* Get the description of the material automatically
Select maktx from makt
into ztest_rs-maktx
WHERE matnr = ztest_rs-zmatnr
and spras = sy-langu.
ENDSELECT.
ENDFORM.
Sample Result
Go to exchange SM30. Give the table name and press new section button
Give material 38 and plant 1000.
In the wake of giving the material and plant, press ENTER.
Material Portrayal is naturally populated.
To get more viable issues and goals directly to your inbox, if it’s not too much trouble, Buy in. We regard your security and treat safeguarding it in a serious way.
Many thanks for your time!!
In the event that you loved it, if it’s not too much trouble, share it.
YOU MAY LIKE THIS
SPTA Parallel Processing Framework in ABAP
Understanding the Role of an SAP Application Support Specialist