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

Declare itab with include and field

Former Member
0 Likes
639

Hi,

I need to know how to declare itab that will contain table and field from another table.

somthing like that :

DATA: BEGIN OF maritab OCCURS 0,

INCLUDE STRUCTURE mari,

MTART LIKE MARA-MTART,

END OF maritab.

this is not working but i need something like that.

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
600

Hi Gil

Declare as below.

DATA: BEGIN OF maritab OCCURS 0.

INCLUDE STRUCTURE mari.

DATA: MTART LIKE MARA-MTART,

END OF maritab.

Kind Regards

Eswar

Note: Reward for helpful answers

Hi Gil

Declare as below.

DATA: BEGIN OF maritab OCCURS 0.

INCLUDE STRUCTURE mari.

DATA: MTART LIKE MARA-MTART,

END OF maritab.

Kind Regards

Eswar

Note: Reward for helpful answers

4 REPLIES 4
Read only

Former Member
0 Likes
601

Hi Gil

Declare as below.

DATA: BEGIN OF maritab OCCURS 0.

INCLUDE STRUCTURE mari.

DATA: MTART LIKE MARA-MTART,

END OF maritab.

Kind Regards

Eswar

Note: Reward for helpful answers

Read only

naimesh_patel
Active Contributor
0 Likes
600

Hello,

DATA: BEGIN OF maritab OCCURS 0<b>.</b>

<b>INCLUDE STRUCTURE mari.</b>

<b>data:</b> MTART LIKE MARA-MTART,

END OF maritab.

Regards,

Naimesh

Read only

0 Likes
600
DATA: BEGIN OF maritab OCCURS 0.
<b>INCLUDE STRUCTURE mari.</b>
<b>DATA: MTART LIKE MARA-MTART,</b>
END OF maritab.
Read only

Former Member
0 Likes
600

Hi ,

Try this way:

data : begin of maritab occurs 0.

include structure mari.

data: mtart like mara-mtart.

data : end of maritab .

Rgds,

HR