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

classical report output - vertical scroll bar control

Former Member
0 Likes
2,084

Hi,

Here is a scenario of my issue.

I have a report program.On executing i get the output with 5 pages. (every time the first page is shown in the screen by default)

I can use the vertical scroll bar and see any other pages below the first page.

Now my requirement is on executing the report, it should show me the third page. (without myself scrolling and seeing it)

What is the system variable which holds the value of the scroll position?

Thanks and regards,

Bharathi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,486

  start-of-selection.

perform idr_heading.

perform write_idr using ' '

SCROLL LIST to PAGE 3.

   at user-command.
  sy-lsind = sy-lsind - 1. 

  case sy-ucomm.

      when ucomm_sel_all.

      perform idr_heading.
      perform write_idr using 'X'.

      SCROLL LIST to PAGE 3.

*****************************************************

In the above code template....

scroll is working in the start of selection (i.e first time execution)...

if i use old debugger and see the goto->status display->display list the changes are happening live and list is moving to third page.

But on user command part scroll is not working and no movement happens in list in debugger view as mentioned above

Hi,

Here is a scenario of my issue.

I have a report program.On executing i get the output with 5 pages. (every time the first page is shown in the screen by default)

I can use the vertical scroll bar and see any other pages below the first page.

Now my requirement is on executing the report, it should show me the third page. (without myself scrolling and seeing it)

What is the system variable which holds the value of the scroll position?

Thanks and regards,

Bharathi

8 REPLIES 8
Read only

Former Member
0 Likes
1,486

Hi,

use this to set scroll position by pages

SCROLL LIST TO PAGE pag LINE lin.

more details.

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dba0d135c111d1829f0000e829fbfe/content.htm

thanks..

Read only

Former Member
0 Likes
1,486

I need to use this scroll list to page at event "at user command"

It is not working there.

Can someone tell me why?

Read only

0 Likes
1,486

Hi,

It works inside at user command also...

check this,

REPORT  y_sample_programs2 NO STANDARD PAGE HEADING LINE-COUNT 10(2) LINE-SIZE 70.

do 50 TIMES.
   write: / 'some', sy-index HOTSPOT.
   ENDDO.

at USER-COMMAND.
   case sy-ucomm.
     when '&IC1'.
   SCROLL LIST to PAGE 3.

  ENDCASE.

type &ic1 in command prompt and check.

thanks.

Read only

Former Member
0 Likes
1,487

  start-of-selection.

perform idr_heading.

perform write_idr using ' '

SCROLL LIST to PAGE 3.

   at user-command.
  sy-lsind = sy-lsind - 1. 

  case sy-ucomm.

      when ucomm_sel_all.

      perform idr_heading.
      perform write_idr using 'X'.

      SCROLL LIST to PAGE 3.

*****************************************************

In the above code template....

scroll is working in the start of selection (i.e first time execution)...

if i use old debugger and see the goto->status display->display list the changes are happening live and list is moving to third page.

But on user command part scroll is not working and no movement happens in list in debugger view as mentioned above

Read only

0 Likes
1,486

Hi,

After the user command it goes in to the second list. But the scroll that you have written after still works for the first list only.

thanks.

Message was edited by: Aswatha Narayana SA

Read only

0 Likes
1,486

Hi,

add index addition as follows.

DO 50 TIMES.
   WRITE: / 'some', sy-index, sy-lsind.
ENDDO.
SCROLL LIST TO PAGE 3.

AT USER-COMMAND.
   CASE sy-ucomm.
       NEW-PAGE LINE-SIZE 70.
     WHEN '&IC1'.
       DO 50 TIMES.
         WRITE: / 'some', sy-index, sy-lsind.
       ENDDO.
       SCROLL LIST TO PAGE 3 INDEX sy-lsind.
       sy-lsind = sy-lsind - 1.
   ENDCASE.

this works..

thanks.

Read only

Former Member
0 Likes
1,486

it worked buddy...thanks

Can you explain me sy-lsind concept with some program?

What is the use of it?

Read only

0 Likes
1,486

Hi,

sy-lsind is a system variable for list index and will increase by one whenever you create a detailed list. for example.

in your program itself you have used AT USER-COMMAND which increases sy-lsind and displays the next write statement outputs in a new list.

this is same for AT LINE-SELECTION event which has commands like PICK.

check this program.

START-OF-SELECTION.
   WRITE: 'Basic List, sy-lsind =', sy-lsind.

AT LINE-SELECTION.
   WRITE: 'Secondary List, sy-lsind =', sy-lsind.

here if you double click on the screen it displays next list.

check this link.

http://help.sap.com/saphelp_erp60_sp/helpdata/EN/9f/dba2eb35c111d1829f0000e829fbfe/content.htm

for more details search AT list_event in abapdocu

thanks.