Working with Device Types

Objectives

After completing this lesson, you will be able to:
  • Select a suitable device type
  • Illustrate the idea of Unicode Printing Enhancement

Device Types for SAP Output Devices

A device type describes the type of the printer to be addressed. When you define an output device, choose the name of the device type that was defined in the SAP system for your printer model. The SAP system then uses the device type to format the output device-specific print output.

When the spool work process generates an output request, it formats the data according to the specifications of the device type.

The device type is separate from a printer driver. The device type is the set of all properties of an output device that the SAP system has to know to control the output device correctly, such as control commands for font selection, page size, character set selection, and so on.

The figure "Device Type" illustrates the structure of a device type. The following terminology is useful in understanding device types:

Character Set

A character set contains the characters that can be output by a particular output device. To be able to use a particular character set for a selected device type in the SAP system, it must contain this character set.

Print Control

Print controls are general print control statements that can be embedded into texts as formatting commands. This allows you to control particular display options of output devices, such as boldface, changing the font and font size, and so on. They are converted into printer-specific escape sequences for the output.

(Spool) Format

Spool formats specify the format supported by the SAP system. The system differentiates between SAPscript formats (such as DINA4 and LETTER) and ABAP list formats (such as X_65_132 meaning 65 rows / 132 columns).

Note

Actions are output device-specific commands that are required for the implementation of a format. The action printer initialization, for example, can contain a printer command with which the number of rows on a page is defined. There is a set of actions for every format supported by a device type.

Format Type

A format type describes how output should appear on paper. It primarily contains the formatting of the page format. Among others, there exist a format type for lists (spool formats with this format type need to have the guaranteed number of lines and columns on the output defined as an additional attribute) or SAPScript (spool formats with this format type need to have a page format defined as an additional attribute).

Page Format

A page format describes the format of a printable page in the SAP system. A large number of standard page formats are predefined in the system. For a device to support additional formats that are not predefined, you can define new formats. Consider when doing so that your output device must, of course, be able to use the new format.

Printer Driver
There are two different printer drivers assigned to a device type: an SAPscript printer driver (which is only used by SAPscript and an printer driver for printing ABAP lists with this device type.

Note

SAPScript is a tool for text management and form printing.

For more information about device types, check the online documentation on SAP Help Portal for SAP S/4HANA (Product Assistance), area Enterprise TechnologyABAP PlatformAdministrating the ABAP PlatformAdministration Concepts and ToolsSolution Life Cycle ManagementSAP Printing Guide (BC-CCM-PRN)Device Types for SAP Output Devices.

Selecting an Appropriate Device Type

Using printer models for which no suitable device type exists in the SAP system may require a significant effort. The figure "Selecting an Appropriate Device Type" provides a brief checklist for selecting the right device type for your needs.

  • In the ideal situation, a device type for your printer model exists in your SAP system.

    Note

    A separate device type is not required for every printer model of a vendor, but just for each model family.
  • Several printer manufacturers participate in the SAP Printer Vendor program. If there is no device type for a specific printer model in your SAP system, you can easily import device types for the supported printer models provided by those manufacturers using the device type selection wizard (available in transaction SPAD for output devices).

    Note

    For more information about SAP Printer Vendor Program, see SAP Note 1130927SAP Printer Vendor Program which (among others) contains a link to the SAP Integration and Certification Center - SAP Printer Vendor Program (PVP) document.
  • If the device type does not exist in the SAP system, many printer models can be addressed by a generic format, such as PostScript. It is also possible to address a printer model in the same way as another model that is supported by SAP (compatibility mode).

  • There are drivers for the Microsoft Windows operating systems for practically all printers on the market. You can use these printers as output devices with the generic device type SWIN. This 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.

  • If there is no device type for your printer model and none of the options above can be used, you can create your own device types. The SAP system contains all of the tools required to create your own device types or to adjust copies of existing device types.

    Caution

    To do this, detailed knowledge of the SAP spool system and the printer controls is required. You should weigh up the expense against the purchase of supported printers.

Wizard for Device Type Selection

In most cases, the SAP System already provides the appropriate device type for the printer type of the printer model that you want to use. These standard device types are completely defined and need no modification or extension before you use them in device definitions.

When you create a new output device or change an existing one, it is sometimes hard to choose the appropriate device type. To help you with the selection, you can use the Device Type Selection (wizard) in transaction SPAD. The wizard leads you step-by-step through the selection of the most suitable device types for your output devices.

The wizard requires a set of information such as the name of the printer manufacturer and the language in which the documents are to be printed. Since new printers are being introduced day by day, new printer models and the corresponding device types must be 'introduced' to the Device Type Selection first to become selectable. This is why the selection data needs to be updated on a regular basis.

The figure "Working With the Device Type Wizard" lists the major steps to provide your SAP system with new device types for printer models by manufacturers that participate in the SAP Printer Vendor program.

To start the device type wizard, start transaction SPAD and navigate to the list of Output Devices. Double-click an existing output device or create a new one. On the Device Attributes tab, choose Device Type Selection (magic wand icon) next to the field Device Type.

  1. On the selection screen, choose the manufacturer and check if your printer model shows up in the list of known printer models.

  2. If necessary, update the printer information by downloading the attachment tspopi-<time_stamp>.zip from SAP Note 1036961Device type selection wizard in transaction SPAD.

  3. Unzip the downloaded attachment. You will get a file tspopi-<date.stamp>.xml that contains the current set of information about printer manufacturers and printer model/device type combinations. To import the XML file, choose Update Printer Information in the entry screen of the Device Type Selection Wizard and select the XML file. As a result, the entries for the manufacturer and the printer models should have been be updated.

    Note

    The information about what printer manufacturers and printer models/device types are available is stored in two database tables. If you use the wizard for the first time in a system, you need to fill them once and update them later on a regular basis. This is done with the upload of the XML file to the system.

    If the database tables are already filled, the date of the last update of the dataset version is displayed and you should be able to select the manufacturer and the required printer model.

  4. Now you can select the required printer manufacturer and printer model and choose Continue with Language Selection. After you have selected the language, you can display the available device types (button Show Available Device Types).

  5. You should now be able to assign the selected device type to an output device (button Assign Device Type to Output Device).

  6. If the warning Device Type is not yet installed! is displayed, the selected device type does not yet exist in the system. It must be installed before you can assign it to the output device. To do so, you need to download the Reference SAP Note that is displayed.

    To download the Reference SAP Note, double-click the note number that is displayed in the Details section. You will be forwarded to the SAP Note. From there, download the attached device type.

  7. Back in the Device Type Selection, choose Install Device Types (truck icon) in the application toolbar and follow the instructions in the appeared window.

You can now either create new output devices that match the new device type or change the existing output device definitions.

The Idea of Unicode Printing Enhancement

Typical printers are printers driven with the printer description languages PCL5 or PostScript and which are connected directly to the SAP backend, that is, the SAP application server running ABAP programs. Printing German, English or French documents was generally possible without any issues, but as soon as the customer ventured into more exotic languages respective scripts, for instance Greek, Cyrillic or even Chinese, the printout would contain a lot of hash characters (###) instead of the expected foreign characters. Since a SAP Unicode system (in theory) allows you to enter, store and display arbitrary Unicode characters, this limitation to the business forms processing seemed unacceptable to many customers.

On way to overcome this issue is to connect printers to the back end via a Windows print server running the SAPSprint software and employing device types SWINCF* when defining the printer in transaction SPAD. In this case, the actual text rendering and PDL generation is done on the Windows print server and not in the SAP back-end system and thus, a multitude of international characters (in effect those languages/scripts supported by the underlying Windows operating system on the print server) can be printed from the SAP system.

In 2012, SAP launched an initiative aimed at solving the typical problems associated with printing documents with Unicode characters: Unicode Printing Enhancement (UPE) (see the following figure). Due to UPE SAP customers can enhance the bandwidth of possible printable characters for output devices by providing a solution for PCL5 and PostScript printing from SAPscript/Smart Forms that is comparable to the SWINCF* solution for Windows printing. In addition, the existing PDF converter should be enhanced so it would preserve all "exotic" characters from the print documents in the generated PDF file. As a last requirement, printing ABAP lists via "UPE-enabled" output devices should also support the output of foreign characters, similar to SAPscript/Smart Forms.

As listed in the figure Objectives of Unicode Printing Enhancement (UPE), the characteristics of UPE include:

  • Support for PCL5 and PostScript-enabled printers, including PDF conversion

  • Support for SAP Smart Forms, SAPscript, and ABAP lists

  • TrueType fonts licensed from SAP

  • UPE is free of charge for customers

The UPE solution helps to overcome this general limitation with most PCL5/PS device types:

  • The UPE solution adds a set of TrueType fonts to the SAP system, which can be used by the PCL5 and PostScript printer drivers to download additional Unicode characters required by a document to the printer.
  • In order to make additional characters (from the TrueType Fonts) usable for SAPscript/Smart Forms and ABAP list printing, the UPE solution adds so-called Unicode Reference Device Type (URDT) to the system.
  • URDTs basically serve as font and character mapping tables during the formatting/print process: The data stored in a URDT reveals to the SAPscript/Smart Forms formatter that a requested Unicode character is available in a TrueType font and which TrueType font contains the character
  • The URDTs also contain the character width of the Unicode characters printable via TrueType fonts, so that the SAPscript and Smart Forms formatters can correctly format the document

The UPE solution also extends itself to PDF conversion of printed documents, for example, for the purpose of optical archiving via SAP Archive Link. This means that when you archive a SAPscript or Smart Forms print form which prints via an UPE-enhanced printer, the resulting PDF file is automatically also UPE-enhanced, meaning it will contain any additional Unicode characters which would be downloaded from TrueType fonts during the print process. In the PDF data format this is accomplished via embedding subsetted portions of these TrueType fonts which contain only those characters needed in the document.

Prerequisites

A primary requirement for using UPE is an AS ABAP-based SAP system with Unicode.

Note

To identify if your system is a Unicode system, choose menu path SystemStatus.

For more information, see SAP Note 1812076Unicode Printing Enhancement (UPE) including its attached PDF.

Activate Unicode Printing Enhancement

In AS ABAP-based systems that meet the described prerequisites, you activate UPE for an output device by assigning a Unicode Reference Device Type (URDT) to this device. A URDT contains fonts that are required to print a certain group of languages (such as Latin-2 for Eastern European languages) or an alphabet (such as Cyrillic).

As shown in the figure "Assigning Unicode Reference Device Types (URDT) to Output Devices", the Unicode Print Settings button is displayed in transaction SPAD for output devices that use a PCL5 or a PostScript driver. You use this function to assign the URDT.

When you assign a URDT to an output device, you define which additional languages and fonts can be printed on that output device in addition to the languages supported by the device type. When combined with UPE, this improves both the scope of possible printable characters and performance because the datastream that is sent to the printer only contains characters that are not in the printer’s own fonts.

SAP provides the following URDTs (see the figure above):

  • URDTC for Simplified Chinese

  • URDTJ for Japanese

  • URDTK for Korean

  • URDTT for Traditional Chinese

Note

You can only assign one URDT to an output device. The same Unicode character can have different appearances in the above languages. If you expect to output documents in one of the four languages, select the corresponding URDT. If you expect to output documents in several of these four languages, create several output devices (each with the "matching" URDT). If you do not expect to output documents in any of the four languages, select any URDT.

Additional Information

The SAP Community blog UPE – Unicode Printing Enabling (https://blogs.sap.com/2013/07/09/upe-unicode-printing-enabling/) might be helpful for a first overview.

In addition, the following reports are relevant in the UPE context:

  • RSPO_CHANGE_PRINTERS permits mass changes to output devices (including UPE activation)

  • RSPOUPE_URDT_UTIL for the detailed analysis of the fonts contained in a URDT

  • RSPOUPE_URDT_TOOL enables customers to modify URDTs

Activate Unicode Printing Enhancement (UPE) for an Output Device

Business Example

As a system administrator, you want to print Unicode documents in your SAP system. To do so, you need to enable Unicode Printing Enhancement (UPE) for an output device that supports PCL5.

Note

In this exercise, when an object name or value contains ##, replace ## by the number your trainer assigned to you.

Steps

  1. With the help of transaction I18N, print a test form that uses Smart Form characters in multiple character sets on output device Local##.

    1. Log on to your assigned SAP S/4HANA system using the credentials that are provided by your instructor, Start transaction I18N.

    2. Navigate to I18N MenuTroubleshootingPrinting TestSmart FormsMultiple Scripts.

    3. In the Print dialog window, choose Local## as the output device using the F4 value help.

    4. Leave all other fields unchanged and choose Print.

  2. In transaction SP02, export the created spool request as a PDF document and examine it.

    1. Following the previous step, start transaction SP02 (your spool requests) in a new session.

    2. Select the row with the spool request that you have just created.

    3. In the menu bar, choose Spool RequestForwardExport as PDF....

    4. Save the generated PDF document in an appropriate place (for example, under N:\(My) Documents).

    5. Use the Windows File Explorer on your training environment (WTS) to open the PDF file (with Acrobat Reader) to validate its contents.

      Result

      Characters of Non-Latin-1-languages are not printed correctly.

  3. Activate the UPE for output device Local##.

    1. Following the previous step, start the transaction SPAD.

    2. On the Devices / servers tab, in the line Output Devices, choose Display (leave the input field to the left empty).

    3. Open output device Local## in change mode by double-clicking it and then choosing Change (in the application toolbar).

    4. In the application function bar, choose Unicode Print Settings.

      Note

      In SAP systems with UPE feature, this button appears only for output devices that use a PCL5 or a PostScript driver.

    5. In the Change Unicode Print Settings dialog window, select any Unicode Reference Device Type (URDT), for example URDTC.

    6. Back on the Output Device (Change) screen, a new area Unicode Print Settings appears on the Device Attributes tab.

    7. Choose Supported Languages to analyze the languages that are supported by the chosen URDT.

    8. Save the changes for your output device.

  4. With the help of transaction I18N, again print a test form that uses Smart Form characters in multiple character sets on output device Local##. Make sure that you create a new spool request.

    1. Following the previous step, start transaction I18N.

    2. Navigate to I18N MenuTroubleshootingPrinting TestSmart FormsMultiple Scripts.

    3. In the Print dialog window, select Local## as the output device using the F4 value help.

    4. Select the New Spool Request check box.

    5. Leave all other fields unchanged and choose Print.

  5. In transaction SP02, export the new spool request as a PDF document and examine it.

    1. Following the previous step, start transaction SP02 (your spool requests) in a new session.

    2. Select the row with the spool request that you have just created.

    3. In the menu bar, choose Spool RequestForwardExport as PDF....

    4. Save the generated PDF document in an appropriate place (for example, under N:\(My) Documents).

    5. Use the Windows File Explorer on your training environment (WTS) to open the PDF file (with Acrobat Reader) to validate its contents.

      Result

      Characters of Non-Latin-1-languages are printed correctly now.

Log in to track your progress & complete quizzes