SAP ABAP Programming Syntax for Scroll Keyword

SAP ABAP programming language has some keywords and they have some rules to follow while using them during programming the ERP language.It is as given below.

The return code value is set as follows:

SY-SUBRC = 0 O.K.
SY_SUBRC = 4 List limits have been reached - scrolling not possible
SY-SUBRC = 8 List does not exist - scrolling not possible

Variant 1

SCROLL LIST TO FIRST PAGE.

Additions

1. ... INDEX idx
2. ... LINE lin

Effect

Scrolls up to the first page of the report displayed on the screen (corresponds to a command field entry, P-- and PP-- ). When a basic list is created, the current list is itself the basic list; When a details list is created, it is the list directly below it.

Addition 1

... INDEX idx.

Effect

Scrolls to the list level idx . idx corresponds to the value of system field SY-LSIND when creating the report.

Example

Scroll to the beginning of the report at list level 1.
SCROLL LIST INDEX 1 TO FIRST PAGE.

If a new list (which is to replace the last list displayed) is created at an event ( AT USER-COMMAND , AT LINESELECTION... ), and if you want to scroll to a particular place in this new list, note the following: A change made to the system field SY-LSIND is only ever taken into account after the event. Therefore, SY-LSIND should be manipulated using the last command belonging to the event (e.g. SY-LSIND = SY-LSIND - 1 ). A SCROLL command with the addition ...INDEX idx must therefore be used for scrolling in this new list. In this way, scrolling in the old list (instead of the new list) is avoided.

Addition 2

... LINE lin

Effect

Displays the report from the line lin (corresponds to the command field entry PLnn). The standard page header and TOP-OF-PAGE area are not moved vertically and are therefore ignored when line lin is determined.

Variant 2

SCROLL LIST TO LAST PAGE.

Additions

1. ... INDEX idx (see addition 1 of variant 1)
2. ... LINE lin (see addition 2 of variant 1)

Effect

Scrolls to the last page of the report displayed on the screen (corresponds to the command field entries P++ and PP++ ).

Variant 3

SCROLL LIST TO PAGE pag.

Additions

1. ... INDEX idx (see addition 1 of variant 1)
2. ... LINE lin (see addition 2 of variant 1)

Effect

Scrolls to the specified page of the report displayed on the screen (corresponds to the command field entry PPnn ).

Examples

Scroll report on list level 1 to page 7.

SCROLL LIST INDEX 1 TO PAGE 7.
Scroll report on list level 1 to page 7 and display from line 5.
SCROLL LIST INDEX 1 TO PAGE 7 LINE 5.

Although the list is now displayed from page 7 and line 5, it is precisely this line which is overlayed by the page header, if a header exists for page 7 (standard header and/or TOP-OF-PAGE lines).

If you want to display a particular line immediately after the page header, you can use the function module 'LIST_SCROLL_LINE_TOPMOST' which makes the necessary calculations (according to DESCRIBE LIST ... ).

Related Posts:

SAP ABAP HR report for EEOC
ABAP Programming hr new hire report
SAP ABAP HR PAYROLL REPORT
ABAP HR head count report for sap
SAP ABAP FICO REPORT FOR GROUP CURRENCY RECONCILIATION
fico reconcilation report for company code currency report
SAP ABAP FICO report about profitability analysis
SAP ABAP fico report profitability analysis report
My sapcrm customers and consumer segmentation
Organizational challenges in crm and mysap solutions
Business View and Mysap.com
What is SAP R/3 introduction to mysap.com
SAP FICO cross company code reconciliation report