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

LOOP ON INTERNAL TABLE

Former Member
0 Likes
9,457

HOW TO PUT loop on a internal table if it does not have a header row.

Plz guide

regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,094

Hi Vibhuti,

Just declare a variable with the same structure:

DATA:

zlv_myline LIKE LINE OF <your internal table>.

LOOP AT <your internal table> INTO zlv_myline.

ENDLOOP.

John.

6 REPLIES 6
Read only

Former Member
0 Likes
2,094

Hi,

Declare a strcuture/work area same as internal table.

And do as below :

loop at itab into wa.

Here comes you necessary things.

-


endloop.

Thanks,

Sriram Ponna.

Read only

Former Member
0 Likes
2,095

Hi Vibhuti,

Just declare a variable with the same structure:

DATA:

zlv_myline LIKE LINE OF <your internal table>.

LOOP AT <your internal table> INTO zlv_myline.

ENDLOOP.

John.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
2,094

data: BEGIN OF st_mara .

INCLUDE STRUCTURE mara.

data: END OF st_mara.

data:it_mara like standard table of st_mara initial size 0.

loop at it_mara into st_mara.

<st_mara holds the values>

endloop.

Read only

former_member188829
Active Contributor
0 Likes
2,094

Hi,

itab--->internal Table without Header Line.

Wa---->Work area.

Loop at itab into Wa.

Write: Wa-Field.

Endloop.

Read only

former_member673464
Active Contributor
0 Likes
2,094

hi ,

You can use work area for looping the internal table.You have to declare the work area as follows.

data:

wa_flight like line of it_flight.

loop at it_flight into wa_flight.

endloop.

In this example wa_flight is the work area created for working with internal table.

with regards,

veeresh.

Read only

Former Member
0 Likes
2,094

declare a work area like this..

data : wa like line of itab.

loop at itab into wa.

..

..

endloop.