
Defining a New Device Type
A device type is the SAP spool system’s container for storing information about a particular type of output device such as a PostScript printer. The device type stores the same type of information as a printer driver on a Windows PC: the information needed to generate device-specific, ready-to-print data.
You can modify any part of a device type as required. For example, you may want to add support for an SAPscript printer font that is not part of the R/3 standard font set. This change would require adding new print controls to the device type to enable it to switch to the font. Only make changes to an R/3 standard device type using your own copy of the device type. Otherwise, your changes may be overwritten when you upgrade your SAP System.
In this section, we review how to define a device type from start to finish. If you want to extend an existing device type, see the relevant step in the procedure for more information.
Procedure
If you are modifying an standard R/3 device type, only work on a copy of the device type. Otherwise, your changes may be lost during a system upgrade.
If you are creating a new device type, working from a copy of a similar device type is easier than starting from scratch. The print controls and device type formatting actions required are already present.
Procedure: See Copying Device Types.
Use: The device type identifies a particular printer or fax machine model.
When to edit: You are defining a completely new device type.
How to edit: Using a copy of an standard R/3 device type.
Contents:
You can specify:
– The R/3 character set that should be used for formatting device output. The character set specifies the character codes to send to the device for printing specific characters.
– The driver to use for formatting SAPscript documents
Procedure: Editing Device Types
Use: An R/3 character set is used to convert output from the internal R/3 representation into the codes required by the output device to print the output correctly.
When to edit: You are defining a new device type and none of the standard R/3 character sets are suitable for the device. You can then add a new character set or extend a copy of an existing character set by adding characters to it.
Where to edit: Using a copy of an R/3 standard device type. The number for a new character set must begin with "9"; this places the character set in the customer namespace.
Contents: A character set contains the set of SAP characters that can be output at a device that uses that character set. R/3 characters specify the code to send to a device in order to produce the corresponding character.
For more information, see Maintaining Character Sets.
Use: A page format specifies the physical size and orientation of an output page. As of Release 4.5A, both SAPscript and list printing use page formats. The physical page dimensions determine and specify the printable area on a page. This information, in turn, determines how the page is filled with text.
When to edit: You need to add new page formats for paper sizes or output layouts not included in the standard system.
Page formats are used together with formats and device formats to determine how text should be printed on a particular paper size or in a particular layout format. To define a new paper size, you need to add all three of these objects.
Where to edit: Under Page formats. Name must begin with Y or Z. Do not alter existing page formats as otherwise R/3’s SAPscript forms or ABAP lists may not print correctly.
Contents: Physical paper dimensions and orientation (SAPscript and lists) or lines and columns in page layout (list text).
Procedure: Creating Page Formats
Use: Formats specify the paper sizes or output formats that can be used with R/3 device types. Example: Standard R/3 device types support formats such as DINA4, LETTER, and X_65_80.
When to edit: You need to add new formats for paper sizes or output layouts not included in the standard system. Do not alter or delete existing formats as otherwise R/3 documents may not print correctly.
Formats are used together with page formats and device formats to determine how text should be printed on a particular paper size or in a particular form. To define a new paper size, you need to specify all three of these.
Where to edit: Under Formats. Name must begin with Y or Z. Do not alter existing formats, as otherwise R/3’s SAPscript forms may not print correctly.
Contents: Name of corresponding page format (same as format name for SAPscript formats, page format ANY for list text formats).
Procedure: Creating Formats
Use: A device format specifies a format for a particular device type. That is, it associates sets of device–specific commands, called actions, with a format. The SAP spool system uses device type formatting actions to output printer commands during printing. These actions specify printer operations. Examples of actions: configure printer for the incoming output request, or specify line end, page end, or printer reset after the output request has completed. Printer initialization is especially important, as this sets critical format information, such as lines per page.

The device format for the X_65_80 format (ABAP list and editor output) for the HPLJ4 device type (Hewlett-Packard LaserJet 4 printer) contains the following actions: Printer initialization, Reset, End of page, End of line. Each action contains the appropriate printer commands for carrying out the indicated operation. Printer initialization, for example, sets the line spacing to 65 lines specified by the format. The End of line action issues carriage return and line feed commands to the printer.
Device type formats are device-specific. They are copied with a device type.
When to edit:
In the following situations:
– You need to add a device type format for a new format (a new type of paper or layout).
– You need to customize a copy of an R/3 standard device format. Normally, you should only customize the cover page for output requests in the Cover page action. Other changes may have adverse effects on list and SAPscript printing. For information about customizing the cover page, see Maintaining Cover Pages for Output Requests.
Where to edit: Always using a copy of the R/3 device type.
Contents: Printer/fax commands for the standard R/3 actions – Printer initialization, Cover page (optional), Reset at end, device-specific combination of Start of line, Start of page, End of line, End of page (see similar standard R/3 device type).
Procedure: Editing Device Type Formats
Use: The SAP System provides a set of standard formatting tags known as "print controls." Print controls are used in all types of R/3 documents (SAPscript forms, ABAP list output). Print controls are used mostly for character formatting, but also overlap in function with device type format actions in some cases (SLAND, SPORT, SLINE, and SPAGE print controls). Print controls are usually inserted in documents under program control (by one of the SAPscript printer drivers or by an ABAP program or report), though users can also enter them in SAPscript documents directly.
When an output request is generated, print controls are converted into printer-specific escape sequences to control how text is output. For example, print controls change fonts, print bar codes, and perform other character formatting operations.
When to edit: When you are defining a new device type or extending or customizing the formatting capabilities of an existing device type.
Where to edit: Using a copy of the R/3 device type. Print controls are specific to a device type and are copied with the device type. You can therefore change standard R/3 print controls under their original names in a copied device type. New print controls should have names that start with Y or Z (customer namespace).
Contents: The printer or fax commands required for the operation as specified by the print control.
Procedure: Editing Print Controls
If you want to print Optical Character Recognition (OCR) characters or bar codes, you must first enable these printing functions. For more information, see Bar Code Printing.
Component |
Procedure for activating your changes |
New/copied device type |
Enter as a device type under device definitions in the SAP spool system. Required for changes to formats (page formats, formats, and device formats), character sets, and print controls. |
New character set |
Enter in a copied device type. Automatically takes effect when the new device type is used. Must be in accordance with character set specification, if any, in the device format Printer initialization (list printing) and with the character sets that may implicitly be selected at the printer using SAPscript SF<xxx> font print controls. For help with testing, see Testing Output Devices. |
New page format |
Enter the SAPscript forms that should use the new format (SAPscript Form Painter). |
New format |
For SAPscript: Activated with new device type when new page format is activated. For list printing: Add to affected reports with NEW-PAGE PRINT ON LAYOUT/ SUBMIT... TO SAP-SPOOL LAYOUT (print at list generation). For printing from list display, adjust REPORT width specification to force selection of the format and move format to R/3 namespace (name "X...."). |
New device type format |
Automatically activated when the device type, page format, and format are activated. |
Print controls |
List printing: List print controls edited under their standard R/3 names are automatically activated when the new device type is activated. New print control names: Enter in affected reports with PRINT-CONTROL FUNCTION. Effective only if a list is printed as it is generated. SAPscript printing: SF (font) and SBP/SBS (bar code) print controls require:
To define other print controls, you need to use the SAPscript /: PRINT-CONTROL statement to add print controls to the affected SAPscript texts. |