Article Credit – Vishal Borkar
SAP Table Maintenance Generator (TMG) is a tool, used to create a table maintenance program, which can be customized, to be used by the end-users to maintain the table for example, user can create a new entry in the table, can change the existing data, and can delete the data. Validation of table maintenance generator.
This article explains how to validate freshly created, updated, and deleted TMG entries. TMG has a number of events that can be utilized to meet our needs, however, there isn’t one for the Enter key. Our code must be written in the PAI of the created screen.
Requirement: If a new record is created in table ZMTEST, the field CARRID should be validated against the SFLIGHT database. If CARRID does not exist in SFLIGHT, an error notice should be displayed and no data should be recorded.
• DOCUMENTATION FOR VALIDATION .
The validation function enables you to check values and ranges of values as they are being entered in the SAP system. Validation rules are stored in the Rule Manager. As data is entered into the system, the Integration Manager validates the data against the validation rules.
STEPS FOR VALIDATION –
• STEP 1 –
To generate a VALIDATION for a table, display the table in ABAP Dictionary (SE11).
• STEP 2 –
Select “Display/Maintenance Allowed” for Data Browser/Table View maintenance under Delivery Maintenance tab.
• STEP 3 –
THEN WE CAN FILL THE TABLE ( FIELD NAME , KEY , INITIAL VALUES , DATA ELEMENT , DATA TYPE , LENGTH , SHORT DESCRIPTION). WE CAN ADD THESE FIELDS IN THE TABLE ARE FOLLOWING –
• STEP 4 –
Go to Menu Utilities –> Table Maintenance Generator
• STEP 5 –
Enter the proper authorization group (&NC& is without any authorization) and function group. If the entered function group does not exist, it will create a new function group to store the dialog modules of TMG. Select “one step” for Maintenance type and click on “Find Screen Numbers” on application toolbar.
• STEP 6 –
Select Propose screen numbers and click on continue.
• STEP 7 –
The screen number for overview screen will be automatically populated. Now click on CREATE icon on application toolbar.
• STEP 8 –
Assign TMG and function group to proper package and save
Table maintenance program is created with the above message in the status bar.
• STEP 9 –
Now to maintain entries in the table, go to Maintain Table Views (SM30).
In SM30 enter table name and click on maintain
• STEP 10 –
CLECK ON NEW ENTRIES .
ELGIGIBILITY ENTRY CAN
EMPTY….. IN THE TABLE
• STEP 11 –
→ THEN USE TCODE AGAIN SE11 .
→ UTILITIES – TMG (TABLE MAINTENANCE GENERATOR) .
→ ENVIORNMENT – MODIFICATION – EVENTS
• STEP 12 –
IF WE WILL SEE THE TABLE –
→ CLICK ON MAINT EVENT COLUMN AND TYPE 05 – MEANS (CREATING A NEW ENTRY ) .
→ CLICK ON NEXT COLUMN FORM ROUTINE AND TYPE OBJECT (CREATE) .
→ ENTER – WE CAN SHOW SYMBOL IN EDITOR COLUMN AND CLICK ON EDITOR SYMBOL THEN DISPLAY ABAP EDITOR WINDOW .
→ IN THIS WINDOW TYPE LOGIC FOR VALIDATION.
→ THEN SAVE – CHECK – AND ACTIVE THE PROGRAM.
• STEP 13 –
→ THEN USE T CODE SM30 – TYPE PROGRAM NAME – CLICK ON MAINTAIN DISPLAYED DUMP ERROR (ABAP PROGRAMING ERROR).
→ IN THIS DUMP ERROR COPY THE ABAP PROGRAM NAME FOR NEXT OPERATION .
• STEP 14 –
→ USE SE38 PASTE ABAP PROGRAM NAME AND CLICK ON CHANGE . → THEN CHECK – ACTIVE – CLICK ON (DISPLAY OBJECT LIST) SYMBOL AFTER CLICK DISPLAYS FOLLOWING WINDOW –
→ RIGHT CLICK ON OBJECT NAME (ZPANKAJ_TASK17) – CLICK ON ACTIVATE .
• STEP 15 –
→USE T CODE SM30 TYPE TABLE NAME (ZPANKAJ_TASK17) CLICK ON MAINTAIN .
→THEN SHOWS NEW TABLE.
→ CLICK ON NEW ENTRIES.
→FILL THE ENTRIES ………..AS PER FOLLOWING TABLE FOR VALIDATION OUTPUT.
• OUTPUT –
Enroll at eLearning Solutions to become a SAP ABAP Expert, which is a stepping stone to a professional career, and learn SAP ABAP or any other basic coding language. SAP Training in Pune at eLearning Solutions is a great career choice since Orange eLearning Solutions is a great place to learn new technologies.
Training at eLearning Solutions and certification program ensures that you have a thorough understanding of the SAP ABAP Training’s essential themes. Getting certified in SAP ABAP not only increases your earning potential but also validates your understanding of the abilities required to be an effective ABAP Consultant. The certification attests to your capacity to deliver consistent, high-quality results with greater efficiency.