Create a structure that contains the other structure

1: If you want to create a structure, the type with which the property is sturcture. Need to use include

Code to create:

REPORT ZHAN_TEST_USING_INCLUDE.

TYPES:
        BEGIN OF user,
          username(10) TYPE c,
          userid(10) type c,
        END OF user,
        BEGIN OF info,
          age TYPE i.
        INCLUDE TYPE user.
TYPES:  END OF info.

DATA my_info TYPE info.

my_info-username = 'mike'.
my_info-USERID = '0001'.

WRITE: my_info-username,my_info-USERID.

result:

2:

 

 

 

 

 

 

 

 

 

 

 

https://www.cnblogs.com/jiangzhengjun/p/4265707.html

https://my.oschina.net/MikeLiuzheqiang/blog/84839

Guess you like

Origin www.cnblogs.com/liyafei/p/11127566.html