Table Maintenance Generator in SAP ABAP: Step-by-Step Guide
![]()
A Table Maintenance Generator (TMG) is a standard tool in SAP ABAP that automatically generates a maintenance interface (screens) for a custom table. This allows users to add, edit, or delete database records without requiring developers to write custom CRUD screens.
While developers create custom tables to store company-specific data, business users need a way to keep this data up-to-date. TMG provides an out-of-the-box maintenance interface for this purpose.
What is a Table Maintenance Generator?
The generator automatically builds database maintenance screens for a specific table, enabling users to:
- Add new records
- Edit existing records
- Delete outdated records
- Display all table entries
Without TMG, you would have to write custom screen layouts, logic, and transaction codes just to support basic data entry. TMG automates this entirely, saving valuable development hours.
Why Do We Use a Table Maintenance Generator?
For example, instead of coding a custom transactional program for HR personnel to enter new hires into ZEMPLOYEE, you can generate a TMG. SAP automatically builds the screen interface, letting users maintain employee records independently.
Benefits of Using TMG
- Saves Time: SAP generates the maintenance screen and program automatically.
- Simple Maintenance: Non-technical users can update records independently.
- Zero Coding: Standard SAP frameworks process database commits, updates, and validations.
- Clean Grid Layouts: Data is displayed in tabular grids or single-row form layouts.
- Configuration-Friendly: TMG is the preferred way to maintain custom configuration tables.
Prerequisites
Before generating a Table Maintenance Generator, make sure:
- You have access to SAP GUI with development authorizations.
- Your target custom table (e.g.,
ZEMPLOYEE) is created and activated successfully. - You have a custom Function Group created to host the generated screens.
Steps to Create a Table Maintenance Generator
Follow this step-by-step tutorial to create a TMG:
Step 1: Open Transaction SE11
Go to the SAP command field, type SE11, and press Enter to open the ABAP Dictionary screen.
.png)
Step 2: Display the Custom Table
Select the Database Table radio button, enter your custom table name (e.g., ZEMPLOYEE), and click Display.

Step 3: Launch Table Maintenance Generator Wizard
From the top application menu, navigate to: Utilities ➔ Table Maintenance Generator
Step 4: Fill in the Generator Parameters
On the screen that appears, enter the following parameters:
- Authorization Group: For development or learning purposes, enter
&NC&(which means no authorization group restriction). - Function Group: Enter a custom Function Group name starting with
ZorY(e.g.,ZFG_EMP). - Maintenance Type: Select One Step (this generates a single list grid for adding and editing records).
- Maintenance Screens: Choose Find Screen Numbers ➔ select Propose Screen Numbers on the dialog. SAP will automatically assign the next available screen numbers (e.g., Screen
0001).

Step 5: Click Create
After entering the parameters, click the Create (Paper icon) button on the top-left toolbar.
Step 6: Save and Transport
A dialog window will pop up asking for a package. Assign a package (or select Local Object) and save the generated screens under an active transport request.
Step 7: Activate the Objects
SAP will generate the dialog programs and screens. Once the generation is complete without errors, your Table Maintenance Generator is fully active and ready to test!
How to Test the TMG (SM30)
Once the generator is active, follow these steps to test the interface:
Step 1: Open Transaction SM30
Go to the command field, enter transaction code SM30, and press Enter.
Step 2: Enter the Table Name
In the Table/View field, type your custom table name (e.g. ZEMPLOYEE), and click the Maintain button.
Step 3: Add and Edit Data
The generated screen will open. You can now:
- Click New Entries to add rows.
- Select a row and click Delete to remove a record.
- Edit text in the fields directly.
- Click Save to commit the changes to the database.
.png)
Difference Between SE16 and SM30
Many beginners get confused between these two transaction codes. Here is a quick comparison:
| Transaction | Primary Purpose | Can Edit Data? |
|---|---|---|
SE16 / SE16N | Display and view database records. | View Only (by default) |
SM30 | Add, update, and delete table entries. | Full Maintain |
💡 Quick Rule: If you want to change table data, always use
SM30. For simply viewing or reporting on data, useSE16.
Common Mistakes to Avoid
⚠️ Function Group is Missing: You must specify a valid, active Function Group before generating a TMG. If the group does not exist, create it in SE37 first.
⚠️ Table is Not Activated: Always verify that the custom table is fully activated in SE11 before running the TMG wizard.
⚠️ Skipping Transport Request: Do not skip assigning a package and transport request if you plan to move the maintenance table from the Development environment to Quality Assurance (QA) or Production (PROD).
Best Practices
- Always use standard
ZorYprefixes for custom tables and function groups. - Keep configuration tables separate from transactional tables, and only expose configuration tables to TMG.
- Use the One Step maintenance type for tables with fewer fields, as it is much faster and simpler for users to update.
- Always verify your generated screens in
SM30to check that the layout and field widths look user-friendly.
Conclusion
The Table Maintenance Generator is a powerful time-saver in SAP ABAP. It eliminates boilerplate CRUD programming. Learning to generate a TMG and maintain records via SM30 lets you provide valuable tools for functional consultants and configuration managers.
Test Your Knowledge
Loading question...
Quiz Completed
Found this tutorial useful? Share it with your SAP development team.