1

Getting Started with ABAP: How to Create Table Type and Deep Structure

 1 year ago
source link: https://blogs.sap.com/2022/06/20/getting-started-with-abap-how-to-create-table-type-and-nested-structure/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
June 20, 2022 2 minute read

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.

Line 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.

Key

Keys are the one which uniquely identifies the row.

Table Type

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.

1-78.png

Step 2: Select Table Type.

2-30.png

Step 3: Enter short description.

3-26.png

Step 4: In Line Type can be structure, table or any data type.

I am using table which is created earlier.

4-29.png

Step 5: Save and Activate it.

5-24.png

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.

6-28.png

Step 2: Click on Create. Select Structure.

7-24.png

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.

8-23.png

Step 4: Select enhancement category as Can be enhanced (Deep).

9-22.png

Step 5: Save and Activate it.

10-16.png

In this way you can add more component as per requirement.

Here we have completed the Table Type and Deep Structure.

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.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK