How to create database table in SAP ABAP
The database table in data dictionary can be created by two methods, i.e.
- Direct method / Predefined type
- Data element type
Technical requirements to create table
- In SAP ABAP, the name of table should start with word “Y” or “Z”, because A -> X words reserved for SAP
- Provide the deliver class that defines the owner of table and it controls to transfer the data from one table to another table
- Provide the technical settings & category size
Create Database table using direct method / Predefined type
Step 1: Execute SAP Tcode “SE11” in the SAP command field.
![SAP Tcode SE11](https://www.tutorialkart.com/wp-content/uploads/2019/06/SAP-Tcode-SE11.png)
Step 2: In next screen “ABAP Dictionary: Initial Screen” update the following details
- Choose the database table radio button and
- Enter the required name of database table in the field. The name of table should be start with only Y or Z as we discussed earlier.
- After entering table name, click on create button
![SAP ABAP dicitionary initial screen](https://www.tutorialkart.com/wp-content/uploads/2019/06/SAP-ABAP-dicitionary-initial-screen.png)
Step 3: In next screen “Dictionary: Maintain table” enter the following details
- Enter the short description of table
- Deliver class: Update the deliver class as “A” (Application table (master and transaction data). You can choose deliver class from the list.
- Data browser / Table view maintain: Choose display/maintenance allowed from drop down.
![Dictionary Maintain table in SAP ABAP](https://www.tutorialkart.com/wp-content/uploads/2019/06/Dictionary-Maintain-table-in-SAP-ABAP.png)
After maintaining all the required details in delivery and maintenance tab, choose the fields tab.
Step 4: Click on predefined type option as shown below image.
![database table predefined type in sap abap](https://www.tutorialkart.com/wp-content/uploads/2019/06/database-table-predefined-type-in-sap-abap.png)
Step 5: In the fields screen, enter the following details.
- Field Name: Update the name of field
- Key: Choose the option key for the field to activate the field as the table key
- Data type: Choose the data type i.e. Numerical or Character
- Length: Update the allowed length for the field to be updated.
![How to Create database table in SAP ABAP](https://www.tutorialkart.com/wp-content/uploads/2019/06/How-to-Create-database-table-in-SAP-ABAP.png)
After maintaining all the required details, click on save icon to save the maintained database table in SAP ABAP. A window”create object directory entry” displays to enter the package name. Click on local object.
![Create object directory entry for database table in SAP](https://www.tutorialkart.com/wp-content/uploads/2019/06/Create-object-directory-entry-for-database-table-in-SAP.png)
Press enter to continue. Now a message displays as “ZEMPLOYEE” created.
Activate database table
After maintaining new database table in SAP, next step is activation of table.
To activate table, click on Goto –> Technical Settings or use keys Ctrl+Shift+F9.
![tables technical settings in SAP](https://www.tutorialkart.com/wp-content/uploads/2019/06/tables-technical-settings-in-SAP.png)
In next screen, Dictionary: Maintain technical settings, enter the following details
- Data class: Enter the data class from drop down
- Size category: Update the size category for the table that specifies the size required for table.
![Dictionary Maintain technical setting in SAP](https://www.tutorialkart.com/wp-content/uploads/2019/06/Dictionary-Maintain-technical-setting-in-SAP.png)
Click on save icon and save the technical settings in SAP.
Click on back and click on activate icon (Ctrl+F3) to activate the created database table in SAP.
![Activate Database Table in SAP ABAP](https://www.tutorialkart.com/wp-content/uploads/2019/06/Activate-Database-Table-in-SAP-ABAP.png)
Successfully we have created database table in SAP ABAP.