In SAP ABAP Tables, it is sometime required to maintain a table (Create, update, edit or delete a record) manually. In this case, Table Maintenance Generator helps us to achieve the same. In this article, we will explore Table Maintenance Generator and will also learn the events associated with it.
- A tool used to tailor the tables created by end users.
- End user do not have access to SE11 or SE11 T-Codes in production system so by using the generator they can customize the tables.
- The end users can create, delete and modify entries.
- After every changes done, user must go to SM30 T-code and by passing view/table name, select the maintain button to get the changes reflected.
When we create a table in SE11 ABAP Dictionary, some features need to be activated.
- Delivery class
- Delivery class are used for controlling data transport of tables for installation, upgrade, and client copy, and for transporting between customer systems.
- The delivery class is also used in extended table maintenance.
- It helps in filling seven entries.
- Data Browser/Table View Maint.
This tab states whether data can be displayed or maintain a database table or view using the tools Data Browser T-code SE16 and Table View Maintenance T-codes SM30 and SM31.
It has 3 features:-
- Display/Maintenance allowed – A user can view in data browser as well as make changes in the data browser and also maintain and display in SM30 and generate table maintenance dialog in SE54.
- Display/Maintenance allowed with restrictions – A user can view and make changes but with some restrictions.
- Display/Maintenance not allowed – A user can neither view in data browser (SE16) nor maintain.
How to Create a Table Maintenance Generator
- Go to SE11 (ABAP Dictionary) => pass the table name => change => utilities => table maintenance generator => Generate table maintenance dialog: Generation Environment.
- Pass the Authorization Group name, if there is no specific group of people then assign it to &NC& (without authorization group). In total 759 groups can be assigned.
- Authorization object – Element of the authorization system. Authorization objects allow complex checks linked to several conditions of an authorization which allows a user to carry out an action.
- Function Group – Pass the name where generated maintenance modules can be stored. It can be same as the table name.
- Maintenance Screens
- Maintenance type
- Select the maintenance type and click on find screen numbers on the tool bar=> propose screen numbers => Screen number gets populated => Create a button on the application toolbar => Assign TMG and function group to the proper package and click OK.
- A pop up appears (Request completed without errors).
- Table maintenance generator is created with this message in the status bar.
- Maintenance type
- Description of maintenance types
- One step maintenance, one screen that is overview screen is displayed in which the entries are displayed in the form of lists.
- It is processed at run time.
- Entries should be displayed in one line of the screen.
- Two step maintenance, an additional screen (single screen) is processed at run time.
- The single screen can be called from the overview screen by function key for every entry.
How to Use a Table Maintenance Generator
Follow the given steps to use a Table Maintenance Generator:
- Go to SM30
- Pass the name of the table => Maintain (click) => the overview screen appears.
- Click on NEW entries => add new entries and save (this is a part of another screen).
As mentioned, only one record at a time is allowed to enter, since it is user friendly.
- If we do any changes in the table, then we need to re -adjust, re-create TMG.
Events of a Table Maintenance Generator
Follow given steps to create Events in ABAP TMG
- SE11 => Change => TMG => Environment => Events
- After selection of type of event => Editor => Write the code between FORM/ENDFORM.
- List of available events: