Application Development and Automation 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: 
Read only

Porblems with steploop

Former Member
0 Likes
1,084

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
732

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

4 REPLIES 4
Read only

Former Member
0 Likes
732

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

Read only

Former Member
0 Likes
732

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

Read only

Former Member
0 Likes
733

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

Read only

Former Member
0 Likes
732

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