Creating a Custom Table and Its Maintenance View in SAP
Creating a Custom Table and Its Maintenance View in SAP
Ask any consultant how often they have to create custom tables and their maintenance views. And if not create them directly, then how often they have to write specifications for their development? If they answer “not often,” know this — you're dealing with a fake consultant. Actually... no doubt about it — definitely a fake consultant!
Depending on the specifics of the project, developer keys may be issued only to “official” developers, while functional consultants are left without them. But there are exceptions to the rule, and in such cases, a functional consultant may be able to “play around” and perform certain tasks without a developer’s involvement. One such task is the topic of this note — creating a custom table and its maintenance view.
Goal
Create a custom table to store a pair: two-digit identifier and a text value. For convenient management of this table, we’ll also create a maintenance view. Let’s begin.
1. Creating the Table
In transaction SE11, define the name of the new table and click Create:

On the next screen, specify the Delivery Class for the table, enable data maintenance/viewing, and enter a description:

On the Fields tab, define the fields that will be used in the table:

Click the Technical Settings button and fill in the fields as shown below:

Then go to the menu Extras -> Enhancement Category, and select Can be enhanced (character-type or any):

Activate the table.
2. Creating the Maintenance View
While still in the edit mode of the created table (after activation), go to the menu Utilities -> Table Maintenance Generator.

Fill in the fields as shown in the following screenshot and click Create.

3. Verification
Launch transaction SM30, enter the name of the view you just created, and click Maintain:

Enter some data and click Save:

The data is saved. The maintenance view works as expected. However, let’s note a few interesting details below.
FAQ
Let’s go over some common questions related to custom tables and their maintenance views.
Question #1: In the custom table, text fields are saved in uppercase. How to fix this?
In the example described, the text field was entered in lowercase but saved in uppercase. All subsequent entries in this table will also be saved in uppercase by default. To fix this, check the domain assigned to the field. In our case, it’s ZUSER_VALUES_TEXT
, with data type CHAR(40)
.

By standard behavior, this data type does not support lowercase. To allow lowercase text, change the domain to one that supports it — for example, TEXT40
:

Apply this domain to the element ZUSER_VALUES_TEXT
. Don’t forget to activate the data element after making changes.

Then return to the previously created maintenance view, enter a lowercase value, and save:


Question #2: How can I ensure that saving data to a custom table triggers a transport request?
Custom tables can be classified into:
- Directly maintained in production — No transport request should be generated.
- Maintained only in development (read-only in QA/Prod) — A transport request should be generated upon saving.
Let’s configure the table so that a transport request is created upon data saving.
Go to transaction SE11, open the table in edit mode, and go to Utilities -> Table Maintenance Generator. In the Data Transport Details section, choose Standard Recording Routine and click the Edit button.

In the popup, select Generate New Modules and press Enter.

The system will regenerate the maintenance view. Once done, open the view again via SM30, create a new record, and click Save — the system will now prompt you to save the changes to a transport request.
