TMG events in ABAP

 * To fetch some value of the table’s field automatically using very useful features of ABAP – TMG Events in SAP ABAP.

***************************Creation of table*************************

Step 1.1: Goto T-code SE11.

Step 1.2: Give table name and click on create button.

Step 1.3: Give Short text, select delivery class (A / C), select data browser (X Display & maintenance allowed).

Step 1.4: Click on fields tab and give filed names and data elements.

Step 1.5: Click on technical settings and give data class (APPL 0) and size category (0).

Step 1.6: Click on save.

Step 1.7:  Check and activate the table.

***************************End of table creation ****************************

*****************************Create TMG *********************************

Step 2.1: Goto utilities, click on table maintenance generator.

Step 2.2: Give authorization group and function group.

Step 2.3: Select maintenance type and maintenance screen number.


Step 2.4: Click on create button.

Step 2.5: Click on Environment then select modification and click on maintenance screen.

Step 2.6: Select screen number and click on OK.



Step 2.7: Click on layout.

Step 2.8: Change the texts and execute.

Step 2.9: Activate the screen.

*****************************End TMG *********************************

*****************************Events **********************************

Step 3.1: Click environment, modifications and click on events.

Step 3.2: 
Create a FORM routine to write the code for updating the table. Here, I have selected “01” for Capture the changes before saving and “05” for creating a new entry.

Step 3.3: 
 Go to the create new entry editor to write the code by using the Editor icon as shown.

Step 3.4:  Go to the before saving editor to write the code by using the Editor icon as shown.


Step 3.5: Activate all those related to TMG.

*****************************End of events *********************************

Checking
    1. Goto T-code SM30.
    2. Click on new entries.
     3. Give Student ID, name, gender and press enter. 
     4. Automatically populate the created on and created by. 



******************************Thank You***************************

Comments

Popular posts from this blog

Pf status and user command in factory method - OOPS ALV in ABAP

fetch the data from table and send an email in ABAP

Enhancements in abap