on 05-02-2006 11:18 AM
Hello,
i am looping an internal table and i want to show the serial numbers against each records, like..
S.NO COL1 COL2
1 abc def
2 abc def
3 abc def
4 abc def
. ... ...
. ... ...
how do i output the S.NO ( which is the current row number of the interanl table ) ?
hope u have comprehended me ??
thanks..
Hi,
Take a variable of type I in the global data tab. Then in the CALCULATIONS tab of your TABLE do the following. Chose the OPERATION as CNT(number). Enter the above declared variable in the TARGET FIELD NAME and BEFORE LOOP in the TIME. And tick the INITIALIZATION check box. And print this variable in the position as a normal variable in the layout.
Thanks and Regards,
Bharat Kumar Reddy.V
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
welcome to sdn .
following is one of the solution to your problem.
tables mara.
data itab like table of mara with header line.
select * from mara into table itab.
loop at itab.
write 😕 sy-tabix,itab-matnr.
endloop.
Please reward points by clicking star.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Simply you can define a variable in the internal table as a counter for S.no and use it in smartform.This can be one of the solution.
Thanks,
Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In the SMART Forms, inside the loop of the table object declare another variable, and you can use the system variable SY-INDEX for printing.
Regards,
Ravi
Note : Please mark the helpful answers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
u can declare a variable of type sapscript-counter0 and use it for displying the current loop pass
plz mark useful replies
regards
ganesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.