How many ways can we create internal table and process it?

We can create internal table in 3 ways.

1) Creation of internal table with a new structure.

Example:

*TO CREATE ITAB WITH  NEW STRUCTURE.******

 DATA : BEGIN OF ITAB OCCURS 10,
                  ENO(3) TYPE N,
                  ENAME(30) TYPE C,
                  ESAL TYPE I,END OF ITAB.

Begin of with OCCURS creates table with HEADERLINE.

To create TABLE OCCURS SIZE is must in this SYNTAX.

2) Creation of internal table referring to structure.

*****TO CRAETE STRUCTURE****

TYPES : BEGIN OF STRUCT1,
             ENO(3) TYPE N,
                  ENAME(30) TYPE C,
                  ESAL TYPE I,END OF ITAB.
            END OF STRUCT1.

********CREATE ITAB REFERING TO ABOVE STURUCTURE*********

DATA ITAB TYPE STRUCT1 OCCURS 10.

***********HEADER LINE NOT CREATED.*******
**********CREATE HEADER LINE************

DATA WA TYPE STRUCT1.

3) Creation of internal table referring to another table.

DATA ITAB TYPE TABLE OF MARA WITH HEADERLINE.

 

 

 

Serkan AKKAVAK
Computer Engineer
SAP Department Deputy Manager
Contact : serkurumsal@yandex.com