How to have a structure with a table in ABAP?


The basic rule while specifying a table within a structure is that you have to give a non-unique constraint to that field.

TYPES: myType TYPE TABLE OF string WITH NON-UNIQUE DEFAULT KEY

Then use this in the structure definition:

TYPES: BEGIN OF ty_itab,
…..
myTable type myType,
……..
TYPES: END OF ty_itab.

Updated on: 10-Dec-2019

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements