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: 

sy-tabix for internal table in smartform

Former Member
0 Kudos

Hi friends,

How to capture the sy-tabix value for the entries in an internal table which has been looped into the loop of table node of a smartform?? I need to print something immedaitely after the end of the table

For every record the value of sy-tabix is showing 1 !!

Advance Thanks

Aadarsh

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Aadarsh,

Give ur sy-tabix at the end of the loop.

loop at itab.

//table node populations.

endloop.

give a seperate loop for this.

loop at itab.

sy-tabix.

endloop

get the total no and print it after the table.

If u r using do loop then give sy-index.

Hope tihs helps u,

Regards,

Nagarajan.

Message was edited by: Nagarajan Kumarappan

3 REPLIES 3

Former Member
0 Kudos

Hi Adarsh,

Have a local variable declared in the smart form.

After the loop, create a program code node, and just keep incrememnting this. This will just simulate your sy-tabix.

Remember to reset it once your looping is done.

Pls reward points & close the thread if your Q is answered.

Rgds,

Prabhu>

Former Member
0 Kudos

Hi Aadarsh,

Give ur sy-tabix at the end of the loop.

loop at itab.

//table node populations.

endloop.

give a seperate loop for this.

loop at itab.

sy-tabix.

endloop

get the total no and print it after the table.

If u r using do loop then give sy-index.

Hope tihs helps u,

Regards,

Nagarajan.

Message was edited by: Nagarajan Kumarappan

0 Kudos

how <b>do loop</b> works inside samrt form...

as prashant said you need to declare a variable and you need to increment it, it will give correct value.

vijay.