Getting Started with ABAP: How to Create Table Type and Deep Structure
This is the next blog post in this series. Here is the previous blog post Getting Started with ABAP: How to Create Flat and Nested Structure
In the previous blog post, we learned types of structure and how to create flat and nested structure.
In this blog post we will learn how to create table type and deep structure.
What is Table Type?
Table type is a global object which is used to define structure and functional attributes of an internal table in ABAP.
What is Internal Table?
An internal table is a dynamic data object which holds the runtime data in the form of table. It is a temporary table gets created in the memory of application server during program execution and gets destroyed once the program ends.
Data type of Internal Table
Data type of an internal table is specified by its line type, key and table type.
The line type of an Internal table can be any data type which can be structure, a table, an internal table or any data type.
Keys are the one which uniquely identifies the row.
The table type determines how ABAP will access individual table entries.
There are three types of Internal Table.
1.Standard Internal Table
2.Sorted Internal Table
3.Hashed Internal Table
How to Create Table Type
Step 1: Go to SE11 and enter name of table type. Click on Create.
Step 2: Select Table Type.
Step 3: Enter short description.
Step 4: In Line Type can be structure, table or any data type.
I am using table which is created earlier.
Step 5: Save and Activate it.
Here Table type is created.
How to Create Deep Structure
Step 1: Go to SE11 and click on data type. Enter the name of table type ZAK_TT_Test.
Step 2: Click on Create. Select Structure.
Step 3: Press Enter and give short description. Enter component name, typing method as types and component type as table type which is created earlier.
Step 4: Save and Activate it.
In this way you can add more component as per requirement.
Here we have completed the Table Type and Deep Structure.
Here you can check next blog post Getting Started with ABAP: How to Create Database View Part 1
Follow my profile to be notified of the next blog post. Please feel free to ask any questions you have in the comments section below.