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

Internal Table

Former Member
0 Likes
556

Hi guys,

my requirement is that i need to create a internal table same as structure as of MARA.

when i write in data declearation:

data: BEGIN OF it_final OCCURS 0,

include structure mara,

END OF it_final.

it throws a error.

please is their any another solution for that.

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
538

HI,

use like this.


data: BEGIN OF it_final OCCURS 0.
include structure mara.
data:END OF it_final.

or


DATA:itab TYPE TABLE OF mara WITH HEADER LINE.

or


DATA:itab TYPE mara occurs 0 WITH HEADER LINE.

rgds,

bharat.

5 REPLIES 5
Read only

Former Member
0 Likes
539

HI,

use like this.


data: BEGIN OF it_final OCCURS 0.
include structure mara.
data:END OF it_final.

or


DATA:itab TYPE TABLE OF mara WITH HEADER LINE.

or


DATA:itab TYPE mara occurs 0 WITH HEADER LINE.

rgds,

bharat.

Read only

Former Member
0 Likes
538

declare as :

data: it_final like mara OCCURS 0 with header line.

Read only

Former Member
0 Likes
538

Hi,

data  : BEGIN OF it_final OCCURS 0.
       include structure mara.
data  : END OF it_final.

Regards,

V.Balaji

Reward if Usefull...

Edited by: Balaji V on Apr 1, 2008 1:40 PM

Read only

Former Member
0 Likes
538

Hi,

Fist of all it is not advisable to use the internal table with header line.

Declare internal table like,

Data: itab type standard table of Mara.

Read only

Former Member
0 Likes
538

Hi,

Just make it as follows.

data: BEGIN OF it_final OCCURS 0.

include structure mara.

data : END OF it_final.

else.

use this.

data : it_final like mara occurs 0 with header line.

Regards,

Sankar.