sap abap tables | sap abap describe table | sap abap tables list | abap table definition | how to use sap tables | what are the types of sap tables | sap abap internal tables | sap abap table types | sap abap table control | sap abap table creation | sap abap create table view | ABAP DDIC | How to create a Table in DDIC in SAP ABAP | Table in ABAP DDIC
SAP ABAP tables : in SAP ABAP tables is an object of ABAP DDIC (Database Dictionary), tables can be defined independent of database in SAP ABAP DDIC. The tables defined in ABAP DDIC (Database Dictionary) are translated automatically into the format that is compatible with the database because the definition of the table depends on the database used by the SAP system.
A table can contain one or more fields, each fields has own definition its data type and length. The large amount of data stored in a table is distributed among the several fields defined in the table.
in ABAP Dictionary, a table definition contains the following components:
- Fields: Fields stores information.
- Foreign Keys: Foreign keys define the relationships between tables.
- Technical Settings: Technical settings specify the the settings of the table, such as data class and size category.
- Indexes: Indexes helps retrieve the rows within a table.
SAP ABAP tables Tables in System can be created with the help of the ABAP DDIC (Database Dictionary) tools, You have to follow the some simple steps and table will be created in SAP System.
Table of Contents
SAP ABAP TABLE CREATION
- Create and Configure the table fields.
- Create the Data Elements.
- Define the technical settings of a table.
- Define the Enhancement category.
DDIC IN SAP ABAP
Elements of Table Fields
|Field Name||Represents the name given to a field, which can contain a maximum 16 characters, It must begin with a letter.|
|Key Flag||Determines whether or not a field belongs to a key field.|
|Field Type||Assigns a data type to a field.|
|Field Length||Represents the number of characters or length can be entered in field.|
|Decimal Places||Defines the number of digits permitted after the decimal point, This element used only for numeric data types.|
|Short Text||Explain the meaning of corresponding field.|
There are two types of table fields available in ABAP Dictionary.
1.Currency Field: The Currency field is combination of two subfields currency field and currency key field. Field hold the numeric amount is known as currency field and which field hold the currency type is known as currency key field. for example you want to hold the value of 5000 rupees here 5000 is stored in currency field and rupees is hold in currency key field. Data type of currency field must be CURR and it must be linked with currency key field of the CUKY data type holding a currency key.
2.Quantity Field: The Quantity field is used to define measurement, The quantity field is also a combination of to subfields. The quantity fields have QUAN as the data type and must be linked with reference field that has a UNIT data type.
How to create a Table in DDIC in SAP ABAP
Creating and configure Table fields.
Process the following steps to create database tables in SAP.
1#.Go to the command box and enter the Transaction code SE11 you will redirected to ABAP Dictionary.
2#.Now in the ABAP Dictionary enter the Database table name in Database table and click on Create button like seen in below picture.
3#.Now the Dictionary Change Table screen will appears like shown in below picture, here enter the description of table in Short description field.
4#.Now click on the Delivery and Maintenance tab of Dictionary Maintain Table, In this tab you have to fill Delivery Class and Data Browser/Table View Maintenance field. We have 7 entries in delivery class and 3 entries in data browser/table view maintenance and we have to choose from these entries. Here we choose for delivery class ‘A’ and data browser/table view maintenance ‘Display/Maintenance allowed’.
5#.Now click on the Fields tab. This screen containing the options related to the field. Enter type names of table fields in the field column, A field name can be 16 characters longer, select the key column if you want the field is key field and then enter the data element if exist which is meet with your requirement else create the data elements.
Creating Data Elements.
Now the fields we entered in Field tab of Dictionary maintain table must have characteristics like it’s size, type, description etc. So the fields are created must have its data elements. Data element is characteristics or attributes of field such as data type, length, description. Now let’s see how to create data elements.
1.Enter the name for the data elements in the data element column and double click on name entered in data element field, the exit processing dialog box will appears click on yes button like shows on below mention pictures.
2.Create data elements dialog box will appears click on yes now the dictionary maintain data element screen will appear like shown in below pictures.
3.Enter short description in the short description field, and click on Data type tab.
4.Now in data type tab of Dictionary Maintain data element enter Domain in elementary type if already exist else create a new domain and enter domain.
5.Select the field Label tab in Dictionary Maintain Data Element and fill the label short, medium, long and heading which is meaningful to your data element.
6. Now click on save and activate of created data element and go back to dictionary maintain table screen.
Define the Technical settings of a table.
Now we have to maintain technical settings of a table which we want to create in Dictionary Maintain Table, Let’s discuss about technical settings of a table.
In the Technical settings of a table we define the physical area of a database in which we are creating table, Define the size of a table according to it’s number of record can be entered in the table, define table can be buffered, define buffering type of table and logging.
To define a physical area of database in which we are creating table we will use data class each data class has own characteristics to a physical area.
|Data Class Type||Description|
|APPL0 (Master Data, Transparent Table)||Stores master Data which is rarely update.|
|APPL1 (Transaction Data, Transparent Table)||Stores transactional data which is changed continuously or after each transaction.|
|APPL2 (Organizational and Customizing)||Stores organizational data such as country code. This data is created only in customization.|
1. Click on the Technical Settings button in dictionary maintain table.
2. You will redirected to Dictionary maintain technical settings here select Data class APPL0 and size category 0 like shown in below picture.
3. Click save to save technical setting and go back to Dictionary maintain table screen.
Define the Enhancement Category.
Now we process the enhancement category in creating table in sap abap.
1.In dictionary maintain table window select extra in menu tab choose enhancement category to define enhancement category like shown in below picture.
2.Now Maintain enhancement category for (table name) dialog box will open here you have to choose enhancement category, select the cannot be enhanced radio button and click on copy button.
3. Now finally in Dictionary maintain table window click on Save and then activate button. your table has been successfully created.
Types of SAP Tables
In ABAP DDIC (Database Dictionary) we can create three kind of tables which have own characteristics.
- Transparent tables
- Pooled Tables
- Cluster Tables
1. Transparent tables : Transparent tables has one to one relation in the table definition in database. transparent table is used to store application data which represent master and transactional data used by the application for example master data of vendors stores in vendor master and customer data of customer stores in customer master.
2. Pooled Tables : Pooled tables can be used to store control data screen sequences, program parameters or temporary data. Several pooled tables can be combined to form a table pool. The table pool corresponds to a physical table of the database in which all the records of the allocated pooled tables are stored.
For example : T040, T040A, B006, B007, B008, T001E – company code depended address data, MCLIK grouping of classifying attributes in LIL, B030 Specification Department, T040 Dunning Keys T040A dunning keys name. Pooled table has many to one relation means for single table there are many table in ABAP dictionary. Goto SE11 and check the table DD02L and check the field TABCLASS you will get all the pooled tables. Pool Table ( Match codes, look up tables).
3. Cluster Tables : Cluster tables has many to one relationship like pooled table, Cluster table has used when the constituent tables have a common primary key, the data from these common primary key fields can be accessed simultaneously. Cluster Table (BSEG, KONV, BSEC).
Creating records in the table
1#. Open the Table and go to Utilities —-> Table Contents —> Create Entries like shown in below picture.
2#. Change View “Table Name”: Overview window will open here you have to click on New Entries tab like shown in below picture.
3#. Now the editable window will appear here you can enter any entry and click on save button your record will be inserted in Table.
Components of Table in ABAP DDIC
Delivery and Maintenance:
Delivery and Maintenance contain Delivery Class and Display/Maintenance.
Delivery Class: Delivery class is defined under the delivery and maintenance tab of Dictionary Maintain table used to define which type of data you want to store in table. A [Application table (master and transaction data)] C [Customizing table] L [Table for Storing Temporary Data] etc.
Display/Maintenance: Display/Maintenance under the delivery and maintenance tab of Dictionary Maintain table used to define property of table mean weather we want table maintenance in deleting, creating and updating the entries.
N Display/ Maintenance Not allowed
X Display/ Maintenance Allowed
Display/ Maintenance Allowed with Restriction
Field Name: Fields stores information, Field name can be maximum 16 character.
Key Flag: It declares that particular field belongs to the key field or not.
Data Element: Fields we entered in Field tab of Dictionary maintain table must have characteristics like it’s size, type, description etc. So the fields are created must have its data elements. Data element is characteristics or attributes of field such as data type, length, description. Now let’s see how to create data elements.
Domain: Describe the Technical settings of field like data type, range etc. of field.
Data Class: Data Class is used to define class of table Means Master table, Transparent table, customizing table.
|APPL0||Master Data, Transparent Tables|
|APPL1||Transaction Data, Transparent Tables|
|APPL2||Organization and Customizing|
ABAP DDIC (Data Dictionary) OBJECT
|ABAP DDIC Object||Description|
|Domain||Describe the Technical settings of field like data type, range etc. of field.|
|Data Type||Created user-defined data type like data elements, structure and tables.|
|Type Group||Create a group of data types in ABAP DDIC.|
|Database Table||Create tables, name of table should be start with Y or Z and the maximum length of table name should be 16 characters.|
|View||Access data from database table, view perform like a virtual table as it does not store the data physically.|
|Search Help||It provide input help for F4 to a field in database table.|
|Lock Object||Access of the same set of data records by multiple users.|
What are the Internal tables in SAP ABAP?
There are 4 type of internal tables in SAP ABAP.
1 Standard Table.
2 Index Table.
3 Sorted Table.
4 Hashed Table.
What is the Tcode to open ABAP DDIC objects?
Tcode is used to create change or display ABAP DDIC objects is SE11.
What are the types of SAP Tables ABAP ?
TMG IN SAP ABAP.
TMG ( Table Maintenance Generator ) is SAP ABAP is used to create table in maintenance mode so according to abaper or user requirement we can make the entries in table at real time.
To know more about TMG please click below link.
Dear Reader hope you will like this article, please connect with us for this kind of information. Thanks.
You can Also visit : https://www.sap.com