Show TOC

Determining Left and Upper MarginsLocate this document in the navigation structure

Use

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 content of system fields sy-macol and sy-marow to x and y , respectively. 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 program is connected to the logical database F1S.

          
REPORT demo_list_set_margin 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 Start of the navigation path System Next navigation step Services Next navigation step Print requests End of the navigation path:

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