How to create database table in SAP ABAP

The database table in data dictionary can be created by two methods, i.e.

  1. Direct method / Predefined type
  2. Data element type

Technical requirements to create table 

  1. In SAP ABAP, the name of table should start with word “Y” or “Z”, because A -> X words reserved for SAP
  2. Provide the deliver class that defines the owner of table and it controls to transfer the data from one table to another table
  3. Provide the technical settings & category size

Create Database table using direct method / Predefined type

Step 1: Execute SAP TcodeSE11” in the SAP command field.

SAP Tcode SE11

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
ADVERTISEMENT
SAP ABAP dicitionary initial screen

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

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

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

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

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

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

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

Successfully we have created database table in SAP ABAP.