How to Create Custom Tables in SAP ABAP — Complete SE11 Guide
Table of Contents
- • What is a Database Table in SAP ABAP?
- • Standard Tables vs Custom Z-Tables
- ↳ Rules for Custom Tables:
- • Essential Components Before Creating a Table
- ↳ 1. Client Dependency (MANDT Field)
- ↳ 2. Primary Key Design
- ↳ 3. Data Elements and Domains
- • Step-by-Step: Creating a Custom Table in SE11
- ↳ Step 1: Open Transaction SE11
- ↳ Step 2: Configure Header Attributes and Delivery Class
- ↳ Step 3: Define Table Fields
- ↳ Step 4: Configure Technical Settings
- ↳ Step 5: Save and Activate
- • Maintaining Table Data with SE16N
- ↳ Step-by-Step Data Entry in SE16N:
- • Interacting with Custom Tables in ABAP Code
- • Quick Checkpoint — Test your understanding
- • Common mistakes to avoid

When business users ask for a new feature in SAP, nine times out of ten, standard SAP tables won’t fit the exact business requirement.
For example, a manufacturing client needed to track custom quality inspection approvals for raw steel deliveries. Standard SAP Material Management (MM) stores purchase orders in EKKO and material movements in MSEG, but it has no standard place to record custom inspector digital signatures, lab test results, and regional clearance IDs.
To solve this, we created a custom Transparent Table in transaction SE11 named ZQUALITY_INSP.
Creating database tables is a fundamental skill for any ABAP developer. Every custom SAP solution — whether it is a Fiori application, a custom background program, an ALV report, or a BTP cloud integration — relies on custom tables to store persistent data safely.
This guide provides a comprehensive step-by-step masterclass on creating, configuring, and maintaining database tables in SAP ABAP using transaction SE11.
What is a Database Table in SAP ABAP?
A database table in SAP ABAP is a two-dimensional matrix stored on the underlying database server. It organizes enterprise data into rows (records) and columns (fields).
Table: ZEMPLOYEE_MASTER (Transparent Table)
MANDT │ EMP_ID │ FIRST_NAME │ LAST_NAME │ DEPT_ID │ SALARY │ JOIN_DATE
──────┼────────────┼────────────┼───────────┼─────────┼───────────┼───────────
100 │ 0000100001 │ Rahul │ Sharma │ IT01 │ 85000.00 │ 20240115
100 │ 0000100002 │ Ananya │ Verma │ HR02 │ 72000.00 │ 20240301
100 │ 0000100003 │ Vikram │ Singh │ FIN01 │ 95000.00 │ 20231110
Every database table in SAP consists of:
- Client Field (MANDT): Enables client-dependency so different SAP clients (e.g., Client 100, Client 200) share the same table structure without seeing each other’s private records.
- Primary Keys: One or more fields that uniquely identify every row in the table.
- Data Fields: Non-key columns containing actual attribute values.
- Technical Settings: Configurations controlling physical tablespace allocation, size categories, and memory buffering.
Standard Tables vs Custom Z-Tables
SAP delivers over 100,000 standard database tables out-of-the-box:
MARA— Material Master General DataVBAK— Sales Document Header DataVBAP— Sales Document Item DataKNA1— Customer Master General DataLFA1— Vendor Master General DataBKPF— Accounting Document HeaderBSEG— Accounting Document Segment (Line Items)
Rules for Custom Tables:
- Naming Namespace: Custom table names must start with Z or Y (e.g.,
ZEMPLOYEE_TABLE,YCUSTOMER_MOD). - Never modify standard tables directly: If you need to add custom fields to a standard SAP table (like
MARA), use Append Structures or CI Includes — never alter the standard table directly.
Essential Components Before Creating a Table
Before opening SE11 to create a table, you need to design three fundamental elements:
┌─────────────────────────────────────────────────────────────┐
│ Table Field Design Architecture │
├─────────────────────────────────────────────────────────────┤
│ 1. MANDT (Client Field) — Required for Client-Dependent Data│
│ 2. Primary Key Fields — Uniquely Identifies Each Row │
│ 3. Data Elements — Defines Semantic Labels & Titles │
│ 4. Domains — Defines Data Types, Length & Rules│
└─────────────────────────────────────────────────────────────┘
1. Client Dependency (MANDT Field)
In SAP, a single system installation can contain multiple logical tenants called Clients (e.g., Client 100 for testing, Client 200 for training).
To make your table client-dependent, the very first field must be named MANDT (or CLIENT), checked as a Primary Key, and assigned the standard Data Element MANDT.
When an ABAP program executes a SELECT statement on a client-dependent table, Open SQL automatically filters results by the user’s current login client (SY-MANDT).
2. Primary Key Design
A Primary Key consists of one or more fields whose combination MUST be unique across all rows in the table.
- In
ZEMPLOYEE_MASTER, the combination ofMANDT+EMP_IDis the Primary Key. - In
ZORDER_ITEMS, the Primary Key isMANDT+ORDER_NO+ITEM_NO.
If a user tries to insert a row with a duplicate primary key combination, the database rejects the operation and triggers a short dump (DABP_UNIT_DUPLICATE_KEY or DBIF_RSQL_INVALID_RSQL).
3. Data Elements and Domains
Every field in an ABAP table references a Data Element, which in turn references a Domain.
- Domain: Sets physical storage rules (e.g.,
CHAR 10,NUMC 8,CURR 15,2). - Data Element: Sets business descriptions and column headers shown on Fiori apps and SAP GUI screens.
Step-by-Step: Creating a Custom Table in SE11
Let’s walk through creating a custom table ZSTUDENT_MASTER to store student records.
Step 1: Open Transaction SE11
- In the SAP GUI command field, type
/nSE11and press Enter. - Select the Database table radio button.
- Type
ZSTUDENT_MASTER. - Click Create.
Step 2: Configure Header Attributes and Delivery Class
- In Short Description, enter:
"Student Master Data Table". - Switch to the Delivery and Maintenance tab:
- Delivery Class: Select
A(Application table for master/transaction data). - Data Browser/Table View Maint.: Select
Display/Maintenance Allowed.
- Delivery Class: Select
Delivery Class Options:
A = Application table (Master and transaction data)
C = Customizing table (Maintained by customer, transported)
L = Temporary data table
Step 3: Define Table Fields
Switch to the Fields tab. Enter the following columns:
| Field | Key | Init | Data Element | Data Type | Length | Short Description |
|---|---|---|---|---|---|---|
MANDT | X | X | MANDT | CLNT | 3 | Client |
STUDENT_ID | X | X | ZDE_STUDENT_ID | NUMC | 8 | Student ID Number |
FIRST_NAME | ZDE_FIRST_NAME | CHAR | 40 | First Name | ||
LAST_NAME | ZDE_LAST_NAME | CHAR | 40 | Last Name | ||
COURSE_CODE | ZDE_COURSE_CODE | CHAR | 10 | Enrolled Course | ||
ENROLL_DATE | DATUM | DATS | 8 | Date of Enrollment |

Step 4: Configure Technical Settings
Click the Technical Settings button in the toolbar (or press Ctrl + Shift + F1).
- Data Class: Select
APPL0(Master Data). - Size Category: Select
0(0 to 8,000 expected records). - Buffering: Select
Buffering Not Allowed(orBuffering Allowed but Switched Off). - Click Save (
Ctrl + S) and return to the main table screen (F3).

Step 5: Save and Activate
- Press
Ctrl + Sto save the table. Assign it to a local package ($TMP) or transport request. - Press
Ctrl + F3to activate.
SAP compiles the Dictionary object and generates the physical database table structure on the underlying database server. You should see the message: "Object activated".
Maintaining Table Data with SE16N
Once your table is active, you need a way to insert, edit, and view records.
Transaction SE16N (General Table Display) is the standard tool used by developers and consultants to inspect and maintain table entries.
Step-by-Step Data Entry in SE16N:
- Type
/nSE16Nin the command field. - In the Table field, enter
ZSTUDENT_MASTER. - Type
&SAP_EDITin the command field and press Enter (enables edit mode if authorized). - Click Execute (F8).
- Click Add Row (or press
F6). - Enter student data in the grid rows:
STUDENT_ID │ FIRST_NAME │ LAST_NAME │ COURSE_CODE │ ENROLL_DATE
───────────┼────────────┼───────────┼─────────────┼────────────
10000001 │ Rahul │ Sharma │ CS101 │ 2026-08-01
10000002 │ Ananya │ Verma │ IT202 │ 2026-08-02
- Click Save (
Ctrl + S). SAP writes records directly to the physical table.

Interacting with Custom Tables in ABAP Code
As an ABAP developer, you interact with custom database tables using Open SQL statements inside your programs:
REPORT z_student_demo.
" 1. Read data from custom table using SELECT
SELECT *
FROM zstudent_master
INTO TABLE @DATA(lt_students)
WHERE course_code = 'CS101'.
IF sy-subrc = 0.
LOOP AT lt_students INTO DATA(ls_student).
WRITE: / ls_student-student_id, ls_student-first_name, ls_student-last_name.
ENDLOOP.
ENDIF.
" 2. Insert a new row using INSERT
DATA(ls_new_student) = VALUE zstudent_master(
student_id = '10000003'
first_name = 'Vikram'
last_name = 'Singh'
course_code = 'ME301'
enroll_date = sy-datum
).
INSERT zstudent_master FROM @ls_new_student.
IF sy-subrc = 0.
COMMIT WORK.
WRITE: / 'New student record created successfully!'.
ENDIF.
Quick Checkpoint — Test your understanding
Question 1: Why is the MANDT field required as the first primary key field in custom application tables?
Answer: To make the table client-dependent. This ensures different logical SAP tenants (clients) share the same table structure while keeping their private data isolated.
Question 2: Which transaction codes are used to create a table and to maintain table data records?
Answer: Transaction SE11 is used to create and alter table structures. Transaction SE16N (or SE16) is used to display and maintain table records.
Question 3: What happens if an ABAP program attempts to insert a record into a custom table with a primary key combination that already exists?
Answer: The database operation fails and sets
sy-subrc = 4(or triggers a duplicate key short dump if direct SQL insertion fails).
Common mistakes to avoid
Mistake 1: Forgetting to activate Technical Settings. If you define fields on a table in SE11 but forget to set Data Class and Size Category in Technical Settings, SAP will block table activation with the error "Technical settings missing".
Mistake 2: Changing primary key structure on populated tables. Changing key fields on a table that already contains 500,000 rows requires a database table conversion (transaction SE14). Doing this without taking a database backup can lead to data truncation or corrupted primary keys.
Mistake 3: Omitting the Initial Value checkbox on mandatory key fields. Always check the Initial Value checkbox for key fields on custom tables. This ensures NULL database values are automatically converted to space/zero default values in Open SQL queries.
Mistake 4: Hardcoding client numbers in ABAP SELECT statements. Never write WHERE mandt = '100' in Open SQL queries. Open SQL handles client filtering automatically via sy-mandt. Hardcoding client numbers breaks portability across QA and Production landscapes.
Related reads on this site:
- What is a Domain in SAP ABAP? — defining data types and length
- SAP ABAP Data Element — defining semantic labels for table columns
- Table Maintenance Generator (TMG) — building maintenance screens for custom tables
Written by Daksh Dedha
SAP Technical ConsultantDaksh is an SAP Technical Consultant specializing in ABAP programming, SAP S/4HANA migrations, Fiori development, and BTP cloud architecture. He authors free, hands-on tutorials to make enterprise SAP education accessible to all developers.
Test Your Knowledge
Loading question...
Quiz Completed
Related Tutorials
Search Helps in SAP ABAP — Elementary and Collective Search Help (SE11)
Complete guide to Search Helps in SAP ABAP. Learn how to create Elementary and Collective Search Helps in SE11, assign F4 help to input fields, and use search help exits.
Data DictionaryTable Maintenance Generator in SAP ABAP: Step-by-Step Guide
Learn how to create a Table Maintenance Generator (TMG) in SAP ABAP using transaction code SE11, maintain data with SM30, and avoid common mistakes.
Data DictionarySE11 Transaction Code in SAP ABAP: Complete ABAP Dictionary Guide
Master the fundamentals of the SE11 transaction code in SAP ABAP. Learn how to navigate the ABAP Dictionary, create tables, domains, views, search
Found this tutorial useful? Share it with your SAP development team.