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: 

How to know no. of records(rows) for looping object

naveen_inuganti2
Active Contributor
0 Kudos

Hi.. Friends....

> loop at tb_view.

>

> /////////

>

> endloop.

Here as naming conven' tb_view is not an internal table....its table view...

How can i perform a perticuler action in the last lap of loop.

Thanks,

Naveen.I

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi naveen,

1. We can normally loop at an internal table.

2. for performing an action in the LAST lap of loop,

i generally do like this :



data : recount type sy-tfill.

describe table tb_view.
recount = sy-tfill.

loop at tb_view.

*---------------------------------
   if sy-tabix = recount.
    *------- code for last lap
   endif.

endloop.

regards,

amit m.

1 REPLY 1

Former Member
0 Kudos

Hi naveen,

1. We can normally loop at an internal table.

2. for performing an action in the LAST lap of loop,

i generally do like this :



data : recount type sy-tfill.

describe table tb_view.
recount = sy-tfill.

loop at tb_view.

*---------------------------------
   if sy-tabix = recount.
    *------- code for last lap
   endif.

endloop.

regards,

amit m.