SAP SKIP ABAP Statements



Get Example source ABAP code based on a different SAP table
  


ID SKIP
• SKIP ABAP Statement

SKIP
Short Reference

ABAP_SYNTAX
SKIP ${ $[n$]
$| ${TO LINE line$} $}.

ABAP_VARIANTS:
1 SKIP $[n$].
2 SKIP TO LINE line.

What does it do?
Positions the list cursor relative to the current line or in any other line.

ABAP_VARIANT_1 SKIP $[n$].

What does it do?
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:
If the line of the current list cursor was set using an output statement (WRITE, ULINE), the list cursor is set the first position of the line that is n lines under the current line.
If the lines of the current list cursor was set using a positioning statement (BACK, NEW-LINE , NEW-PAGE, SKIP), the list cursor is set in the current position in the line that is n minus 1 lines under the current line.
The following special conditions should be noted:
If the list cursor cannot be positioned on the current page, a new page is created, which includes any page footers that the current page may have. The list cursor is positioned in the first position of the first line under the page header of the new page.
The statement is only executed at the start of the page if this page is the first in a list level, or it was created using the statement NEW-PAGE.



Latest notes:

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.
ABAP_HINT_END
• TO LINE SKIP

ABAP_VARIANT_2 SKIP TO LINE line.

What does it do?
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 program-initiating statement, or NEW-PAGE, the addition TO LINE is ignored and the statement SKIP without additions is executed instead.



Latest notes:

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.
ABAP_HINT_END



Example ABAP Coding

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.
ABEXA 00673
ABAP_EXAMPLE_END

Return to menu