Start of Content Area

 Procedure documentation Modifying the SWIN (SAPWIN) Device Type  Locate the document in its SAP Library structure

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.

SWIN Device Format Actions

With SAPscript formats, SWIN does not use the Printer initialization or Reset actions. Enter a comment line -- # Not used -- in these two actions in the SAPscript 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.

Frequently Made Changes to SWIN

·        Adjusting the position of output on the paper.

In a SAPscript form definition, positioning information refers to the absolute dimensions of the paper to be used for outputting the form. However, the position information in SAPscript 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 SAPscript 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 Tools CCMS Spool Spool Administration, 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).

Example

If a window in a form definition is to appear 1 cm from the left edge of the paper, the window will actually be printed 1.5 cm from the left edge of the paper on a Hewlett-Packard LaserJet printer. The LaserJet starts its X-axis coordinate system 0.5 centimeter from the left edge of the paper. On a PostScript printer, on the other hand, the window will start 1 cm from the left edge of the paper, because PostScript uses the physical boundaries of the paper for its coordinate system.

You can adjust the positioning of the output on the HPLJ4 (LaserJet) printer by entering -5 MM in the Horizontal move field in the second screen of the device definition of each HPLJ4 printer.

·        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).

Note

The SWIN data stream protocol is an internal SAP format that may change without prior notice. SAP intends to make only upwardly compatible changes to the SWIN protocol. That means that you should always be able to use the newest version of SAPlpd, even if you have not upgraded your SAP system itself.

SAP guarantees, however, only that the SWIN device type will function correctly with the development level of the SAPlpd transfer program that is specified for a particular SAP  release.

For more information on the SWIN protocol, see the SAP Service Marketplace.

This graphic is explained in the accompanying text SAP Printing Guide Start Page

 

 

End of Content Area