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

hi --- report

Former Member
0 Likes
758

hi

i want to have code that will take only 20 records on outputlist at a time and when pressed button next 20 records to be displayed.

thanx

rocky

hi

i want to have code that will take only 20 records on outputlist at a time and when pressed button next 20 records to be displayed.

thanx

rocky

5 REPLIES 5
Read only

former_member188827
Active Contributor
0 Likes
744

loop at itab.

if sy-tabix gt 20.

exit.

else.

write:/.......

endif.

endloop.

apply same logic for 40 and above and soon.

Message was edited by:

abapuser

Read only

Former Member
0 Likes
744

Hi.

(global declaration)

data: v_var type i.

(in your program)

v_var = sy-tabix + 20.

loop at it_tab into wa_tab.

if sy-tabix > v_var.

exit.

else.

write: / wa_tab.

endloop.

Read only

Former Member
0 Likes
744

//first time

cnt =1.

loop at itab.

if sy-tabix < =20*cnt and sy-tabix >= 20 * (cnt - 1 ).

write.....

endif.

endloop.

//on next button press

cnt = cnt + 2

Read only

Former Member
0 Likes
744

hi rocky,

data:

w_no1 type i,

w_no2 type i.

preform list_output.

at user-command.

if sy-ucomm eq 'fcode'.

w_no1 = w_no1 + 20.

w_no2 = w_no2 + 20.

perform list_output.

form list_output.

loop at itab.

if sy-tabix le w_no1 and sy-tabix ge w_no2.

write:/.....

endif.

endloop.

endform.

try this logic it will work when u click next button.

REWARD IF USEFULL.

Read only

Former Member
0 Likes
744

ROCKY,

GIVE W_NO2 DEFAULT VALUE 20.

IT WILL WORK

REWARD IF USEFULL.