2006 Sep 19 10:22 AM
Hallo boys and girls,
my report displays an internal table using a steploop. this works quite good.
When i try to scroll whole pages within my steploop (right-mouse click a bit above the both top and down buttons of the horizental scrollbar of the steploop area ) nothing happens. all other scrolling works perfectly. after debugging i found the error. the variable gv_crs within the loop endloop does not keep tis value. after leaving the loop, gv_crs looses its value and get its origin value. Therefore no effect will take place.
thanks a lot,
Marcel Ebert
2006 Sep 19 10:42 AM
Hi,
I guess you can store the value in some global variable and then you can reassign it back before the loop starts.
That'll solve your issue
Regards
Nishant
Hallo boys and girls,
my report displays an internal table using a steploop. this works quite good.
When i try to scroll whole pages within my steploop (right-mouse click a bit above the both top and down buttons of the horizental scrollbar of the steploop area ) nothing happens. all other scrolling works perfectly. after debugging i found the error. the variable gv_crs within the loop endloop does not keep tis value. after leaving the loop, gv_crs looses its value and get its origin value. Therefore no effect will take place.
thanks a lot,
Marcel Ebert
2006 Sep 19 10:33 AM
Hi Marcel
I'm not sure if I understand your question correctly but can you define gv_crs as a Static field so that it retains its value. Either that or store the its value in another variable before it is re-initialised and then assign the stored value to it at the beginning of the loop.
Hope that helps
Andy
2006 Sep 19 10:41 AM
Hi,
to reset value use below logic
data gv_step like sy-tabix.
gv_crs = gv_step.
loop at itab.
endloop.
gv_step = gv_crs.
Regrads
Amole
2006 Sep 19 10:42 AM
Hi,
I guess you can store the value in some global variable and then you can reassign it back before the loop starts.
That'll solve your issue
Regards
Nishant
2006 Sep 19 10:49 AM
Hi Try this,
FORM loop_scrolling_set .
*- data
DATA lv_lines TYPE i.
DATA lv_tabline TYPE i.
DATA lv_last_line TYPE i.
DATA lv_loopc TYPE i.
Lines of table
DESCRIBE TABLE <gt_scr> LINES lv_lines.
IF lv_lines <= 1.
deactivate 'field-PGDN'.
deactivate 'field-PGUP'.
EXIT.
ENDIF.
First line of step line, get_line( ).
lv_tabline =
Lines in step-loop , get_loopc( ).
lv_loopc =
IF lv_lines > lv_tabline.
Index of table row at the end of step-loop
lv_last_line = lv_tabline + lv_loopc - 1.
IF lv_lines <= lv_last_line.
Last page displayed -> disable PGDN
deactivate 'field-PGDN'.
ENDIF.
ENDIF.
IF lv_tabline = 1.
First page displayed -> disable PGUP
deactivate 'field-PGUP'.
ENDIF.
ENDFORM. " loop_scrolling_set
Regards,
Senthil