Determining Left and Upper Margins 

To determine the size of the left and of the upper margin of a print page, use this statement:

Syntax

SET MARGIN <x> [<y>].

This statement causes the current print page to be sent to the spool system with <x> columns of space on the left page margin and, if specified, with <y> lines of space on the upper page margin.

The statement sets the contents of the system fields SY-MACOL and SY-MAROW to <x> and <y>. For printouts, these system fields determine the number of columns on the left margin and the number of lines on the upper margin.

The values you set apply to all subsequent pages, until you use another SET MARGIN statement. If you specify more than one SET MARGIN statement on one page, the system always uses the last one.

The following executable program (report) is connected to the logical database F1S.

REPORT SAPMZTST LINE-SIZE 60.

TABLES SPFLI.

SET MARGIN 5 3.

GET SPFLI.
  WRITE: / SPFLI-CARRID, SPFLI-CONNID, SPFLI-CITYFROM,
SPFLI-AIRPFROM, SPFLI-CITYTO, SPFLI-AIRPTO.

If, after starting the report, the user chooses Execute on the selection screen, the following list appears on the output screen:

The SET MARGIN statement has no effect on the display.

If, after starting the report, the user chooses Execute + print on the selection screen, the list is printed while it is created. The user can view the stored spool request using System ® Services ® Print requests:

The list is shifted to the right by five columns and to the bottom by three lines.