You are on page 1of 4

Creating dynamic internal table without any

table reference

Author : Yogesh A. Tehare

Creating dynamic internal table without table refernce - Yogesh A. Tehare 1


Objective : This document shows how to create internal table structure(table fields) at run time. In this
scenario we will not be using any table as reference. We will add table fields for internal
table at run time.

Below is the code snippets for code.

1. Declare the field symbol for internal table and work area.

2. Decalre field-catalog for internal table creation.

3. Add fields to internal table.

Here INTLEN is the inernal length for table field, DATATYPE is the data type of field whether it is
quantity , curreny or character field. You can put anything in fieldname.

Creating dynamic internal table without table refernce - Yogesh A. Tehare 2


4. Thus you can fill field-catalog to create internal table. This field-catalog holds the structure for
your internal table.
Note :- Name of fields in field-catalog must be unique.

5. Now use following method to create internal table.

6. Now you have internal table <T_DYNTABLE> and its work area <FS_DYNTABLE>.

7. Now we are going to populate this internal table.

Creating dynamic internal table without table refernce - Yogesh A. Tehare 3


Thus we have appended one record to internal table. If we want to append multiple records to
internal table then we have to include above code in loop for table population.

Creating dynamic internal table without table refernce - Yogesh A. Tehare 4

You might also like