Entering content frame

Determining Left and Upper Margins Locate the document in its SAP Library structure

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. These system fields determine during printing the number of columns at the left margin and the number of rows at 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.

Example

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:

This graphic is explained in the accompanying text

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:

This graphic is explained in the accompanying text

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

 

 

Leaving content frame