Search This Blog

Tuesday, January 19, 2021

Types of Internal table Declarations in ABAP

 Types of Internal table Declarations in ABAP


Three  types of internal table available in SAP ABAP.


1. Standard tables are managed system-internally by a logical index. New rows are either attached to the table or added at certain positions. The table key or the index identify individual rows.

2. Sorted tables are managed by a logical index (like standard tables). The entries are listed in ascending order according to table key.

3. Hashed tables are managed by a hash algorithm. There is no logical index. The entries are not ordered in the memory. The position of a row is calculated by specifying a key using a hash function.


Declarations : - 

TypesBEGIN OF ty_mara,
       matnr TYPE mara-matnr,  " material
       ersda TYPE mara-ersda,  " created on
       ernam TYPE mara-ernam,  " created by
       mtart TYPE mara-mtart,  " material type
      end of ty_mara.

dataIt_mara TYPE STANDARD TABLE OF ty_mara.                        " standard internal table
datait_mara2 TYPE SORTED TABLE OF ty_mara WITH UNIQUE key matnr.   " sorted internal table
datait_mara3 TYPE HASHED TABLE OF ty_mara WITH UNIQUE key matnr.   " hashed table





No comments:

Post a Comment

Pages