2018 Apr 04 11:33 AM
hello all i want to loop a serial no in a table in smartforms
data: lv_serial_no type I value 1.
LOOP AT IT_ITAB.
* LV_SERIAL_NO = LV_SERIAL_NO + 1.
* IT_ITAB-SR = LV_SERIAL_NO.
*ENDLOOP.
but the internal tabe SR is starting with 0..
sr
0
1
2
.
pls help me.
2018 Apr 04 12:58 PM
Try this..
LOOP AT IT_ITAB.
if sy-tabix = 1.
LV_SERIAL_NO = 0.
else.LV_SERIAL_NO = LV_SERIAL_NO + 1.
endif.IT_ITAB-SR = LV_SERIAL_NO.
ENDLOOP.