Modifying the SWIN (SAPWIN) Device Type

Use

The SWIN device type allows you to use any printer or fax that the Microsoft Windows Print Manager can use, regardless of whether the SAP system has a device type for the corresponding device. In this case, it is actually the Microsoft Windows Print Manager and Windows driver that format a document and make an output-ready data stream out of it.

Modifying SWIN is a little different than working on other device types because SWIN does not deliver an output-ready data stream. Rather, it converts the internal SAP document format into a special SAP formatting language. The SAPlpd transfer program understands this formatting language. SAPlpd, in turn, converts the SAP formatting commands into Microsoft Windows GDI commands, which the Print Manager and the Microsoft Windows device driver can use for preparing print-ready output data.

This means that, rather than modifying printer commands in actions and print controls, in SWIN you need to work with SAP formatting commands. The SWIN/SAPlpd formatting language is documented in this section.

Procedure

With SAP script formats, SWIN does not use the Printer initialization or Reset actions. Enter a comment line -- # Not used-- in these two actions in the SAP script device formats in your copy of SWIN. This ensures that the actions will be ignored when they are called during output. SWIN list formats do use the Printer initialization and Reset actions.

In your copy of SWIN, insert commands only in the device type format actions that the SAP standard device type SWIN uses.

SWIN Device Format Actions

SWIN Device Format Actions

requently Made Changes to SWIN

  • Adjusting the position of output on the paper.

    In a SAP script form definition, positioning information refers to the absolute dimensions of the paper to be used for outputting the form. However, the position information in SAP script forms is added to the coordinates system of the target output device during execution to determine where the form objects are to appear on the output page.

    Since output devices use different origins for their coordinate systems, this means that SAP script and the spool system must offer a way to adjust form positionings to reflect the coordinate system used by an output device.

    You can adapt your forms to the differing coordinate systems of output devices in the device definition, where individual printers and fax machines are made known to the SAP spool system.

    Set the fields: Choose Start of the navigation pathTools Next navigation step CCMS Next navigation step Spool Next navigation step Spool AdministrationEnd of the navigation path, change the corresponding output device, and switch to the Output Attributes tab page. There, you can set the horizontal positioning in Horizontal move, the vertical positioning in Vertical shift. Positive values (> 0) move the output down or to the right. Negative values in the format xxx move the output up or to the left. No decimal values are permitted. For fine positioning, use MM (millimeters) or PT (points, 10 points / inch).

  • Setting Basic List Print Properties: Character pitch, line leading, type size.

    To make these adjustments, you need to change the Printer initialization action in the X_ formats in your copy of the SWIN device type.

    There, you can adjust the character pitch (character spacing), leading (line spacing), and type size with the following commands:

    Property

    SWIN Formatting Command to Use

    Character pitch

    \ec<nn.n>. <nn.n> is the characters per inch.

    For example: \ec100 sets the pitch to 10 characters per inch.

    Line spacing

    \el<nn.n>. <n.n> is the characters per inch.

    For example: \el060 sets the leading to 6 lines an inch.

    Type size

    \eS<nnn>X where <nnn> is the type size in twips (20 twips = 1 point).

    For example: \eS200X sets the type size to 10 points (200 twips / 20 = 10 points).

    SAP Printing Guide Start Page