Application Development 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: 

structures

Former Member
0 Kudos
67

hi folks,

how can we include structure within structure created by us can tell me the syntax please .

5 REPLIES 5

former_member186099
Contributor
0 Kudos
49

TYPES: BEGIN OF l_ty_struct.

INCLUDE TYPE sflight.

TYPES: nameflight(10) TYPE C.

TYPES: END OF l_ty_struct.

DATA: l_wa_struct TYPE l_ty_struct.

DATA: l_it_struct TYPE STANDARD TABLE OF l_ty_struct.

Please reward points if it is useful.

Thanks,

Prasanna

0 Kudos
49

Hi Vinay,

Find the below code snippent.


types: begin of <struct name>.
include type <struct name X>.
types: data1(20) type c.
types: data2(30) type c.
types: data3(40) type c.
types: end of <struct name>.

data: <wa name> type <struct name>.

Thanks

Anand D

Former Member
0 Kudos
49

Hi

types : begin of struct,

include type struct1,

kunnr typr kna1-kunnr,

end of struct.

Former Member
0 Kudos
49

Hello,

declare like this

Types: Begin of Struct2.

Include Type struct1.

Types: end of struct2.

Thanks,

Gunjan

Edited by: gunjan tyagi on Feb 19, 2008 9:19 AM

vishal_sharda2
Participant
0 Kudos
49

Hi Vinay,

You can include structure within a structure as follows:

TYPES: BEGIN OF <struct_name>.

INCLUDE STRUCTURE <already defined structure>.

TYPES: END OF <struct_name>.

Please reward points if helpful.

Best Regards,

Vishal.