Sunteți pe pagina 1din 21

A guide to

Unicode Printing Enhancement - UPE

© 2013 by SAP AG.


All rights reserved. SAP, R/3, SAP NetWeaver, Duet, PartnerEdge,
ByDesign, SAP Business ByDesign, and other SAP products and
services mentioned herein as well as their respective logos are
trademarks or registered trademarks of SAP AG in Germany and other
countries.

Business Objects and the Business Objects logo, BusinessObjects,


Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other
Business Objects products and services mentioned herein as well as their
respective logos are trademarks or registered trademarks of Business
Objects S.A. in the United States and in other countries. Business Objects
is an SAP company.

All other product and service names mentioned are the trademarks of
their respective companies. Data contained in this document serves
informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are
provided by SAP AG and its affiliated companies ("SAP Group") for
informational purposes only, without representation or warranty of any
kind, and SAP Group shall not be liable for errors or omissions with
respect to the materials. The only warranties for SAP Group products and
services are those that are set forth in the express
Version: 2013-06-25 warranty statements accompanying such products and services, if any.
Nothing herein should be construed as constituting an additional
warranty.
Table of Content

Table of Content
1. Purpose of UPE ...................................................................................................................................................... 3
2. Prerequisites for using the UPE solution ............................................................................................................ 4
3. A bit of UPE theory ................................................................................................................................................. 5
UPE-Activation of an Output Device: ....................................................................................................................... 5
Compatibility: ............................................................................................................................................................ 6
UPE and PDF-Conversion: ...................................................................................................................................... 6
4. How to introduce UPE in your SAP environment ............................................................................................... 8
UPE-Activation of a PCL/PS printer via URDT selection: ........................................................................................ 8
Differences between the four URDTs with respect to CJK scripts: .......................................................................... 9
List of Languages/Scripts supported by an URDT: ................................................................................................ 10
Additional attributes of an UPE-activated printer: .................................................................................................. 11
Selecting another URDT for the printer: ................................................................................................................. 13
Reverting UPE-Activation for a printer: .................................................................................................................. 13
5. Modification Tools for URDTs ............................................................................................................................. 15
URDT Modification Wizard RSPOUPE_URDT_TOOL: ......................................................................................... 15
Expert tool for URDT analysis and modification: .................................................................................................... 17
6. Appendix ............................................................................................................................................................... 19
List of SAP standard URDTs shipped with UPE Solution: ..................................................................................... 19
List of supported Language Groups/Scripts of UPE Solution: ............................................................................... 19
SAP Font Families (SAPfonts) supported by the four standard URDTs: ............................................................... 19
List of TrueType Fonts shipped with the UPE solution: ......................................................................................... 20
Supported Languages and TrueType Fonts used for ABAP list printing with UPE: .............................................. 21

2
www.sap.com

1. Purpose of UPE
The solution Unicode Printing Enhancement (UPE) was developed as a result of a Customer Engagement Initiative
(CEI) which took place between end of 2011 and beginning of 2013 at SAP AG Germany. The CEI originated at the
DSAG (Deutschsprachige SAP Anwendergruppe), the German speaking SAP user group.

The goal of this CEI was to provide a solution for a rather common problem which occurs when customers have
migrated their SAP ERP systems to Unicode and try to print international SAPscript or Smart Forms business forms
(e.g. invoices, order confirmations) on a typical printer. Typical printers are printers driven with the PDLs PCL5 or
PostScript (PDL = printer description language) and which are connected directly to the SAP backend (i.e. the SAP
application server running ABAP programs). Printing German, English or French documents was generally o.k., 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 to enter, store and display arbitrary Unicode characters, this limitation
to the business forms processing seemed unacceptable to many customers. The official answer from SAP how to
overcome this problem was to connect printers to the backend via a Windows print server running the SAPSprint
software and employing device type SWINCF when defining the printer in SAP (transaction SPAD). In this case, the
actual text rendering and PDL generation is done on the Windows print server and not in the SAP backend system and
thus, a multitude of international characters (in effect those languages/scripts supported by the underlying W indows
operating system on the print server) can be printed from SAP.

The purpose of the CEI that eventually resulted in the development of the UPE solution was to provide 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” printers
should also support the output of foreign characters, similar to SAPscript/Smart Forms.
www.sap.com

2. Prerequisites for using the UPE solution


There are several prerequisites when you want to use UPE. Your first step should be to verify in detail whether your
system already allows you to use UPE directly.

The first and primary requisite for UPE is a SAP Unicode System! If your SAP system has not yet been migrated to
Unicode, you will not be able to use UPE. The UPE solution works only in Unicode systems.

When you have a Unicode SAP system, you will be able to use UPE if you have one of the following NW Releases and
Support Packages for these releases installed:

Supported SAP NetWeaver releases and required support package level (SP level) for those releases:

SAP NetWeaver Release Required ABAP SP Level Required Kernel


740 SP 02 740 Kernel
731 SP 09 721 PL 115
730 SP 10 721 PL 115
702 SP 14 721 PL 115

Note that the standard 720 kernel used for all 7xx releases below 740 does not support UPE. In order to use UPE with
a SAP ERP system based on one of the above NetWeaver releases, you need to install the 721 kernel. The minimum
patch level for the 721 kernel is PL 115.

The corresponding SAP note in SAP Service Marketplace (SMP) for UPE is: 1812076

4
www.sap.com

3. A bit of UPE theory


This chapter will explain some of the fundamental ideas of the Unicode Printing Enhancement (UPE) Solution. If you
are not interested in theory but quickly want to know how to use UPE in your SAP system, you might as well skip this
chapter.

The target of the UPE solution are SAP printers which have associated device types that use the PCL5 or PostScript
printer drivers (named HPL2 and POST internally, respectively) and which support only a small portion of the Unicode
character set. Two typical examples for such printers would be a printer with device type HPLJ8000 and one with
device type POST2. These device types have printer codepages 1116 and 1117 assigned, respectively. These printer
codepages support only the so-called Latin-1 character set (ISO 8859-1), which is roughly equivalent to the set of
characters required to write text in Western European languages such as German, English, French, Italian, Spanish,
Portuguese, Dutch, Danish, Norwegian, Swedish etc.

When you attempt to print any characters outside of ISO 8859-1 on one of these printers, you will see hash marks (#)
on the printed page. Replacing unsupported characters with a hash mark is a fundamental mechanism of both OTF
printing (i.e. printing SAPscript or Smart Forms documents) and ABAP list printing.

A hash mark in the printout indicates that your source document (i.e. a SAPscript or Smart Forms business form or an
ABAP list) contained a Unicode character which is not supported by the device type that is associated with your printer
in transaction SPAD and thus cannot be printed. The small or restricted set of printable characters is typical for almost
all PCL5 and PostScript device types delivered in the SAP standard. This problem is not limited to Latin-1 PCL5/PS
device types since there exist also PCL5 device types for character sets other than Latin-1, for example I5LEX,
JPHPLJ40 and TWHPLJ4. And some PostScript device types for other character sets exist as well, examples are
I2HPP2 or I4HPPS. These PCL5 and PS device types have a similar problem that they cannot be used to print
Unicode characters outside of their designated character set (which is, for example, ISO 8859-5 for I5LEX and ISO
8859-2 for I2HPPS).

The UPE solution does several things 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

UPE-Activation of an Output Device:


The UPE solution is “activated” for an SAP printer (i.e. an output device defined in transaction SPAD) by associating a
URDT with this printer. The URDT now, with its Unicode character and TrueType Font information adds many
thousands of additional printable characters to the normal set of printable characters of the traditional PCL5 or
PostScript device type.

Here is an image indicating how the set of printable characters of an existing PCL/PS device type is enlarged by
adding a URDT that can print Unicode characters via TrueType Font Download:

5
www.sap.com

Compatibility:
Adding a URDT to a printer is not an incompatible step: The UPE solution applies only to those Unicode characters
which are considered not printable with the given PCL5/PostScript device type (i.e. which would be printed as a hash
mark #). The characters which belong to the device type’s inherent printer character set will continue to print “as-is” via
the printer’s resident fonts (i.e. those fonts resident in the printer’s PCL or PS firmware).

Here is an example for our above-mentioned two prototypical device types HPLJ8000 and POST2 (which both natively
support only Latin-1 character set). It illustrates the value of the UPE solution by displaying samples of additional
Unicode characters which the UPE solution allows to print with typical PCL5/PS device types:

Unicode HPLJ8000 HPLJ8000 POST2 POST2


character (no UPE) + URDT URDTJ (no UPE) + URDT URDTJ
U+0041 A A A A
U+00D6 Ö Ö Ö Ö
U+0103 # ă # Ă
U+03C8 # ψ # Ψ
U+0434 # д # д
U+1EBF # ế # ế
U+05D0 # ‫א‬ # ‫א‬
U+306E # の # の
U+4E79 # 乹 # 乹
U+8C93 # 貓 # 貓
U+C911 # 중 # 중

UPE and PDF-Conversion:


The UPE solution also extends itself to PDF conversion of printed documents, e.g. 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
6
www.sap.com

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.

7
www.sap.com

4. How to introduce UPE in your SAP environment


This chapter will explain how to introduce the UPE solution in your SAP environment, provided your SAP system has
the prerequisites described in chapter 2.

UPE-Activation of a PCL/PS printer via URDT selection:


The following screenshot from transaction SPAD shows the detail screen (edit mode) for DEMOPRINTER_UPE:

Notice the new button Unicode Print Settings at the top? This new button is available when your system fulfills the
requirements for the UPE solution outlined in chapter 2) and you are editing a printer in SPAD whose associated
device type uses the PostScript or the PCL-5 printer language (PDL). In detail, the OTF printer driver selected in the
associated device type must be POST or HPL2. In our example the device type is HP4350 which uses the HPL2 OTF
driver.

In order to activate the UPE solution for printer DEMOPRINTER_UPE, we push the Unicode Print Settings button. A
popup window appears which prompts us to select a URDT (= Unicode Reference Device Type):

8
www.sap.com

A URDT, as explained in chapter 3, is basically a mapping table from characters encountered in a SAPscript or Smart
Forms document to Unicode characters stored in the TrueType fonts delivered with the UPE solution.

The windows shows the four standard URDTs delivered by SAP with the UPE solution. All four URDTs support the
same set of languages/scripts, the difference between the four only affects the visual appearance of CJK characters for
Chinese, Japanese and Korean:

URDT Name: Comment:


URDTC Use URDTC if you plan to print Simplified Chinese forms with this printer
URDTJ Use URDTJ if you plan to print Japanese forms with this printer
URDTK Use URDTK if you plan to print Korean forms with this printer
URDTT Use URDTT if you plan to print Traditional Chinese forms with this printer

If you do not plan to print Chinese, Japanese or Korean, it does not matter which URDT you choose, you may as well
use the first one, URDTC. The following section explains in more detail why four different URDTs are supplied.

Differences between the four URDTs with respect to CJK scripts:


The Unicode standards provides for a large set of codepoints used in above mentioned four Asian scripts. While some
of these codepoints are exclusive to one script (e.g. a Unicode codepoint may be used only for Korean but not in
Chinese and Japanese), many of these codepoints are used by several languages/scripts in parallel. This is because
all scripts (with the exception of newly developed Hangul) basically originated from ancient Chinese.

For example a codepoint may be used in Simplified Chinese, in Traditional Chinese and in Japanese script. But for
each of these three scripts, the corresponding glyph (i.e. the shape of the printed character) normally has slightly
different appearance. I.e. the Simplified Chinese glyph looks a bit different from the Japanese glyph etc.

To accommodate these differences or “CJK flavors”, there exist TrueType fonts which are used for the corresponding
scripts. E.g. in order to create a Simplified Chinese form, one should use a CJK font designed for Simplified Chinese in
order to ensure that such “shared” Unicode codepoints have “Simplified Chinese Flavor”.

9
www.sap.com

The difference between the four URDTs now comes into play only for such “shared” CJK characters resp. Unicode
codepoints. For these codepoints, the CJK TrueType font matching the listed “flavor” is preferred over all other CJK
TrueType fonts when building the URDT.

The following image visualizes, for each of the four standard URDTs, the relative amount of CJK characters (Unicode
area U+4E00 to U+9FFF) covered by the Asian fonts for SAPfont HELVE:

List of Languages/Scripts supported by an URDT:

If you are interested in the languages (resp. scripts) that each URDT supports (i.e. those languages/scripts which will
be printable via your printer once you have assigned the URDT), you select the URDT in the leftmost selection column
and then hit button Supported Languages, which will bring up the following screen (for URDT URDTC):

10
www.sap.com

Now in order to complete the UPE-Activation of DEMOPRINTER_UPE, we select one of the URDTs and save the
change.

Additional attributes of an UPE-activated printer:

SPAD now displays the following output device detail screen for our printer:

11
www.sap.com

You will notice that the only difference (besides the new Unicode Print Settings button in the icon bar) compared to the
traditional SPAD screen is the new box titled Unicode Print Settings in the lower half of the screen. The purpose of this
box is to quickly summarize all settings concerning the new UPE solution.

For an UPE-activated printer, you always find the name of the selected URDT (URDTC in our example) in this new
box. To the right of the URDT name is the Supported Languages button which, again, prompts a list of
languages/scripts supported by the currently selected URDT.

In the box, there are two checkbox fields for an UPE-enabled printer which are, by default, inactive (= not selected).
The following table gives some in formation about the purpose of these checkboxes:

12
www.sap.com

Field Label: Explanation:


Do not use for printing ABAP lists By default, UPE processing is carried out for OTF documents (SAPscript,
Smart Forms) and ABAP lists.
If you do not need the UPE Unicode Printing Enhancement solution for
printing of ABAP lists, check this box. When the box is checked, only OTF
output will be UPE-enhanced but ABAP list printing will not. This can save
some performance for the spool work process (SPO) processing the print
jobs for this printer.
Type 15 PCL5 Format If your PCL-5 printer cannot print Unicode characters correctly which are
downloaded during the print data stream, your first step should be to check
this box. When activated, the PCL-5 printer driver will change the PCL-5
font header format from 16 (default) to 15. This may work on some printers
whose firmware has problems with the font header format 16.

Note: This checkbox is only relevant for PCL5 and thus is only displayed if
the associated device type for your printer uses PCL5 printer language.

Selecting another URDT for the printer:

Button Change Assignment brings up the URDT selection screen again, allowing you to choose another URDT for your
printer:

Reverting UPE-Activation for a printer:

13
www.sap.com

If you want to deactivate the UPE solution for this printer, button Delete Assignment removes the association with an
URDT from the output device. Once you have done that (and saved the printer), the UPE solution is disabled and
every document will print without the assistance of the UPE solution.

14
www.sap.com

5. Modification Tools for URDTs


The UPE solution enhances PCL5/PostScript printing of documents from SAP by adding support for additional
languages resp. scripts via the URDT concept. The list of languages/scripts supported by the four SAP standard
URDTs can be found in the appendix.

Occasionally customers may want to extend or modify the SAP standard UPE solution, for example because they want
to add support for printing certain additional Unicode characters. As you may remember from chapter 3, a Unicode
Reference Device Type holds the complete information that determines which additional characters/scripts can be
printed via the UPE solution. Thus, when a customer desires to print additional characters via the UPE solution, at the
end of the day a modified version of a URDT is needed. How can a customer generate a modified URDT?

URDT Modification Wizard RSPOUPE_URDT_TOOL:


To assist customers with typical modification scenarios, SAP has delivered (as part of the standard UPE solution) a
wizard-like modification tool for URDTs, report RSPOUPE_URDT_TOOL.

The following image shows the startup screen of this report:

This screen is pretty much self-explanatory. There are exactly four modification scenarios which the report supports
and which can be selected via the four buttons.

15
www.sap.com

Here is a more detailed explanation of each scenario, together with examples how they could be used:

Scenario: Explanation:
Add New Character Add support to the URDT for printing a single additional character from a TrueType
font
Replace TrueType Font Replace all character mappings in the URDT which point to a certain TrueType Font
with mappings to another TrueType Font
Add All Characters of a Add all those characters of a given TrueType Font to the URDT whose Unicode
TrueType Font codepoints are not already occupied (i.e. mapped to another font) in the URDT
Change ABAP List Font Switch the standard font used for printing ABAP lists to another font

Should you ever want to extend the SAP-delivered URDTs e.g. by adding characters from a custom TrueType font, this
is the tool you should use. The workflow of the tool is designed in a wizard-like style so you are guided through the
steps required for each scenario in a sequential manner, always allowing you to go back to a previous step.

16
www.sap.com

Expert tool for URDT analysis and modification:


There is also an expert tool for analysing and modifying URDT device types: report RSPOUPE_URDT_UTIL.

Here is the initial screen of RSPOUPE_URDT_UTIL:

On one hand, the purpose of RSPOUPE_URDT_UTIL to provide information about the URDTs present in your SAP
system. The first two items

- List all URDTs in system


- Show font usage by URDTs
provide such information.

On the other hand the tool can be used for analysis and debugging purposes:
The next two items
- Show font mappings of a URDT
- Check a URDT for problems
allow get detailed information abouit the font mappings stored in a URDT and also to performs a quick analysis of an
URDT in order to find possible inconsistencies.

The items
- Change font for ABAP lists
17
www.sap.com

- Add some characters to a URDT

provide means of modification for a URDT. These are basically the same modification scenarios already covered by
the RSPOUPE_URDT_TOOL report, but the UI is not presented in a wizard-like fashion.

The final item


- Edit font mappings of a URDT
is intended for expert use only! You should not attempt to modify URDTs with this tool unless you consider yourself a
“URDT expert”.

18
www.sap.com

6. Appendix
The appendix provides some detail information concerning the SAP standard UPE solution.

List of SAP standard URDTs shipped with UPE Solution:

URDT Name: Comment:


URDTC Standard URDT with “Simplified Chinese Flavor”
URDTJ Standard URDT with “Japanese Flavor”
URDTK Standard URDT with “Korean Flavor”
URDTT Standard URDT with “Traditional Chinese Flavor”

List of supported Language Groups/Scripts of UPE Solution:


The following table lists the supported language groups resp. scripts that the four SAP-delivered standard Unicode
Reference Device Types support:

Language Group resp. Script: Comment:


Latin-1 Languages expressed via ISO 8859-1 (Latin-1) character set, for
example English, German, French, Italian, Spanish, Portuguese,
Dutch, Danish, Swedish, Norwegian, Finnish
Latin-2 Languages expressed via ISO 8859-2 (Latin-2) character set, e.g.
Polish, Czech, Slovak, Hungarian, Romanian
Baltic Estonian, Latvian, Lithuanian (ISO 8859-4 character set)
Greek ISO 8859-7 character set
Turkish ISO 8859-9 character set
Cyrillic ISO 8859-5 character set
Hebrew ISO 8859-8 character set
Arabic
Vietnamese
Simplified Chinese
Japanese
Korean
Traditional Chinese

SAP Font Families (SAPfonts) supported by the four standard URDTs:


The standard URDTs contain mapping information for the following standard SAP font families. Note that this table lists
only the “normal” variant of a SAPfont, mappings for the other three variants (bold, italic, bolditalic) are also included in
an URDT.

Font Family (SAPfont): Comment:


ANDALE_J Inherits from DBGOTHIC
ANDALE_K Inherits from KPBTANG
ANDALE_S Inherits from CNSONG
ANDALE_T Inherits from TWSONG
CNHEI
CNKAI Inherits from CNSONG
CNSONG
COURIER

19
www.sap.com

COURCYR Inherits from COURIER


COUR_I7 Inherits from COURIER
DBGOTHIC
DBMINCHO Inherits from JPMINCHO
HELVCYR Inherits from HELVE
HELVE
HELV_I7 Inherits from HELVE
JPMINCHO
KPBATANG
KPDODUM Inherits from KPBATANG
KPGULIM
KPGUNGSE Inherits from KPBATANG
KPSAMMUL Inherits from KPBATANG
LETGOTH Inherits from COURIER
LNPRINT Inherits from COURIER
THANGSAN
THDRAFT Inherits from THANGSAN
THVIJIT Inherits from THANGSAN
TIMECYR Inherits from TIMES
TIMES
TIME_I7 Inherits from TIMES
TWMING Inherits from TWSONG
TWDPHEI Inherits from TWSONG
TWSONG

Note: Whenever “inherits from xxx” is listed under Comments, this means that the URDTs do not contain an explicit mapping for the
SAPfont in the left column but rather use the existing mapping of the given SAPfont xxx.

For example, consider a printer with device type JPHPLJ4 which is UPE-enhanced with URDT URDTJ. When a SAPscript form is
used with this printer to output a text with font DBMINCHO, the character-to-TrueType-font mappings for DBMINCHO are taken from
JPMINCHO’s font mappings stored in URDT URDTJ.

Note: This list of SAPfonts also applies to any customer-created URDTs since custom URDTs always originate as a copy of a SAP
standard URDT.

List of TrueType Fonts shipped with the UPE solution:

The following TrueType Fonts and indicated typefaces are licensed and shipped by SAP as part of the UPE solution:

TrueType Font: Typefaces for Font:


Arial Regular, Bold, Italic, Bolditalic
Courier New Regular, Bold, Italic, Bolditalic
Times New Roman Regular, Bold, Italic, Bolditalic
Angsana New Regular, Bold, Italic, Bolditalic
Batang Che Regular
GulimChe Regular
MS Gothic Regular
MS Mincho Regular
MHei Medium C GB18030 Regular
MT Sung Light GB18030 Regular
MingLiu Regular
Arial Unicode J Regular
Arial Unicode K Regular
Arial Unicode S Regular

20
www.sap.com

Arial Unicode T Regular

Supported Languages and TrueType Fonts used for ABAP list printing with UPE:

The following table shows which TrueType Font is used to print characters from a given language during ABAP list
printing with UPE:

Language/Language Group: TrueType Font for ABAP Lists


Latin-1 Courier New
Latin-2 Courier New
Cyrillic Courier New
Greek Courier New
Baltic Courier New
Turkish Courier New
Hebrew Courier New
Vietnamese Courier New
Arabic Courier New
Thai Arial Unicode (J, K, S, T)
Simplified Chinese Arial Unicode S
Japanese Arial Unicode J
Korean Arial Unicode K
Traditional Chinese Arial Unicode T

As you can see, characters from “Western” languages (plus Hebrew, Vietnamese and Arabic) are printed using font
Courier New and not Arial Unicode. This is done in order to avoid “visual disruption” when switching from the printer-
resident font for ABAP lists (which is typically a Courier-style fixed-width font) to the proportionally-spaced Arial
Unicode font.

Note: There is an exception to the behaviour as described in the table. When you UPE-enhance a printer using a device type
designed for an Asian CJK language (for example JPHPLJ40), the Arial Unicode font takes precedence over Courier New during
ABAP list printing. This is because Asian CJK device types never use Courier as resident font for list printing but an Asian CJK font
for which Arial Unicode is a better match than Courier New.

21

S-ar putea să vă placă și