SAP NetWeaver AS ABAP Release 740, ©Copyright 2014 SAP AG. All rights reserved.
ABAP Keyword Documentation → ABAP − Reference → User Dialogs → Classic Lists → Creating Lists →Syntax
SKIP { [n]
| {TO LINE line} }.
Variants:
1. SKIP [n].
2. SKIP TO LINE line.
Effect
Positions the list cursor relative to the current line or in any other line.
SKIP [n].
Effect
This statement positions the list cursor relative to the current line. The new line is determined by the value of n. n expects a data object of type i. If the value of n is less than or equal to 0, the statement is ignored. If n is not specified, the statement is executed as if n contains the value 1.
The cursor is positioned as follows:
Note the following special conditions:
Note
In most cases, this variant of the statement SKIP works as if it creates
n blank lines. You need to ensure, however, that these blank lines have no
content that can be formatted by the FORMAT
statement. Formattable blank lines can only be generated by the WRITE statement
in combination with SET BLANK LINES ON.
SKIP TO LINE line.
Effect
This statement positions the list cursor in the first position of the line on the current page whose
number is determined by the value in line. line
expects a data object of type i. If the value of line
is less than or equal to 0, or larger than the page length defined in sy-linct
using the addition LINE-COUNT
of the introductory program statement, or NEW-PAGE,
the addition TO LINE is ignored and the statement SKIP without additions is executed instead.
Note
If the list cursor is positioned in the first list line using SKIP TO LINE,
and the list has a standard page header, the output in the first line is overwritten by the standard
header. If, however,the cursor is positioned using SKIP TO LINE in the lines
of page headers and page footers that are defined for
TOP-OF-PAGE and END-OF-PAGE, the page headers or footers are overwritten.
Example
The first SKIP statement generates a blank line for the event TOP-OF-PAGE. The second SKIP statement positions the list cursor in this line.
REPORT demo_skip NO STANDARD PAGE HEADING.
DATA sum TYPE i.
TOP-OF-PAGE.
SKIP.
ULINE.
START-OF-SELECTION.
DO 10 TIMES.
WRITE / sy-index.
sum = sum + sy-index.
ENDDO.
SKIP TO LINE 1.
WRITE: 'Numbers with sum' COLOR COL_HEADING,
sum COLOR COL_TOTAL.