Application Development 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: 

scrolling in step loops

Former Member
0 Kudos

I have to work with Step Loops. with all the research I found

LOOP AT ITAB CURSOR CL INTO WA.

ENDLOOP.


in flow logic in the PBO event will transfer the content from internal table to the screen field automatically and it enable scrolling. when scrolled the PAI event is triggered, and in PAI,

LOOP AT ITAB.

ENDLOOP.


will automatically take care of scrolling. This kind of method display as many table rows that my screen can contain. I found these with Transaction TZ61.

Now the Problem is In my output screen I need to control how many table rows is displayed. so I made these addition.

PROCESS BEFORE OUTPUT.

LOOP AT ITAB CURSOR CL INTO WA FROM N1 TO N2..

ENDLOOP.

PROCESS AFTER INPUT.

LOOP AT ITAB.

ENDLOOP.

N1 of type I has value 1 , N2 of type I has value 5, CL of type I has value 1.

Now In output I managed to get 5 table rows as required but the scrolling event is not triggering. please guide me what are all the changes that I need to do If I made the additions FROM N1 TO N2.

when I scroll the contents are not scrolling. only the first 5 rows from the internal table is displayed. but my internal table has 100 rows.

please guide me at the earliest. I had referred sap technical and help.sap.com but I couldn't find any solution. please help.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

i solved the issue by myself. As Aditya Jangid said FROM addition is to control the number of records in Internal table. so i increased the number value to 60.

To control the number of records displayed on the screen i just made the Dynamic step loop to be a Fixed step loop with 5 number of records.

3 REPLIES 3

former_member809980
Participant
0 Kudos

hi,

PROCESS BEFORE OUTPUT.

LOOP AT ITAB into wa with control TAB_CON CURSOR CL FROM N1 TO N2..  // this will only display the restricted records

ENDLOOP.



> use CURSOR tab_con-CURRENT_line because


FROM n1 TO n2 can be used to restrict the starting line and ending line number of the internal table


> add with WITH CONTROL TAB_CON(name of your table control)

> it combines the table control and internal table

> before this we need to describe the lines into tab_con lines where you can declare how many lines do you need

> in this curser version blank rows will be disabled.

PROCESS AFTER INPUT.

LOOP AT ITAB.

ENDLOOP.



thanks



0 Kudos

hi,

sorry if this is a simple question. im a beginner.

Im using step loops. as per your suggestion i need to create a control with CONTROL command. is it required to create controls to step loops ?

and can you please explain current line concept ?

Thank you.

Former Member
0 Kudos

i solved the issue by myself. As Aditya Jangid said FROM addition is to control the number of records in Internal table. so i increased the number value to 60.

To control the number of records displayed on the screen i just made the Dynamic step loop to be a Fixed step loop with 5 number of records.