Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

nested structures

Former Member
0 Likes
6,009

hi friends,

i want to know how to do the nested structures in abap. can i do it, if means can u plz tell how to do it with the example plzzzzzz?

thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
4,056

Hi,

Create one structure--->Include another structure in that.

again include the first structure into another structure.

for Example see : LEDLV_DELNOTE structure.

5 REPLIES 5
Read only

Former Member
0 Likes
4,057

Hi,

Create one structure--->Include another structure in that.

again include the first structure into another structure.

for Example see : LEDLV_DELNOTE structure.

Read only

MarcinPciak
Active Contributor
4,056

"1. example of including structures (not nested, same level)
DATA: BEGIN OF struct1,
       field1 TYPE c,
       field2 TYPE c,
      END OF struct1.

DATA: BEGIN OF struct2,
       field3 TYPE c,
       field4 TYPE c.
        INCLUDE STRUCTURE struct1.  "<- components of struct1 are just included on same level to struct2
DATA  END OF struct2.

"2. example of nesting structures (different levels)
DATA: BEGIN OF struct3,
       field1 TYPE c,
       field2 TYPE c,
      END OF struct3.

DATA: BEGIN OF struct4,
       field3 TYPE c,
       field4 TYPE c,
       nested like struct3, "<- these components (of struct3 are nested) - included as subsctructure
      END OF struct4.

Just check in debugger how it looks like

Regards

Marcin

Read only

Former Member
Read only

Former Member
0 Likes
4,056

tcode:se11

table or

data type-> structure

You can include structures or append structures

Read only

Former Member
0 Likes
4,056

thanks to all of them who answered.