Get Example source ABAP code based on a different SAP table
ID SCROLL • SCROLL LIST ABAP Statement
SCROLL LIST> Short Reference >
ABAP_SYNTAX SCROLL LIST $[ horizontal>$]> $[vertical>$]> $[ • idx$].>
ABAP Addition ... • idx>
What does it do? This statement scrolls the display area of a list stored in the list buffer to the position specified in horizontal>> and/or vertical >>. At least one of these additions must be specified, whereby all horizontal specifications refer to the columns of a displayed list. The corresponding section is displayed when the list is next displayed. If the SCROLL> statement is not used, a list is displayed during the initial display, starting from the first column of the first line. If the user navigates from a details list back to a lower list level, the list is displayed with the section in which it was last displayed. The SCROLL> statement sets a new first column, a new first line, or both. Each SCROLL> statement sets only the size specified in it, without changing any positions that are not affected. • • SCROLL LIST
ABAP Addition
What does it do? The list level can be specified with the addition •>, where idx> expects a data object of type i>, which contains the list index. The value of idx> must be greater than or equal to 0. If the addition •> is not specified, the list level 0 (the basic list itself) is selected when the basic list is created and the list level at which the event was raised (sy-listi >) is selected when a list event is processed. If the list level specified in idx> is not available, sy-subrc> is set to the value 8. System Fields> sy-subrc>Meaning> 0Screen section was scrolled successfully. 4Complete scrolling not possible because the list margin was reached. 8Scrolling not possible because the specified list level does not exist.
Latest notes: While scrolling through the list that is being created (sy-lsind >), it should be noted that a SCROLL> statement is ignored prior to the first output statement, since the list does not yet exist in the list buffer. ABAP_HINT_END
Example ABAP Coding
By double-clicking the basic list, it is possible to scroll down this list in the event block AT LINE-SELECTION>> to the page entered in a selection screen>. The lines on the page retain their original position with reference to the page header> by using sy-staro>. However, it is not necessary to set the column to sy-staco> explicitly, since this position is retained during vertical scrolling. ABEXA 00564 ABAP_EXAMPLE_END