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

Creating internal table

Former Member
0 Likes
581

Hi

How to define a internal table for a data base table .

i need all the fields available in the database table also should available in the internal table without declaring each fields.

please hlep me

KP

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
558

Or you could just say......

data: imara type table of mara.

Regards,

RIch Heilman

5 REPLIES 5
Read only

Former Member
0 Likes
558

Hi KP,

You can use include structure statement.

Please check this sample code.


DATA: BEGIN OF I_MARA OCCURS 0.
        INCLUDE STRUCTURE MARA.
DATA: END OF I_MARA.

Regards,

Ferry Lianto

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
559

Or you could just say......

data: imara type table of mara.

Regards,

RIch Heilman

Read only

Former Member
0 Likes
558

Hi,

data: I_table type standard table of mara initial size 0.

Read only

Former Member
0 Likes
558

Hi,

another way ..

DATA: ITAB LIKE MARA OCCURS 0 WITH HEADER LINE.

Thanks,

Naren

Read only

abdul_hakim
Active Contributor
0 Likes
558

hi

you could use the below format..

data itab like table of mara.

data wa like line of itab.

or

data itab like table of mara with header line.

Cheers,

Hakim