double byte characters

12
Double Byte Characters in SAP SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 1 Double Byte Characters in SAP Applies to: SAP technology Summary This document gives a clear view of issues faced using double byte characters. Printing problems, Smartforms/Sapscripts/ PDF conversion of spool containing Double byte characters and the approach to solve the issues. Author(s): Prashant Patil Company: Infosys Technologies Ltd. Created on: 23 January 2007 Author Bio Prashant Patil is working as a Technical Consultant in Infosys Technologies Ltd. He has a total of 5 years work experience (2.6 years IT + 2.4 years Non-IT).

Upload: sjimkes

Post on 12-Mar-2015

368 views

Category:

Documents


11 download

TRANSCRIPT

Page 1: Double Byte Characters

Double Byte Characters in SAP

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 1

Double Byte Characters in SAP

Applies to: SAP technology

Summary This document gives a clear view of issues faced using double byte characters. Printing problems, Smartforms/Sapscripts/ PDF conversion of spool containing Double byte characters and the approach to solve the issues. Author(s): Prashant Patil Company: Infosys Technologies Ltd. Created on: 23 January 2007

Author Bio

Prashant Patil is working as a Technical Consultant in Infosys Technologies Ltd. He has a total of 5 years work experience (2.6 years IT + 2.4 years Non-IT).

Page 2: Double Byte Characters

Double Byte Characters in SAP

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 2

Table of Contents Introduction ...................................................................................................................................... 3 Printing Double Byte Characters ..................................................................................................... 4 Follow the steps as listed below: ..................................................................................................... 4 1. The Font is not available for the printer.......................................................................... 4 2. Device type not supporting the font................................................................................ 6 3. SAP Level – Multibyte setting......................................................................................... 7 4. At operating system level install the required Language................................................ 8 5. Suitable fonts for specific languages.............................................................................. 8 Related Links ................................................................................................................................. 11 Disclaimer and Liability Notice....................................................................................................... 12

Page 3: Double Byte Characters

Double Byte Characters in SAP

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 3

Introduction In SDN Forum, I have seen many queries related to Junk characters being displayed in SAP. The replies given are absolutely fine, but sometimes there is not just a single approach which solves the problem. There are many settings and changes to be done in order to solve the Junk characters issue. This document covers all the steps required while using Double byte characters in SAP.

Page 4: Double Byte Characters

Double Byte Characters in SAP

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 4

Printing Double Byte Characters While working on Smartforms/Scripts/Converting Spool to PDF for Double byte characters, many of you would be facing following problems: Double Byte Characters displayed properly in the Preview of Sap-Script/Smartform, but printing Garbage Values or ‘#’ Spool output is converted to PDF. The Non-English characters are garbled Non-English characters misaligned in Spool Non-English characters not displayed properly in PDF The common point associated with all of the above queries is Font & Printers. The approach to solve the problem is mentioned below.

Follow the steps as listed below: Is the Font available on Printer Does device type/Spool Server support the font SAP level Multibyte setting in place Operating System Level Language setting in place Is appropriate font for the language used Upload the font Check applicable SAP Notes We will cover the above 7 steps in brief.

1. The Font is not available for the printer In such cases, the print preview displays the data as per our requirement. But when the print out is fired, the double byte characters are garbled. This is because if a Font which does not exist in SAP is assigned to the data which is to be printed, then when we execute the Smartform SAP checks the availability of the Font. If the font is not available, then SAP automatically converts the font and displays it in Print Preview. This is the reason why the data is correctly displayed on Screen. Whereas the Printer doesn’t have the mentioned font and hence garbled output is printed. The same problem is also applicable when you convert the spool to PDF. In such cases, try changing the font. In order to check whether the Font specified is converted to some other Font by SAP during runtime, please follow the following steps: Goto SP01 transaction -> Enter the Spool Number -> Execute

Page 5: Double Byte Characters

Double Byte Characters in SAP

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 5

Tick the check box on left of the spool number

Goto -> Display Requests -> Settings -> Change the DISPLAY MODE from Graphical to RAW and come back to Spool list screen

Click DISPLAY CONTENTS Now you can check the actual FONT used by SAP during printing

Page 6: Double Byte Characters

Double Byte Characters in SAP

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 6

2. Device type not supporting the font The device type which sends the spool requests to the server doesn’t support the Font or the Printer (Spool) server doesn’t have the specified Font. In such case either change the Device type or install the Font on Printer Server. Goto Transaction SPAD and change the Device type or Spool server. a. Goto Transaction SPAD and click Output Devices

b. Select the device type

Page 7: Double Byte Characters

Double Byte Characters in SAP

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 7

c. Change the Device type or Change the spool Server or Install Font on the Spool server

3. SAP Level – Multibyte setting Click ALT + F12 Select Options -> I18N Tick Activate Multibyte functionality

Page 8: Double Byte Characters

Double Byte Characters in SAP

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 8

4. At operating system level install the required Language Start -> Control Panel -> Regional and Language Options Install files for East Asian Languages If its already installed, then Add the language of the font which you are using in the Smartform

5. Suitable fonts for specific languages

Language Code Font

ISO8859-5 (Cyrillic) BG, RU, SR, UK COURCYR, HELVCYR, TIMECYR

ISO 8859-7 (Greek) EL COUR_I7, HELV_I7, TIME_I7

ISO8859-8 (Hebrew) HE COURIER, HELVE, TIMES

ISO 8859-9 (Turkish) TR COURIER, HELVE, TIMES

Simplified Chinese ZH CNHEI, CNKAI, CNSONG

Japanese JA JPMINCHO, DBMINCHO, DBGOTHIC

Korean KP KPBATANG, KPDODUM, KPGULIM , KPGUNGSE, KPSAMMUL

Traditional Chinese ZF TWDPHEI, TWMING, TWSONG

Thai TH THANGSAN, THDRAFT, THVIJIT

Arabic(Unicode systems only)

AR ANDALE_J

Page 9: Double Byte Characters

Double Byte Characters in SAP

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 9

Font not displayed properly in the spool / Upload the Font If the font is not displayed properly in spool, then you have to upload the necessary font. Upload the font using SE73 transaction

Select True Type Font Installation

Page 10: Double Byte Characters

Double Byte Characters in SAP

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 10

Click on Execute, provide the TR details and Save. User the Font (for eg. ZARIAL ) in the Smartform Style sheet Misalignment of Double byte characters in Spool Normally, the device type supporting double byte characters has different settings because of which a Smartform which is displayed properly in ENGLISH logon might be misaligned when executed in JA or any other logon. This is because of the device type settings. In such cases, if the Smartform is never going to be executed in English Logon, then set the Smartform alignment as JA or required logon. If the requirement is to have Smartform in English as well as other language (JA/Chinese/Thai etc.) then create a copy of the Smartform and do the alignment as per the language. Call different Smartforms as per the Logon language. This can be done only if the other approach mentioned in this document doesn’t solve the issue. SAP Notes related to Fonts Also refer following SAP Notes related to double byte characters:

a. 0000776507 SAPscript/SmartForms: Which fonts for which languages?

b. 0000323736 Restrictions with "PDF print" through spooler

c. 0000317851 Creating PDF format using the SAP spooler in 4.6C/4.6B/4.5B

d. 0000012462 How can I define a new printer font? e. Note 62178 Device types for the Japanese version of the R/3 System

Page 11: Double Byte Characters

Double Byte Characters in SAP

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 11

Related Links www.sdn.sap.com www.sap.com

Page 12: Double Byte Characters

Double Byte Characters in SAP

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com © 2007 SAP AG 12

Disclaimer and Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.