ABAP - Keyword Documentation →  ABAP - Reference →  SAP GUI User Dialogs →  Classic Lists →  Creating Lists → 

SKIP

Quick Reference

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.

Variant 1

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. It should be noted, however, that these blank lines have no content that can be formatted using the FORMAT statement. Blank lines that can be formatted can only be created using the WRITE statement in combination with SET BLANK LINES ON.

Variant 2

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 greater 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 creates 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.