SPC251
Making ProgramsUnicode Enabled
SAP AG 2006 SAP TechEd rsquo06 SPC251 2
Contributing Speakers
Dr Christian HansenInternationalization NetWeaver Application ServerPTU SAP NetWeaver SAP Korea Ltd
Matthias MittelsteinInternationalization NetWeaver Application ServerPTU SAP NetWeaver SAP AG
Ming XuInternationalization NetWeaver Application ServerPTU SAP NetWeaver SAP AG
Martin SchmidtInternationalization NetWeaver Application ServerPTU SAP NetWeaver SAP AG
SAP AG 2006 SAP TechEd rsquo06 SPC251 3
Remark
The original title wasSPC251Making ABAP Programs Unicode Enabled
Though the word ABAP has been lost when the title had been shortened for theTechEd program overview we will talk only about ABAP today
JAVA programs always use Unicode So they dont require special enablement
C and C++ programs at SAP (kernel and basis tools) had been Unicode enabledmany years ago Programmers outside of SAP normally dont have the need towrite programs in C or C++ which can be used with and also without Unicodeand which are portable to several different operating systems andhardware platforms
Tools for Unicode Enabling
Exercises
SAPs approach to Unicode
Unicode Enabled ABAP
SAP AG 2006 SAP TechEd rsquo06 SPC251 5
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 6
Unicode Essentials
What is UnicodeCharacter encoding schema for (nearly) all characters used world wide
Each character has a unique number (bdquoUnicode code pointldquo)ndash Notation U+nnnn (where nnnn are hexadecimal digits)
See httpwwwunicodeorg for complete code charts
SAP AG 2006 SAP TechEd rsquo06 SPC251 7
Old Solution For Multiple Languages MDMP
Check your system type with report RSCPINST current configuration
West European View Japanese View Korean View
SAP AG 2006 SAP TechEd rsquo06 SPC251 8
Old Solution For Multiple Languages MDMP
West European View Japanese View Korean View
End of support with NetWeaver lsquo04
(see notes 838402 and 79991)
(As of release NetWeaver 04s and moving forward MDMP will no longer be supported)
SAP AG 2006 SAP TechEd rsquo06 SPC251 9
Only Supported Solution For Multilingual Systems Unicode
UnicodeUnicode
SAP AG 2006 SAP TechEd rsquo06 SPC251 10
SAP NetWeavertrade ndash The Integration Platform
Evolution ofmySAP Technology
Unifies and aligns peopleinformation andbusiness processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 11
SAP NetWeavertrade With Non-Unicode ABAP Stack
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 12
SAP NetWeavertrade With Non-Unicode ABAP Stack
noEvolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 13
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
noSAP NetWeavertrade
Com
posi
te A
pplic
atio
n Fr
amew
ork
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 14
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
nono
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 15
Only Solution For Full Integration Unicode
yes
yes
yes
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 16
E3 91 B979 3434 79U+3479
CE B1B1 0303 B1U+03B1
C3 A4E4 0000 E4U+00E4auml6161 0000 61U+0061a
UTF-8UTF-16little endian
UTF-16big endian
Unicodecode point
Character
Representation of Unicode Characters
UTF-16 ndash Unicode Transformation Format 16 bit encodingFixed length 1 character = 2 bytes (surrogate pairs = 2 + 2 bytes)Platform dependent byte order2 byte alignment restriction
UTF-8 ndash Unicode Transformation Format 8 bit encodingVariable length 1 character = 14 bytesPlatform independentno alignment restriction7 bit US ASCII compatible
F0A081BB00DA7BDCDA00 DC7BU+2007B
SAP AG 2006 SAP TechEd rsquo06 SPC251 17
Transparent Unicode Enabling of R3
Character Expansion ModelSeparate Unicode and non-Unicode versions of R3
No explicit Unicode data type in ABAPSingle ABAP source for Unicode and non-Unicode systems
1 character = 2 bytes (UTF16)(types C N D T STRING)Unicode kernelUnicode database
1 character = 1 byte(types C N D T STRING)Non-Unicode kernelNon-Unicode database
ABAPsource
Non-Unicode
R3
UnicodeR3
ABAPsourceABAPsource
SAP AG 2006 SAP TechEd rsquo06 SPC251 18
Transparent Unicode Enabling of R3
ImplicationsMajor part of ABAP coding is ready for Unicode without any changes
Minor part of ABAP coding written before release SAP_BASIS 610 hasto be adapted to comply with Unicode restrictions
ndash Syntactical restrictionsndash Additional runtime checksndash Runtime tests for semantic changes
SAP AG 2006 SAP TechEd rsquo06 SPC251 19
Unicode-Enabled ABAP Programs
Program attribute bdquoUnicode checks activeldquoRequired to run on a Unicode system
If attribute is set additional restrictionsndash apply at compile and at run timendash apply in Unicode systems and in non-Unicode systemsndash ensure that program will run on non-Unicode and Unicode systems with
(almost) identical behavior
not allowedokAttribute not set
(not Unicodeenabled)
okokAttribute set(Unicode enabled)
Unicodesystem
Non-Unicodesystem
SAP AG 2006 SAP TechEd rsquo06 SPC251 20
Program Attribute bdquoUnicode Checks Activeldquo
SAP AG 2006 SAP TechEd rsquo06 SPC251 21
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 22
Unicode Enabled ABAP ndash Overview
Design GoalsPlatform independencendash Identical behavior on Unicode and non-Unicode systems
Highest level of compatibility to the pre-Unicode worldndash Minimize costs for Unicode enabling of ABAP Programs
Improved security maintainability and readability of ABAP programs
Main FeaturesClear distinction between character and byte processing
1 Character 1 ByteEnhanced checks prevent programming based on memory layoutassumptionsImproved conversion facilitiesImproved dataset interfaceImproved support for dynamic programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 23
CONCATENATE cf1 cf2 TO cf3IF cf1 CS cf2
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODEIF xf1 BYTE-CS xf2
Unicode Restrictions ndash String Processing
Character Processing
String operations are only allowed for character-like operandsndash ABAP types C N D and T STRINGndash Structures consisting only of characters (C N D T)ndash X and XSTRING are no longer considered character-like types
Byte Processing
Variants of string operations for byte processingndash Addition bdquoIN BYTE MODEldquo for statementsndash Prefix bdquoBYTE-ldquo for comparison operations
Only operands of type X or XSTRING allowed
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 2
Contributing Speakers
Dr Christian HansenInternationalization NetWeaver Application ServerPTU SAP NetWeaver SAP Korea Ltd
Matthias MittelsteinInternationalization NetWeaver Application ServerPTU SAP NetWeaver SAP AG
Ming XuInternationalization NetWeaver Application ServerPTU SAP NetWeaver SAP AG
Martin SchmidtInternationalization NetWeaver Application ServerPTU SAP NetWeaver SAP AG
SAP AG 2006 SAP TechEd rsquo06 SPC251 3
Remark
The original title wasSPC251Making ABAP Programs Unicode Enabled
Though the word ABAP has been lost when the title had been shortened for theTechEd program overview we will talk only about ABAP today
JAVA programs always use Unicode So they dont require special enablement
C and C++ programs at SAP (kernel and basis tools) had been Unicode enabledmany years ago Programmers outside of SAP normally dont have the need towrite programs in C or C++ which can be used with and also without Unicodeand which are portable to several different operating systems andhardware platforms
Tools for Unicode Enabling
Exercises
SAPs approach to Unicode
Unicode Enabled ABAP
SAP AG 2006 SAP TechEd rsquo06 SPC251 5
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 6
Unicode Essentials
What is UnicodeCharacter encoding schema for (nearly) all characters used world wide
Each character has a unique number (bdquoUnicode code pointldquo)ndash Notation U+nnnn (where nnnn are hexadecimal digits)
See httpwwwunicodeorg for complete code charts
SAP AG 2006 SAP TechEd rsquo06 SPC251 7
Old Solution For Multiple Languages MDMP
Check your system type with report RSCPINST current configuration
West European View Japanese View Korean View
SAP AG 2006 SAP TechEd rsquo06 SPC251 8
Old Solution For Multiple Languages MDMP
West European View Japanese View Korean View
End of support with NetWeaver lsquo04
(see notes 838402 and 79991)
(As of release NetWeaver 04s and moving forward MDMP will no longer be supported)
SAP AG 2006 SAP TechEd rsquo06 SPC251 9
Only Supported Solution For Multilingual Systems Unicode
UnicodeUnicode
SAP AG 2006 SAP TechEd rsquo06 SPC251 10
SAP NetWeavertrade ndash The Integration Platform
Evolution ofmySAP Technology
Unifies and aligns peopleinformation andbusiness processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 11
SAP NetWeavertrade With Non-Unicode ABAP Stack
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 12
SAP NetWeavertrade With Non-Unicode ABAP Stack
noEvolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 13
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
noSAP NetWeavertrade
Com
posi
te A
pplic
atio
n Fr
amew
ork
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 14
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
nono
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 15
Only Solution For Full Integration Unicode
yes
yes
yes
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 16
E3 91 B979 3434 79U+3479
CE B1B1 0303 B1U+03B1
C3 A4E4 0000 E4U+00E4auml6161 0000 61U+0061a
UTF-8UTF-16little endian
UTF-16big endian
Unicodecode point
Character
Representation of Unicode Characters
UTF-16 ndash Unicode Transformation Format 16 bit encodingFixed length 1 character = 2 bytes (surrogate pairs = 2 + 2 bytes)Platform dependent byte order2 byte alignment restriction
UTF-8 ndash Unicode Transformation Format 8 bit encodingVariable length 1 character = 14 bytesPlatform independentno alignment restriction7 bit US ASCII compatible
F0A081BB00DA7BDCDA00 DC7BU+2007B
SAP AG 2006 SAP TechEd rsquo06 SPC251 17
Transparent Unicode Enabling of R3
Character Expansion ModelSeparate Unicode and non-Unicode versions of R3
No explicit Unicode data type in ABAPSingle ABAP source for Unicode and non-Unicode systems
1 character = 2 bytes (UTF16)(types C N D T STRING)Unicode kernelUnicode database
1 character = 1 byte(types C N D T STRING)Non-Unicode kernelNon-Unicode database
ABAPsource
Non-Unicode
R3
UnicodeR3
ABAPsourceABAPsource
SAP AG 2006 SAP TechEd rsquo06 SPC251 18
Transparent Unicode Enabling of R3
ImplicationsMajor part of ABAP coding is ready for Unicode without any changes
Minor part of ABAP coding written before release SAP_BASIS 610 hasto be adapted to comply with Unicode restrictions
ndash Syntactical restrictionsndash Additional runtime checksndash Runtime tests for semantic changes
SAP AG 2006 SAP TechEd rsquo06 SPC251 19
Unicode-Enabled ABAP Programs
Program attribute bdquoUnicode checks activeldquoRequired to run on a Unicode system
If attribute is set additional restrictionsndash apply at compile and at run timendash apply in Unicode systems and in non-Unicode systemsndash ensure that program will run on non-Unicode and Unicode systems with
(almost) identical behavior
not allowedokAttribute not set
(not Unicodeenabled)
okokAttribute set(Unicode enabled)
Unicodesystem
Non-Unicodesystem
SAP AG 2006 SAP TechEd rsquo06 SPC251 20
Program Attribute bdquoUnicode Checks Activeldquo
SAP AG 2006 SAP TechEd rsquo06 SPC251 21
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 22
Unicode Enabled ABAP ndash Overview
Design GoalsPlatform independencendash Identical behavior on Unicode and non-Unicode systems
Highest level of compatibility to the pre-Unicode worldndash Minimize costs for Unicode enabling of ABAP Programs
Improved security maintainability and readability of ABAP programs
Main FeaturesClear distinction between character and byte processing
1 Character 1 ByteEnhanced checks prevent programming based on memory layoutassumptionsImproved conversion facilitiesImproved dataset interfaceImproved support for dynamic programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 23
CONCATENATE cf1 cf2 TO cf3IF cf1 CS cf2
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODEIF xf1 BYTE-CS xf2
Unicode Restrictions ndash String Processing
Character Processing
String operations are only allowed for character-like operandsndash ABAP types C N D and T STRINGndash Structures consisting only of characters (C N D T)ndash X and XSTRING are no longer considered character-like types
Byte Processing
Variants of string operations for byte processingndash Addition bdquoIN BYTE MODEldquo for statementsndash Prefix bdquoBYTE-ldquo for comparison operations
Only operands of type X or XSTRING allowed
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 3
Remark
The original title wasSPC251Making ABAP Programs Unicode Enabled
Though the word ABAP has been lost when the title had been shortened for theTechEd program overview we will talk only about ABAP today
JAVA programs always use Unicode So they dont require special enablement
C and C++ programs at SAP (kernel and basis tools) had been Unicode enabledmany years ago Programmers outside of SAP normally dont have the need towrite programs in C or C++ which can be used with and also without Unicodeand which are portable to several different operating systems andhardware platforms
Tools for Unicode Enabling
Exercises
SAPs approach to Unicode
Unicode Enabled ABAP
SAP AG 2006 SAP TechEd rsquo06 SPC251 5
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 6
Unicode Essentials
What is UnicodeCharacter encoding schema for (nearly) all characters used world wide
Each character has a unique number (bdquoUnicode code pointldquo)ndash Notation U+nnnn (where nnnn are hexadecimal digits)
See httpwwwunicodeorg for complete code charts
SAP AG 2006 SAP TechEd rsquo06 SPC251 7
Old Solution For Multiple Languages MDMP
Check your system type with report RSCPINST current configuration
West European View Japanese View Korean View
SAP AG 2006 SAP TechEd rsquo06 SPC251 8
Old Solution For Multiple Languages MDMP
West European View Japanese View Korean View
End of support with NetWeaver lsquo04
(see notes 838402 and 79991)
(As of release NetWeaver 04s and moving forward MDMP will no longer be supported)
SAP AG 2006 SAP TechEd rsquo06 SPC251 9
Only Supported Solution For Multilingual Systems Unicode
UnicodeUnicode
SAP AG 2006 SAP TechEd rsquo06 SPC251 10
SAP NetWeavertrade ndash The Integration Platform
Evolution ofmySAP Technology
Unifies and aligns peopleinformation andbusiness processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 11
SAP NetWeavertrade With Non-Unicode ABAP Stack
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 12
SAP NetWeavertrade With Non-Unicode ABAP Stack
noEvolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 13
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
noSAP NetWeavertrade
Com
posi
te A
pplic
atio
n Fr
amew
ork
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 14
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
nono
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 15
Only Solution For Full Integration Unicode
yes
yes
yes
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 16
E3 91 B979 3434 79U+3479
CE B1B1 0303 B1U+03B1
C3 A4E4 0000 E4U+00E4auml6161 0000 61U+0061a
UTF-8UTF-16little endian
UTF-16big endian
Unicodecode point
Character
Representation of Unicode Characters
UTF-16 ndash Unicode Transformation Format 16 bit encodingFixed length 1 character = 2 bytes (surrogate pairs = 2 + 2 bytes)Platform dependent byte order2 byte alignment restriction
UTF-8 ndash Unicode Transformation Format 8 bit encodingVariable length 1 character = 14 bytesPlatform independentno alignment restriction7 bit US ASCII compatible
F0A081BB00DA7BDCDA00 DC7BU+2007B
SAP AG 2006 SAP TechEd rsquo06 SPC251 17
Transparent Unicode Enabling of R3
Character Expansion ModelSeparate Unicode and non-Unicode versions of R3
No explicit Unicode data type in ABAPSingle ABAP source for Unicode and non-Unicode systems
1 character = 2 bytes (UTF16)(types C N D T STRING)Unicode kernelUnicode database
1 character = 1 byte(types C N D T STRING)Non-Unicode kernelNon-Unicode database
ABAPsource
Non-Unicode
R3
UnicodeR3
ABAPsourceABAPsource
SAP AG 2006 SAP TechEd rsquo06 SPC251 18
Transparent Unicode Enabling of R3
ImplicationsMajor part of ABAP coding is ready for Unicode without any changes
Minor part of ABAP coding written before release SAP_BASIS 610 hasto be adapted to comply with Unicode restrictions
ndash Syntactical restrictionsndash Additional runtime checksndash Runtime tests for semantic changes
SAP AG 2006 SAP TechEd rsquo06 SPC251 19
Unicode-Enabled ABAP Programs
Program attribute bdquoUnicode checks activeldquoRequired to run on a Unicode system
If attribute is set additional restrictionsndash apply at compile and at run timendash apply in Unicode systems and in non-Unicode systemsndash ensure that program will run on non-Unicode and Unicode systems with
(almost) identical behavior
not allowedokAttribute not set
(not Unicodeenabled)
okokAttribute set(Unicode enabled)
Unicodesystem
Non-Unicodesystem
SAP AG 2006 SAP TechEd rsquo06 SPC251 20
Program Attribute bdquoUnicode Checks Activeldquo
SAP AG 2006 SAP TechEd rsquo06 SPC251 21
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 22
Unicode Enabled ABAP ndash Overview
Design GoalsPlatform independencendash Identical behavior on Unicode and non-Unicode systems
Highest level of compatibility to the pre-Unicode worldndash Minimize costs for Unicode enabling of ABAP Programs
Improved security maintainability and readability of ABAP programs
Main FeaturesClear distinction between character and byte processing
1 Character 1 ByteEnhanced checks prevent programming based on memory layoutassumptionsImproved conversion facilitiesImproved dataset interfaceImproved support for dynamic programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 23
CONCATENATE cf1 cf2 TO cf3IF cf1 CS cf2
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODEIF xf1 BYTE-CS xf2
Unicode Restrictions ndash String Processing
Character Processing
String operations are only allowed for character-like operandsndash ABAP types C N D and T STRINGndash Structures consisting only of characters (C N D T)ndash X and XSTRING are no longer considered character-like types
Byte Processing
Variants of string operations for byte processingndash Addition bdquoIN BYTE MODEldquo for statementsndash Prefix bdquoBYTE-ldquo for comparison operations
Only operands of type X or XSTRING allowed
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
Tools for Unicode Enabling
Exercises
SAPs approach to Unicode
Unicode Enabled ABAP
SAP AG 2006 SAP TechEd rsquo06 SPC251 5
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 6
Unicode Essentials
What is UnicodeCharacter encoding schema for (nearly) all characters used world wide
Each character has a unique number (bdquoUnicode code pointldquo)ndash Notation U+nnnn (where nnnn are hexadecimal digits)
See httpwwwunicodeorg for complete code charts
SAP AG 2006 SAP TechEd rsquo06 SPC251 7
Old Solution For Multiple Languages MDMP
Check your system type with report RSCPINST current configuration
West European View Japanese View Korean View
SAP AG 2006 SAP TechEd rsquo06 SPC251 8
Old Solution For Multiple Languages MDMP
West European View Japanese View Korean View
End of support with NetWeaver lsquo04
(see notes 838402 and 79991)
(As of release NetWeaver 04s and moving forward MDMP will no longer be supported)
SAP AG 2006 SAP TechEd rsquo06 SPC251 9
Only Supported Solution For Multilingual Systems Unicode
UnicodeUnicode
SAP AG 2006 SAP TechEd rsquo06 SPC251 10
SAP NetWeavertrade ndash The Integration Platform
Evolution ofmySAP Technology
Unifies and aligns peopleinformation andbusiness processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 11
SAP NetWeavertrade With Non-Unicode ABAP Stack
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 12
SAP NetWeavertrade With Non-Unicode ABAP Stack
noEvolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 13
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
noSAP NetWeavertrade
Com
posi
te A
pplic
atio
n Fr
amew
ork
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 14
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
nono
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 15
Only Solution For Full Integration Unicode
yes
yes
yes
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 16
E3 91 B979 3434 79U+3479
CE B1B1 0303 B1U+03B1
C3 A4E4 0000 E4U+00E4auml6161 0000 61U+0061a
UTF-8UTF-16little endian
UTF-16big endian
Unicodecode point
Character
Representation of Unicode Characters
UTF-16 ndash Unicode Transformation Format 16 bit encodingFixed length 1 character = 2 bytes (surrogate pairs = 2 + 2 bytes)Platform dependent byte order2 byte alignment restriction
UTF-8 ndash Unicode Transformation Format 8 bit encodingVariable length 1 character = 14 bytesPlatform independentno alignment restriction7 bit US ASCII compatible
F0A081BB00DA7BDCDA00 DC7BU+2007B
SAP AG 2006 SAP TechEd rsquo06 SPC251 17
Transparent Unicode Enabling of R3
Character Expansion ModelSeparate Unicode and non-Unicode versions of R3
No explicit Unicode data type in ABAPSingle ABAP source for Unicode and non-Unicode systems
1 character = 2 bytes (UTF16)(types C N D T STRING)Unicode kernelUnicode database
1 character = 1 byte(types C N D T STRING)Non-Unicode kernelNon-Unicode database
ABAPsource
Non-Unicode
R3
UnicodeR3
ABAPsourceABAPsource
SAP AG 2006 SAP TechEd rsquo06 SPC251 18
Transparent Unicode Enabling of R3
ImplicationsMajor part of ABAP coding is ready for Unicode without any changes
Minor part of ABAP coding written before release SAP_BASIS 610 hasto be adapted to comply with Unicode restrictions
ndash Syntactical restrictionsndash Additional runtime checksndash Runtime tests for semantic changes
SAP AG 2006 SAP TechEd rsquo06 SPC251 19
Unicode-Enabled ABAP Programs
Program attribute bdquoUnicode checks activeldquoRequired to run on a Unicode system
If attribute is set additional restrictionsndash apply at compile and at run timendash apply in Unicode systems and in non-Unicode systemsndash ensure that program will run on non-Unicode and Unicode systems with
(almost) identical behavior
not allowedokAttribute not set
(not Unicodeenabled)
okokAttribute set(Unicode enabled)
Unicodesystem
Non-Unicodesystem
SAP AG 2006 SAP TechEd rsquo06 SPC251 20
Program Attribute bdquoUnicode Checks Activeldquo
SAP AG 2006 SAP TechEd rsquo06 SPC251 21
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 22
Unicode Enabled ABAP ndash Overview
Design GoalsPlatform independencendash Identical behavior on Unicode and non-Unicode systems
Highest level of compatibility to the pre-Unicode worldndash Minimize costs for Unicode enabling of ABAP Programs
Improved security maintainability and readability of ABAP programs
Main FeaturesClear distinction between character and byte processing
1 Character 1 ByteEnhanced checks prevent programming based on memory layoutassumptionsImproved conversion facilitiesImproved dataset interfaceImproved support for dynamic programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 23
CONCATENATE cf1 cf2 TO cf3IF cf1 CS cf2
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODEIF xf1 BYTE-CS xf2
Unicode Restrictions ndash String Processing
Character Processing
String operations are only allowed for character-like operandsndash ABAP types C N D and T STRINGndash Structures consisting only of characters (C N D T)ndash X and XSTRING are no longer considered character-like types
Byte Processing
Variants of string operations for byte processingndash Addition bdquoIN BYTE MODEldquo for statementsndash Prefix bdquoBYTE-ldquo for comparison operations
Only operands of type X or XSTRING allowed
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 5
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 6
Unicode Essentials
What is UnicodeCharacter encoding schema for (nearly) all characters used world wide
Each character has a unique number (bdquoUnicode code pointldquo)ndash Notation U+nnnn (where nnnn are hexadecimal digits)
See httpwwwunicodeorg for complete code charts
SAP AG 2006 SAP TechEd rsquo06 SPC251 7
Old Solution For Multiple Languages MDMP
Check your system type with report RSCPINST current configuration
West European View Japanese View Korean View
SAP AG 2006 SAP TechEd rsquo06 SPC251 8
Old Solution For Multiple Languages MDMP
West European View Japanese View Korean View
End of support with NetWeaver lsquo04
(see notes 838402 and 79991)
(As of release NetWeaver 04s and moving forward MDMP will no longer be supported)
SAP AG 2006 SAP TechEd rsquo06 SPC251 9
Only Supported Solution For Multilingual Systems Unicode
UnicodeUnicode
SAP AG 2006 SAP TechEd rsquo06 SPC251 10
SAP NetWeavertrade ndash The Integration Platform
Evolution ofmySAP Technology
Unifies and aligns peopleinformation andbusiness processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 11
SAP NetWeavertrade With Non-Unicode ABAP Stack
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 12
SAP NetWeavertrade With Non-Unicode ABAP Stack
noEvolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 13
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
noSAP NetWeavertrade
Com
posi
te A
pplic
atio
n Fr
amew
ork
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 14
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
nono
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 15
Only Solution For Full Integration Unicode
yes
yes
yes
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 16
E3 91 B979 3434 79U+3479
CE B1B1 0303 B1U+03B1
C3 A4E4 0000 E4U+00E4auml6161 0000 61U+0061a
UTF-8UTF-16little endian
UTF-16big endian
Unicodecode point
Character
Representation of Unicode Characters
UTF-16 ndash Unicode Transformation Format 16 bit encodingFixed length 1 character = 2 bytes (surrogate pairs = 2 + 2 bytes)Platform dependent byte order2 byte alignment restriction
UTF-8 ndash Unicode Transformation Format 8 bit encodingVariable length 1 character = 14 bytesPlatform independentno alignment restriction7 bit US ASCII compatible
F0A081BB00DA7BDCDA00 DC7BU+2007B
SAP AG 2006 SAP TechEd rsquo06 SPC251 17
Transparent Unicode Enabling of R3
Character Expansion ModelSeparate Unicode and non-Unicode versions of R3
No explicit Unicode data type in ABAPSingle ABAP source for Unicode and non-Unicode systems
1 character = 2 bytes (UTF16)(types C N D T STRING)Unicode kernelUnicode database
1 character = 1 byte(types C N D T STRING)Non-Unicode kernelNon-Unicode database
ABAPsource
Non-Unicode
R3
UnicodeR3
ABAPsourceABAPsource
SAP AG 2006 SAP TechEd rsquo06 SPC251 18
Transparent Unicode Enabling of R3
ImplicationsMajor part of ABAP coding is ready for Unicode without any changes
Minor part of ABAP coding written before release SAP_BASIS 610 hasto be adapted to comply with Unicode restrictions
ndash Syntactical restrictionsndash Additional runtime checksndash Runtime tests for semantic changes
SAP AG 2006 SAP TechEd rsquo06 SPC251 19
Unicode-Enabled ABAP Programs
Program attribute bdquoUnicode checks activeldquoRequired to run on a Unicode system
If attribute is set additional restrictionsndash apply at compile and at run timendash apply in Unicode systems and in non-Unicode systemsndash ensure that program will run on non-Unicode and Unicode systems with
(almost) identical behavior
not allowedokAttribute not set
(not Unicodeenabled)
okokAttribute set(Unicode enabled)
Unicodesystem
Non-Unicodesystem
SAP AG 2006 SAP TechEd rsquo06 SPC251 20
Program Attribute bdquoUnicode Checks Activeldquo
SAP AG 2006 SAP TechEd rsquo06 SPC251 21
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 22
Unicode Enabled ABAP ndash Overview
Design GoalsPlatform independencendash Identical behavior on Unicode and non-Unicode systems
Highest level of compatibility to the pre-Unicode worldndash Minimize costs for Unicode enabling of ABAP Programs
Improved security maintainability and readability of ABAP programs
Main FeaturesClear distinction between character and byte processing
1 Character 1 ByteEnhanced checks prevent programming based on memory layoutassumptionsImproved conversion facilitiesImproved dataset interfaceImproved support for dynamic programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 23
CONCATENATE cf1 cf2 TO cf3IF cf1 CS cf2
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODEIF xf1 BYTE-CS xf2
Unicode Restrictions ndash String Processing
Character Processing
String operations are only allowed for character-like operandsndash ABAP types C N D and T STRINGndash Structures consisting only of characters (C N D T)ndash X and XSTRING are no longer considered character-like types
Byte Processing
Variants of string operations for byte processingndash Addition bdquoIN BYTE MODEldquo for statementsndash Prefix bdquoBYTE-ldquo for comparison operations
Only operands of type X or XSTRING allowed
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 6
Unicode Essentials
What is UnicodeCharacter encoding schema for (nearly) all characters used world wide
Each character has a unique number (bdquoUnicode code pointldquo)ndash Notation U+nnnn (where nnnn are hexadecimal digits)
See httpwwwunicodeorg for complete code charts
SAP AG 2006 SAP TechEd rsquo06 SPC251 7
Old Solution For Multiple Languages MDMP
Check your system type with report RSCPINST current configuration
West European View Japanese View Korean View
SAP AG 2006 SAP TechEd rsquo06 SPC251 8
Old Solution For Multiple Languages MDMP
West European View Japanese View Korean View
End of support with NetWeaver lsquo04
(see notes 838402 and 79991)
(As of release NetWeaver 04s and moving forward MDMP will no longer be supported)
SAP AG 2006 SAP TechEd rsquo06 SPC251 9
Only Supported Solution For Multilingual Systems Unicode
UnicodeUnicode
SAP AG 2006 SAP TechEd rsquo06 SPC251 10
SAP NetWeavertrade ndash The Integration Platform
Evolution ofmySAP Technology
Unifies and aligns peopleinformation andbusiness processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 11
SAP NetWeavertrade With Non-Unicode ABAP Stack
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 12
SAP NetWeavertrade With Non-Unicode ABAP Stack
noEvolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 13
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
noSAP NetWeavertrade
Com
posi
te A
pplic
atio
n Fr
amew
ork
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 14
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
nono
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 15
Only Solution For Full Integration Unicode
yes
yes
yes
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 16
E3 91 B979 3434 79U+3479
CE B1B1 0303 B1U+03B1
C3 A4E4 0000 E4U+00E4auml6161 0000 61U+0061a
UTF-8UTF-16little endian
UTF-16big endian
Unicodecode point
Character
Representation of Unicode Characters
UTF-16 ndash Unicode Transformation Format 16 bit encodingFixed length 1 character = 2 bytes (surrogate pairs = 2 + 2 bytes)Platform dependent byte order2 byte alignment restriction
UTF-8 ndash Unicode Transformation Format 8 bit encodingVariable length 1 character = 14 bytesPlatform independentno alignment restriction7 bit US ASCII compatible
F0A081BB00DA7BDCDA00 DC7BU+2007B
SAP AG 2006 SAP TechEd rsquo06 SPC251 17
Transparent Unicode Enabling of R3
Character Expansion ModelSeparate Unicode and non-Unicode versions of R3
No explicit Unicode data type in ABAPSingle ABAP source for Unicode and non-Unicode systems
1 character = 2 bytes (UTF16)(types C N D T STRING)Unicode kernelUnicode database
1 character = 1 byte(types C N D T STRING)Non-Unicode kernelNon-Unicode database
ABAPsource
Non-Unicode
R3
UnicodeR3
ABAPsourceABAPsource
SAP AG 2006 SAP TechEd rsquo06 SPC251 18
Transparent Unicode Enabling of R3
ImplicationsMajor part of ABAP coding is ready for Unicode without any changes
Minor part of ABAP coding written before release SAP_BASIS 610 hasto be adapted to comply with Unicode restrictions
ndash Syntactical restrictionsndash Additional runtime checksndash Runtime tests for semantic changes
SAP AG 2006 SAP TechEd rsquo06 SPC251 19
Unicode-Enabled ABAP Programs
Program attribute bdquoUnicode checks activeldquoRequired to run on a Unicode system
If attribute is set additional restrictionsndash apply at compile and at run timendash apply in Unicode systems and in non-Unicode systemsndash ensure that program will run on non-Unicode and Unicode systems with
(almost) identical behavior
not allowedokAttribute not set
(not Unicodeenabled)
okokAttribute set(Unicode enabled)
Unicodesystem
Non-Unicodesystem
SAP AG 2006 SAP TechEd rsquo06 SPC251 20
Program Attribute bdquoUnicode Checks Activeldquo
SAP AG 2006 SAP TechEd rsquo06 SPC251 21
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 22
Unicode Enabled ABAP ndash Overview
Design GoalsPlatform independencendash Identical behavior on Unicode and non-Unicode systems
Highest level of compatibility to the pre-Unicode worldndash Minimize costs for Unicode enabling of ABAP Programs
Improved security maintainability and readability of ABAP programs
Main FeaturesClear distinction between character and byte processing
1 Character 1 ByteEnhanced checks prevent programming based on memory layoutassumptionsImproved conversion facilitiesImproved dataset interfaceImproved support for dynamic programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 23
CONCATENATE cf1 cf2 TO cf3IF cf1 CS cf2
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODEIF xf1 BYTE-CS xf2
Unicode Restrictions ndash String Processing
Character Processing
String operations are only allowed for character-like operandsndash ABAP types C N D and T STRINGndash Structures consisting only of characters (C N D T)ndash X and XSTRING are no longer considered character-like types
Byte Processing
Variants of string operations for byte processingndash Addition bdquoIN BYTE MODEldquo for statementsndash Prefix bdquoBYTE-ldquo for comparison operations
Only operands of type X or XSTRING allowed
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 7
Old Solution For Multiple Languages MDMP
Check your system type with report RSCPINST current configuration
West European View Japanese View Korean View
SAP AG 2006 SAP TechEd rsquo06 SPC251 8
Old Solution For Multiple Languages MDMP
West European View Japanese View Korean View
End of support with NetWeaver lsquo04
(see notes 838402 and 79991)
(As of release NetWeaver 04s and moving forward MDMP will no longer be supported)
SAP AG 2006 SAP TechEd rsquo06 SPC251 9
Only Supported Solution For Multilingual Systems Unicode
UnicodeUnicode
SAP AG 2006 SAP TechEd rsquo06 SPC251 10
SAP NetWeavertrade ndash The Integration Platform
Evolution ofmySAP Technology
Unifies and aligns peopleinformation andbusiness processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 11
SAP NetWeavertrade With Non-Unicode ABAP Stack
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 12
SAP NetWeavertrade With Non-Unicode ABAP Stack
noEvolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 13
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
noSAP NetWeavertrade
Com
posi
te A
pplic
atio
n Fr
amew
ork
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 14
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
nono
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 15
Only Solution For Full Integration Unicode
yes
yes
yes
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 16
E3 91 B979 3434 79U+3479
CE B1B1 0303 B1U+03B1
C3 A4E4 0000 E4U+00E4auml6161 0000 61U+0061a
UTF-8UTF-16little endian
UTF-16big endian
Unicodecode point
Character
Representation of Unicode Characters
UTF-16 ndash Unicode Transformation Format 16 bit encodingFixed length 1 character = 2 bytes (surrogate pairs = 2 + 2 bytes)Platform dependent byte order2 byte alignment restriction
UTF-8 ndash Unicode Transformation Format 8 bit encodingVariable length 1 character = 14 bytesPlatform independentno alignment restriction7 bit US ASCII compatible
F0A081BB00DA7BDCDA00 DC7BU+2007B
SAP AG 2006 SAP TechEd rsquo06 SPC251 17
Transparent Unicode Enabling of R3
Character Expansion ModelSeparate Unicode and non-Unicode versions of R3
No explicit Unicode data type in ABAPSingle ABAP source for Unicode and non-Unicode systems
1 character = 2 bytes (UTF16)(types C N D T STRING)Unicode kernelUnicode database
1 character = 1 byte(types C N D T STRING)Non-Unicode kernelNon-Unicode database
ABAPsource
Non-Unicode
R3
UnicodeR3
ABAPsourceABAPsource
SAP AG 2006 SAP TechEd rsquo06 SPC251 18
Transparent Unicode Enabling of R3
ImplicationsMajor part of ABAP coding is ready for Unicode without any changes
Minor part of ABAP coding written before release SAP_BASIS 610 hasto be adapted to comply with Unicode restrictions
ndash Syntactical restrictionsndash Additional runtime checksndash Runtime tests for semantic changes
SAP AG 2006 SAP TechEd rsquo06 SPC251 19
Unicode-Enabled ABAP Programs
Program attribute bdquoUnicode checks activeldquoRequired to run on a Unicode system
If attribute is set additional restrictionsndash apply at compile and at run timendash apply in Unicode systems and in non-Unicode systemsndash ensure that program will run on non-Unicode and Unicode systems with
(almost) identical behavior
not allowedokAttribute not set
(not Unicodeenabled)
okokAttribute set(Unicode enabled)
Unicodesystem
Non-Unicodesystem
SAP AG 2006 SAP TechEd rsquo06 SPC251 20
Program Attribute bdquoUnicode Checks Activeldquo
SAP AG 2006 SAP TechEd rsquo06 SPC251 21
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 22
Unicode Enabled ABAP ndash Overview
Design GoalsPlatform independencendash Identical behavior on Unicode and non-Unicode systems
Highest level of compatibility to the pre-Unicode worldndash Minimize costs for Unicode enabling of ABAP Programs
Improved security maintainability and readability of ABAP programs
Main FeaturesClear distinction between character and byte processing
1 Character 1 ByteEnhanced checks prevent programming based on memory layoutassumptionsImproved conversion facilitiesImproved dataset interfaceImproved support for dynamic programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 23
CONCATENATE cf1 cf2 TO cf3IF cf1 CS cf2
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODEIF xf1 BYTE-CS xf2
Unicode Restrictions ndash String Processing
Character Processing
String operations are only allowed for character-like operandsndash ABAP types C N D and T STRINGndash Structures consisting only of characters (C N D T)ndash X and XSTRING are no longer considered character-like types
Byte Processing
Variants of string operations for byte processingndash Addition bdquoIN BYTE MODEldquo for statementsndash Prefix bdquoBYTE-ldquo for comparison operations
Only operands of type X or XSTRING allowed
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 8
Old Solution For Multiple Languages MDMP
West European View Japanese View Korean View
End of support with NetWeaver lsquo04
(see notes 838402 and 79991)
(As of release NetWeaver 04s and moving forward MDMP will no longer be supported)
SAP AG 2006 SAP TechEd rsquo06 SPC251 9
Only Supported Solution For Multilingual Systems Unicode
UnicodeUnicode
SAP AG 2006 SAP TechEd rsquo06 SPC251 10
SAP NetWeavertrade ndash The Integration Platform
Evolution ofmySAP Technology
Unifies and aligns peopleinformation andbusiness processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 11
SAP NetWeavertrade With Non-Unicode ABAP Stack
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 12
SAP NetWeavertrade With Non-Unicode ABAP Stack
noEvolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 13
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
noSAP NetWeavertrade
Com
posi
te A
pplic
atio
n Fr
amew
ork
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 14
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
nono
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 15
Only Solution For Full Integration Unicode
yes
yes
yes
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 16
E3 91 B979 3434 79U+3479
CE B1B1 0303 B1U+03B1
C3 A4E4 0000 E4U+00E4auml6161 0000 61U+0061a
UTF-8UTF-16little endian
UTF-16big endian
Unicodecode point
Character
Representation of Unicode Characters
UTF-16 ndash Unicode Transformation Format 16 bit encodingFixed length 1 character = 2 bytes (surrogate pairs = 2 + 2 bytes)Platform dependent byte order2 byte alignment restriction
UTF-8 ndash Unicode Transformation Format 8 bit encodingVariable length 1 character = 14 bytesPlatform independentno alignment restriction7 bit US ASCII compatible
F0A081BB00DA7BDCDA00 DC7BU+2007B
SAP AG 2006 SAP TechEd rsquo06 SPC251 17
Transparent Unicode Enabling of R3
Character Expansion ModelSeparate Unicode and non-Unicode versions of R3
No explicit Unicode data type in ABAPSingle ABAP source for Unicode and non-Unicode systems
1 character = 2 bytes (UTF16)(types C N D T STRING)Unicode kernelUnicode database
1 character = 1 byte(types C N D T STRING)Non-Unicode kernelNon-Unicode database
ABAPsource
Non-Unicode
R3
UnicodeR3
ABAPsourceABAPsource
SAP AG 2006 SAP TechEd rsquo06 SPC251 18
Transparent Unicode Enabling of R3
ImplicationsMajor part of ABAP coding is ready for Unicode without any changes
Minor part of ABAP coding written before release SAP_BASIS 610 hasto be adapted to comply with Unicode restrictions
ndash Syntactical restrictionsndash Additional runtime checksndash Runtime tests for semantic changes
SAP AG 2006 SAP TechEd rsquo06 SPC251 19
Unicode-Enabled ABAP Programs
Program attribute bdquoUnicode checks activeldquoRequired to run on a Unicode system
If attribute is set additional restrictionsndash apply at compile and at run timendash apply in Unicode systems and in non-Unicode systemsndash ensure that program will run on non-Unicode and Unicode systems with
(almost) identical behavior
not allowedokAttribute not set
(not Unicodeenabled)
okokAttribute set(Unicode enabled)
Unicodesystem
Non-Unicodesystem
SAP AG 2006 SAP TechEd rsquo06 SPC251 20
Program Attribute bdquoUnicode Checks Activeldquo
SAP AG 2006 SAP TechEd rsquo06 SPC251 21
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 22
Unicode Enabled ABAP ndash Overview
Design GoalsPlatform independencendash Identical behavior on Unicode and non-Unicode systems
Highest level of compatibility to the pre-Unicode worldndash Minimize costs for Unicode enabling of ABAP Programs
Improved security maintainability and readability of ABAP programs
Main FeaturesClear distinction between character and byte processing
1 Character 1 ByteEnhanced checks prevent programming based on memory layoutassumptionsImproved conversion facilitiesImproved dataset interfaceImproved support for dynamic programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 23
CONCATENATE cf1 cf2 TO cf3IF cf1 CS cf2
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODEIF xf1 BYTE-CS xf2
Unicode Restrictions ndash String Processing
Character Processing
String operations are only allowed for character-like operandsndash ABAP types C N D and T STRINGndash Structures consisting only of characters (C N D T)ndash X and XSTRING are no longer considered character-like types
Byte Processing
Variants of string operations for byte processingndash Addition bdquoIN BYTE MODEldquo for statementsndash Prefix bdquoBYTE-ldquo for comparison operations
Only operands of type X or XSTRING allowed
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 9
Only Supported Solution For Multilingual Systems Unicode
UnicodeUnicode
SAP AG 2006 SAP TechEd rsquo06 SPC251 10
SAP NetWeavertrade ndash The Integration Platform
Evolution ofmySAP Technology
Unifies and aligns peopleinformation andbusiness processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 11
SAP NetWeavertrade With Non-Unicode ABAP Stack
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 12
SAP NetWeavertrade With Non-Unicode ABAP Stack
noEvolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 13
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
noSAP NetWeavertrade
Com
posi
te A
pplic
atio
n Fr
amew
ork
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 14
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
nono
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 15
Only Solution For Full Integration Unicode
yes
yes
yes
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 16
E3 91 B979 3434 79U+3479
CE B1B1 0303 B1U+03B1
C3 A4E4 0000 E4U+00E4auml6161 0000 61U+0061a
UTF-8UTF-16little endian
UTF-16big endian
Unicodecode point
Character
Representation of Unicode Characters
UTF-16 ndash Unicode Transformation Format 16 bit encodingFixed length 1 character = 2 bytes (surrogate pairs = 2 + 2 bytes)Platform dependent byte order2 byte alignment restriction
UTF-8 ndash Unicode Transformation Format 8 bit encodingVariable length 1 character = 14 bytesPlatform independentno alignment restriction7 bit US ASCII compatible
F0A081BB00DA7BDCDA00 DC7BU+2007B
SAP AG 2006 SAP TechEd rsquo06 SPC251 17
Transparent Unicode Enabling of R3
Character Expansion ModelSeparate Unicode and non-Unicode versions of R3
No explicit Unicode data type in ABAPSingle ABAP source for Unicode and non-Unicode systems
1 character = 2 bytes (UTF16)(types C N D T STRING)Unicode kernelUnicode database
1 character = 1 byte(types C N D T STRING)Non-Unicode kernelNon-Unicode database
ABAPsource
Non-Unicode
R3
UnicodeR3
ABAPsourceABAPsource
SAP AG 2006 SAP TechEd rsquo06 SPC251 18
Transparent Unicode Enabling of R3
ImplicationsMajor part of ABAP coding is ready for Unicode without any changes
Minor part of ABAP coding written before release SAP_BASIS 610 hasto be adapted to comply with Unicode restrictions
ndash Syntactical restrictionsndash Additional runtime checksndash Runtime tests for semantic changes
SAP AG 2006 SAP TechEd rsquo06 SPC251 19
Unicode-Enabled ABAP Programs
Program attribute bdquoUnicode checks activeldquoRequired to run on a Unicode system
If attribute is set additional restrictionsndash apply at compile and at run timendash apply in Unicode systems and in non-Unicode systemsndash ensure that program will run on non-Unicode and Unicode systems with
(almost) identical behavior
not allowedokAttribute not set
(not Unicodeenabled)
okokAttribute set(Unicode enabled)
Unicodesystem
Non-Unicodesystem
SAP AG 2006 SAP TechEd rsquo06 SPC251 20
Program Attribute bdquoUnicode Checks Activeldquo
SAP AG 2006 SAP TechEd rsquo06 SPC251 21
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 22
Unicode Enabled ABAP ndash Overview
Design GoalsPlatform independencendash Identical behavior on Unicode and non-Unicode systems
Highest level of compatibility to the pre-Unicode worldndash Minimize costs for Unicode enabling of ABAP Programs
Improved security maintainability and readability of ABAP programs
Main FeaturesClear distinction between character and byte processing
1 Character 1 ByteEnhanced checks prevent programming based on memory layoutassumptionsImproved conversion facilitiesImproved dataset interfaceImproved support for dynamic programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 23
CONCATENATE cf1 cf2 TO cf3IF cf1 CS cf2
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODEIF xf1 BYTE-CS xf2
Unicode Restrictions ndash String Processing
Character Processing
String operations are only allowed for character-like operandsndash ABAP types C N D and T STRINGndash Structures consisting only of characters (C N D T)ndash X and XSTRING are no longer considered character-like types
Byte Processing
Variants of string operations for byte processingndash Addition bdquoIN BYTE MODEldquo for statementsndash Prefix bdquoBYTE-ldquo for comparison operations
Only operands of type X or XSTRING allowed
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 10
SAP NetWeavertrade ndash The Integration Platform
Evolution ofmySAP Technology
Unifies and aligns peopleinformation andbusiness processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 11
SAP NetWeavertrade With Non-Unicode ABAP Stack
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 12
SAP NetWeavertrade With Non-Unicode ABAP Stack
noEvolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 13
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
noSAP NetWeavertrade
Com
posi
te A
pplic
atio
n Fr
amew
ork
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 14
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
nono
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 15
Only Solution For Full Integration Unicode
yes
yes
yes
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 16
E3 91 B979 3434 79U+3479
CE B1B1 0303 B1U+03B1
C3 A4E4 0000 E4U+00E4auml6161 0000 61U+0061a
UTF-8UTF-16little endian
UTF-16big endian
Unicodecode point
Character
Representation of Unicode Characters
UTF-16 ndash Unicode Transformation Format 16 bit encodingFixed length 1 character = 2 bytes (surrogate pairs = 2 + 2 bytes)Platform dependent byte order2 byte alignment restriction
UTF-8 ndash Unicode Transformation Format 8 bit encodingVariable length 1 character = 14 bytesPlatform independentno alignment restriction7 bit US ASCII compatible
F0A081BB00DA7BDCDA00 DC7BU+2007B
SAP AG 2006 SAP TechEd rsquo06 SPC251 17
Transparent Unicode Enabling of R3
Character Expansion ModelSeparate Unicode and non-Unicode versions of R3
No explicit Unicode data type in ABAPSingle ABAP source for Unicode and non-Unicode systems
1 character = 2 bytes (UTF16)(types C N D T STRING)Unicode kernelUnicode database
1 character = 1 byte(types C N D T STRING)Non-Unicode kernelNon-Unicode database
ABAPsource
Non-Unicode
R3
UnicodeR3
ABAPsourceABAPsource
SAP AG 2006 SAP TechEd rsquo06 SPC251 18
Transparent Unicode Enabling of R3
ImplicationsMajor part of ABAP coding is ready for Unicode without any changes
Minor part of ABAP coding written before release SAP_BASIS 610 hasto be adapted to comply with Unicode restrictions
ndash Syntactical restrictionsndash Additional runtime checksndash Runtime tests for semantic changes
SAP AG 2006 SAP TechEd rsquo06 SPC251 19
Unicode-Enabled ABAP Programs
Program attribute bdquoUnicode checks activeldquoRequired to run on a Unicode system
If attribute is set additional restrictionsndash apply at compile and at run timendash apply in Unicode systems and in non-Unicode systemsndash ensure that program will run on non-Unicode and Unicode systems with
(almost) identical behavior
not allowedokAttribute not set
(not Unicodeenabled)
okokAttribute set(Unicode enabled)
Unicodesystem
Non-Unicodesystem
SAP AG 2006 SAP TechEd rsquo06 SPC251 20
Program Attribute bdquoUnicode Checks Activeldquo
SAP AG 2006 SAP TechEd rsquo06 SPC251 21
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 22
Unicode Enabled ABAP ndash Overview
Design GoalsPlatform independencendash Identical behavior on Unicode and non-Unicode systems
Highest level of compatibility to the pre-Unicode worldndash Minimize costs for Unicode enabling of ABAP Programs
Improved security maintainability and readability of ABAP programs
Main FeaturesClear distinction between character and byte processing
1 Character 1 ByteEnhanced checks prevent programming based on memory layoutassumptionsImproved conversion facilitiesImproved dataset interfaceImproved support for dynamic programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 23
CONCATENATE cf1 cf2 TO cf3IF cf1 CS cf2
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODEIF xf1 BYTE-CS xf2
Unicode Restrictions ndash String Processing
Character Processing
String operations are only allowed for character-like operandsndash ABAP types C N D and T STRINGndash Structures consisting only of characters (C N D T)ndash X and XSTRING are no longer considered character-like types
Byte Processing
Variants of string operations for byte processingndash Addition bdquoIN BYTE MODEldquo for statementsndash Prefix bdquoBYTE-ldquo for comparison operations
Only operands of type X or XSTRING allowed
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 11
SAP NetWeavertrade With Non-Unicode ABAP Stack
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 12
SAP NetWeavertrade With Non-Unicode ABAP Stack
noEvolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 13
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
noSAP NetWeavertrade
Com
posi
te A
pplic
atio
n Fr
amew
ork
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 14
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
nono
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 15
Only Solution For Full Integration Unicode
yes
yes
yes
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 16
E3 91 B979 3434 79U+3479
CE B1B1 0303 B1U+03B1
C3 A4E4 0000 E4U+00E4auml6161 0000 61U+0061a
UTF-8UTF-16little endian
UTF-16big endian
Unicodecode point
Character
Representation of Unicode Characters
UTF-16 ndash Unicode Transformation Format 16 bit encodingFixed length 1 character = 2 bytes (surrogate pairs = 2 + 2 bytes)Platform dependent byte order2 byte alignment restriction
UTF-8 ndash Unicode Transformation Format 8 bit encodingVariable length 1 character = 14 bytesPlatform independentno alignment restriction7 bit US ASCII compatible
F0A081BB00DA7BDCDA00 DC7BU+2007B
SAP AG 2006 SAP TechEd rsquo06 SPC251 17
Transparent Unicode Enabling of R3
Character Expansion ModelSeparate Unicode and non-Unicode versions of R3
No explicit Unicode data type in ABAPSingle ABAP source for Unicode and non-Unicode systems
1 character = 2 bytes (UTF16)(types C N D T STRING)Unicode kernelUnicode database
1 character = 1 byte(types C N D T STRING)Non-Unicode kernelNon-Unicode database
ABAPsource
Non-Unicode
R3
UnicodeR3
ABAPsourceABAPsource
SAP AG 2006 SAP TechEd rsquo06 SPC251 18
Transparent Unicode Enabling of R3
ImplicationsMajor part of ABAP coding is ready for Unicode without any changes
Minor part of ABAP coding written before release SAP_BASIS 610 hasto be adapted to comply with Unicode restrictions
ndash Syntactical restrictionsndash Additional runtime checksndash Runtime tests for semantic changes
SAP AG 2006 SAP TechEd rsquo06 SPC251 19
Unicode-Enabled ABAP Programs
Program attribute bdquoUnicode checks activeldquoRequired to run on a Unicode system
If attribute is set additional restrictionsndash apply at compile and at run timendash apply in Unicode systems and in non-Unicode systemsndash ensure that program will run on non-Unicode and Unicode systems with
(almost) identical behavior
not allowedokAttribute not set
(not Unicodeenabled)
okokAttribute set(Unicode enabled)
Unicodesystem
Non-Unicodesystem
SAP AG 2006 SAP TechEd rsquo06 SPC251 20
Program Attribute bdquoUnicode Checks Activeldquo
SAP AG 2006 SAP TechEd rsquo06 SPC251 21
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 22
Unicode Enabled ABAP ndash Overview
Design GoalsPlatform independencendash Identical behavior on Unicode and non-Unicode systems
Highest level of compatibility to the pre-Unicode worldndash Minimize costs for Unicode enabling of ABAP Programs
Improved security maintainability and readability of ABAP programs
Main FeaturesClear distinction between character and byte processing
1 Character 1 ByteEnhanced checks prevent programming based on memory layoutassumptionsImproved conversion facilitiesImproved dataset interfaceImproved support for dynamic programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 23
CONCATENATE cf1 cf2 TO cf3IF cf1 CS cf2
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODEIF xf1 BYTE-CS xf2
Unicode Restrictions ndash String Processing
Character Processing
String operations are only allowed for character-like operandsndash ABAP types C N D and T STRINGndash Structures consisting only of characters (C N D T)ndash X and XSTRING are no longer considered character-like types
Byte Processing
Variants of string operations for byte processingndash Addition bdquoIN BYTE MODEldquo for statementsndash Prefix bdquoBYTE-ldquo for comparison operations
Only operands of type X or XSTRING allowed
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 12
SAP NetWeavertrade With Non-Unicode ABAP Stack
noEvolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 13
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
noSAP NetWeavertrade
Com
posi
te A
pplic
atio
n Fr
amew
ork
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 14
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
nono
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 15
Only Solution For Full Integration Unicode
yes
yes
yes
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 16
E3 91 B979 3434 79U+3479
CE B1B1 0303 B1U+03B1
C3 A4E4 0000 E4U+00E4auml6161 0000 61U+0061a
UTF-8UTF-16little endian
UTF-16big endian
Unicodecode point
Character
Representation of Unicode Characters
UTF-16 ndash Unicode Transformation Format 16 bit encodingFixed length 1 character = 2 bytes (surrogate pairs = 2 + 2 bytes)Platform dependent byte order2 byte alignment restriction
UTF-8 ndash Unicode Transformation Format 8 bit encodingVariable length 1 character = 14 bytesPlatform independentno alignment restriction7 bit US ASCII compatible
F0A081BB00DA7BDCDA00 DC7BU+2007B
SAP AG 2006 SAP TechEd rsquo06 SPC251 17
Transparent Unicode Enabling of R3
Character Expansion ModelSeparate Unicode and non-Unicode versions of R3
No explicit Unicode data type in ABAPSingle ABAP source for Unicode and non-Unicode systems
1 character = 2 bytes (UTF16)(types C N D T STRING)Unicode kernelUnicode database
1 character = 1 byte(types C N D T STRING)Non-Unicode kernelNon-Unicode database
ABAPsource
Non-Unicode
R3
UnicodeR3
ABAPsourceABAPsource
SAP AG 2006 SAP TechEd rsquo06 SPC251 18
Transparent Unicode Enabling of R3
ImplicationsMajor part of ABAP coding is ready for Unicode without any changes
Minor part of ABAP coding written before release SAP_BASIS 610 hasto be adapted to comply with Unicode restrictions
ndash Syntactical restrictionsndash Additional runtime checksndash Runtime tests for semantic changes
SAP AG 2006 SAP TechEd rsquo06 SPC251 19
Unicode-Enabled ABAP Programs
Program attribute bdquoUnicode checks activeldquoRequired to run on a Unicode system
If attribute is set additional restrictionsndash apply at compile and at run timendash apply in Unicode systems and in non-Unicode systemsndash ensure that program will run on non-Unicode and Unicode systems with
(almost) identical behavior
not allowedokAttribute not set
(not Unicodeenabled)
okokAttribute set(Unicode enabled)
Unicodesystem
Non-Unicodesystem
SAP AG 2006 SAP TechEd rsquo06 SPC251 20
Program Attribute bdquoUnicode Checks Activeldquo
SAP AG 2006 SAP TechEd rsquo06 SPC251 21
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 22
Unicode Enabled ABAP ndash Overview
Design GoalsPlatform independencendash Identical behavior on Unicode and non-Unicode systems
Highest level of compatibility to the pre-Unicode worldndash Minimize costs for Unicode enabling of ABAP Programs
Improved security maintainability and readability of ABAP programs
Main FeaturesClear distinction between character and byte processing
1 Character 1 ByteEnhanced checks prevent programming based on memory layoutassumptionsImproved conversion facilitiesImproved dataset interfaceImproved support for dynamic programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 23
CONCATENATE cf1 cf2 TO cf3IF cf1 CS cf2
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODEIF xf1 BYTE-CS xf2
Unicode Restrictions ndash String Processing
Character Processing
String operations are only allowed for character-like operandsndash ABAP types C N D and T STRINGndash Structures consisting only of characters (C N D T)ndash X and XSTRING are no longer considered character-like types
Byte Processing
Variants of string operations for byte processingndash Addition bdquoIN BYTE MODEldquo for statementsndash Prefix bdquoBYTE-ldquo for comparison operations
Only operands of type X or XSTRING allowed
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 13
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
noSAP NetWeavertrade
Com
posi
te A
pplic
atio
n Fr
amew
ork
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 14
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
nono
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 15
Only Solution For Full Integration Unicode
yes
yes
yes
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 16
E3 91 B979 3434 79U+3479
CE B1B1 0303 B1U+03B1
C3 A4E4 0000 E4U+00E4auml6161 0000 61U+0061a
UTF-8UTF-16little endian
UTF-16big endian
Unicodecode point
Character
Representation of Unicode Characters
UTF-16 ndash Unicode Transformation Format 16 bit encodingFixed length 1 character = 2 bytes (surrogate pairs = 2 + 2 bytes)Platform dependent byte order2 byte alignment restriction
UTF-8 ndash Unicode Transformation Format 8 bit encodingVariable length 1 character = 14 bytesPlatform independentno alignment restriction7 bit US ASCII compatible
F0A081BB00DA7BDCDA00 DC7BU+2007B
SAP AG 2006 SAP TechEd rsquo06 SPC251 17
Transparent Unicode Enabling of R3
Character Expansion ModelSeparate Unicode and non-Unicode versions of R3
No explicit Unicode data type in ABAPSingle ABAP source for Unicode and non-Unicode systems
1 character = 2 bytes (UTF16)(types C N D T STRING)Unicode kernelUnicode database
1 character = 1 byte(types C N D T STRING)Non-Unicode kernelNon-Unicode database
ABAPsource
Non-Unicode
R3
UnicodeR3
ABAPsourceABAPsource
SAP AG 2006 SAP TechEd rsquo06 SPC251 18
Transparent Unicode Enabling of R3
ImplicationsMajor part of ABAP coding is ready for Unicode without any changes
Minor part of ABAP coding written before release SAP_BASIS 610 hasto be adapted to comply with Unicode restrictions
ndash Syntactical restrictionsndash Additional runtime checksndash Runtime tests for semantic changes
SAP AG 2006 SAP TechEd rsquo06 SPC251 19
Unicode-Enabled ABAP Programs
Program attribute bdquoUnicode checks activeldquoRequired to run on a Unicode system
If attribute is set additional restrictionsndash apply at compile and at run timendash apply in Unicode systems and in non-Unicode systemsndash ensure that program will run on non-Unicode and Unicode systems with
(almost) identical behavior
not allowedokAttribute not set
(not Unicodeenabled)
okokAttribute set(Unicode enabled)
Unicodesystem
Non-Unicodesystem
SAP AG 2006 SAP TechEd rsquo06 SPC251 20
Program Attribute bdquoUnicode Checks Activeldquo
SAP AG 2006 SAP TechEd rsquo06 SPC251 21
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 22
Unicode Enabled ABAP ndash Overview
Design GoalsPlatform independencendash Identical behavior on Unicode and non-Unicode systems
Highest level of compatibility to the pre-Unicode worldndash Minimize costs for Unicode enabling of ABAP Programs
Improved security maintainability and readability of ABAP programs
Main FeaturesClear distinction between character and byte processing
1 Character 1 ByteEnhanced checks prevent programming based on memory layoutassumptionsImproved conversion facilitiesImproved dataset interfaceImproved support for dynamic programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 23
CONCATENATE cf1 cf2 TO cf3IF cf1 CS cf2
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODEIF xf1 BYTE-CS xf2
Unicode Restrictions ndash String Processing
Character Processing
String operations are only allowed for character-like operandsndash ABAP types C N D and T STRINGndash Structures consisting only of characters (C N D T)ndash X and XSTRING are no longer considered character-like types
Byte Processing
Variants of string operations for byte processingndash Addition bdquoIN BYTE MODEldquo for statementsndash Prefix bdquoBYTE-ldquo for comparison operations
Only operands of type X or XSTRING allowed
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 14
SAP NetWeavertrade With Non-Unicode ABAP Stack
no
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
nono
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
non-Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 15
Only Solution For Full Integration Unicode
yes
yes
yes
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 16
E3 91 B979 3434 79U+3479
CE B1B1 0303 B1U+03B1
C3 A4E4 0000 E4U+00E4auml6161 0000 61U+0061a
UTF-8UTF-16little endian
UTF-16big endian
Unicodecode point
Character
Representation of Unicode Characters
UTF-16 ndash Unicode Transformation Format 16 bit encodingFixed length 1 character = 2 bytes (surrogate pairs = 2 + 2 bytes)Platform dependent byte order2 byte alignment restriction
UTF-8 ndash Unicode Transformation Format 8 bit encodingVariable length 1 character = 14 bytesPlatform independentno alignment restriction7 bit US ASCII compatible
F0A081BB00DA7BDCDA00 DC7BU+2007B
SAP AG 2006 SAP TechEd rsquo06 SPC251 17
Transparent Unicode Enabling of R3
Character Expansion ModelSeparate Unicode and non-Unicode versions of R3
No explicit Unicode data type in ABAPSingle ABAP source for Unicode and non-Unicode systems
1 character = 2 bytes (UTF16)(types C N D T STRING)Unicode kernelUnicode database
1 character = 1 byte(types C N D T STRING)Non-Unicode kernelNon-Unicode database
ABAPsource
Non-Unicode
R3
UnicodeR3
ABAPsourceABAPsource
SAP AG 2006 SAP TechEd rsquo06 SPC251 18
Transparent Unicode Enabling of R3
ImplicationsMajor part of ABAP coding is ready for Unicode without any changes
Minor part of ABAP coding written before release SAP_BASIS 610 hasto be adapted to comply with Unicode restrictions
ndash Syntactical restrictionsndash Additional runtime checksndash Runtime tests for semantic changes
SAP AG 2006 SAP TechEd rsquo06 SPC251 19
Unicode-Enabled ABAP Programs
Program attribute bdquoUnicode checks activeldquoRequired to run on a Unicode system
If attribute is set additional restrictionsndash apply at compile and at run timendash apply in Unicode systems and in non-Unicode systemsndash ensure that program will run on non-Unicode and Unicode systems with
(almost) identical behavior
not allowedokAttribute not set
(not Unicodeenabled)
okokAttribute set(Unicode enabled)
Unicodesystem
Non-Unicodesystem
SAP AG 2006 SAP TechEd rsquo06 SPC251 20
Program Attribute bdquoUnicode Checks Activeldquo
SAP AG 2006 SAP TechEd rsquo06 SPC251 21
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 22
Unicode Enabled ABAP ndash Overview
Design GoalsPlatform independencendash Identical behavior on Unicode and non-Unicode systems
Highest level of compatibility to the pre-Unicode worldndash Minimize costs for Unicode enabling of ABAP Programs
Improved security maintainability and readability of ABAP programs
Main FeaturesClear distinction between character and byte processing
1 Character 1 ByteEnhanced checks prevent programming based on memory layoutassumptionsImproved conversion facilitiesImproved dataset interfaceImproved support for dynamic programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 23
CONCATENATE cf1 cf2 TO cf3IF cf1 CS cf2
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODEIF xf1 BYTE-CS xf2
Unicode Restrictions ndash String Processing
Character Processing
String operations are only allowed for character-like operandsndash ABAP types C N D and T STRINGndash Structures consisting only of characters (C N D T)ndash X and XSTRING are no longer considered character-like types
Byte Processing
Variants of string operations for byte processingndash Addition bdquoIN BYTE MODEldquo for statementsndash Prefix bdquoBYTE-ldquo for comparison operations
Only operands of type X or XSTRING allowed
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 15
Only Solution For Full Integration Unicode
yes
yes
yes
Evolution ofmySAP Technology
Unifies and aligns peopleinformation and business processes
Integrates across technologies andorganizational boundaries
A safe choice with full NET and J2EEinteroperability
The business foundation for SAPand partners
Powers business-ready solutionsthat reduce custom integration
Its Enterprise Services Architectureincreases business process flexibility
SAP NetWeavertradeC
ompo
site
App
licat
ion
Fram
ewor
k
PEOPLE INTEGRATION
Multi channel access
Portal Collaboration
INFORMATION INTEGRATION
Bus Intelligence
Master Data Mgmt
Knowledge Mgmt
PROCESS INTEGRATION
IntegrationBroker
BusinessProcess Mgmt
APPLICATION PLATFORM
J2EE
DB and OS Abstraction
Unicode ABAPLife-C
ycle Mgm
t
SAP AG 2006 SAP TechEd rsquo06 SPC251 16
E3 91 B979 3434 79U+3479
CE B1B1 0303 B1U+03B1
C3 A4E4 0000 E4U+00E4auml6161 0000 61U+0061a
UTF-8UTF-16little endian
UTF-16big endian
Unicodecode point
Character
Representation of Unicode Characters
UTF-16 ndash Unicode Transformation Format 16 bit encodingFixed length 1 character = 2 bytes (surrogate pairs = 2 + 2 bytes)Platform dependent byte order2 byte alignment restriction
UTF-8 ndash Unicode Transformation Format 8 bit encodingVariable length 1 character = 14 bytesPlatform independentno alignment restriction7 bit US ASCII compatible
F0A081BB00DA7BDCDA00 DC7BU+2007B
SAP AG 2006 SAP TechEd rsquo06 SPC251 17
Transparent Unicode Enabling of R3
Character Expansion ModelSeparate Unicode and non-Unicode versions of R3
No explicit Unicode data type in ABAPSingle ABAP source for Unicode and non-Unicode systems
1 character = 2 bytes (UTF16)(types C N D T STRING)Unicode kernelUnicode database
1 character = 1 byte(types C N D T STRING)Non-Unicode kernelNon-Unicode database
ABAPsource
Non-Unicode
R3
UnicodeR3
ABAPsourceABAPsource
SAP AG 2006 SAP TechEd rsquo06 SPC251 18
Transparent Unicode Enabling of R3
ImplicationsMajor part of ABAP coding is ready for Unicode without any changes
Minor part of ABAP coding written before release SAP_BASIS 610 hasto be adapted to comply with Unicode restrictions
ndash Syntactical restrictionsndash Additional runtime checksndash Runtime tests for semantic changes
SAP AG 2006 SAP TechEd rsquo06 SPC251 19
Unicode-Enabled ABAP Programs
Program attribute bdquoUnicode checks activeldquoRequired to run on a Unicode system
If attribute is set additional restrictionsndash apply at compile and at run timendash apply in Unicode systems and in non-Unicode systemsndash ensure that program will run on non-Unicode and Unicode systems with
(almost) identical behavior
not allowedokAttribute not set
(not Unicodeenabled)
okokAttribute set(Unicode enabled)
Unicodesystem
Non-Unicodesystem
SAP AG 2006 SAP TechEd rsquo06 SPC251 20
Program Attribute bdquoUnicode Checks Activeldquo
SAP AG 2006 SAP TechEd rsquo06 SPC251 21
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 22
Unicode Enabled ABAP ndash Overview
Design GoalsPlatform independencendash Identical behavior on Unicode and non-Unicode systems
Highest level of compatibility to the pre-Unicode worldndash Minimize costs for Unicode enabling of ABAP Programs
Improved security maintainability and readability of ABAP programs
Main FeaturesClear distinction between character and byte processing
1 Character 1 ByteEnhanced checks prevent programming based on memory layoutassumptionsImproved conversion facilitiesImproved dataset interfaceImproved support for dynamic programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 23
CONCATENATE cf1 cf2 TO cf3IF cf1 CS cf2
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODEIF xf1 BYTE-CS xf2
Unicode Restrictions ndash String Processing
Character Processing
String operations are only allowed for character-like operandsndash ABAP types C N D and T STRINGndash Structures consisting only of characters (C N D T)ndash X and XSTRING are no longer considered character-like types
Byte Processing
Variants of string operations for byte processingndash Addition bdquoIN BYTE MODEldquo for statementsndash Prefix bdquoBYTE-ldquo for comparison operations
Only operands of type X or XSTRING allowed
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 16
E3 91 B979 3434 79U+3479
CE B1B1 0303 B1U+03B1
C3 A4E4 0000 E4U+00E4auml6161 0000 61U+0061a
UTF-8UTF-16little endian
UTF-16big endian
Unicodecode point
Character
Representation of Unicode Characters
UTF-16 ndash Unicode Transformation Format 16 bit encodingFixed length 1 character = 2 bytes (surrogate pairs = 2 + 2 bytes)Platform dependent byte order2 byte alignment restriction
UTF-8 ndash Unicode Transformation Format 8 bit encodingVariable length 1 character = 14 bytesPlatform independentno alignment restriction7 bit US ASCII compatible
F0A081BB00DA7BDCDA00 DC7BU+2007B
SAP AG 2006 SAP TechEd rsquo06 SPC251 17
Transparent Unicode Enabling of R3
Character Expansion ModelSeparate Unicode and non-Unicode versions of R3
No explicit Unicode data type in ABAPSingle ABAP source for Unicode and non-Unicode systems
1 character = 2 bytes (UTF16)(types C N D T STRING)Unicode kernelUnicode database
1 character = 1 byte(types C N D T STRING)Non-Unicode kernelNon-Unicode database
ABAPsource
Non-Unicode
R3
UnicodeR3
ABAPsourceABAPsource
SAP AG 2006 SAP TechEd rsquo06 SPC251 18
Transparent Unicode Enabling of R3
ImplicationsMajor part of ABAP coding is ready for Unicode without any changes
Minor part of ABAP coding written before release SAP_BASIS 610 hasto be adapted to comply with Unicode restrictions
ndash Syntactical restrictionsndash Additional runtime checksndash Runtime tests for semantic changes
SAP AG 2006 SAP TechEd rsquo06 SPC251 19
Unicode-Enabled ABAP Programs
Program attribute bdquoUnicode checks activeldquoRequired to run on a Unicode system
If attribute is set additional restrictionsndash apply at compile and at run timendash apply in Unicode systems and in non-Unicode systemsndash ensure that program will run on non-Unicode and Unicode systems with
(almost) identical behavior
not allowedokAttribute not set
(not Unicodeenabled)
okokAttribute set(Unicode enabled)
Unicodesystem
Non-Unicodesystem
SAP AG 2006 SAP TechEd rsquo06 SPC251 20
Program Attribute bdquoUnicode Checks Activeldquo
SAP AG 2006 SAP TechEd rsquo06 SPC251 21
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 22
Unicode Enabled ABAP ndash Overview
Design GoalsPlatform independencendash Identical behavior on Unicode and non-Unicode systems
Highest level of compatibility to the pre-Unicode worldndash Minimize costs for Unicode enabling of ABAP Programs
Improved security maintainability and readability of ABAP programs
Main FeaturesClear distinction between character and byte processing
1 Character 1 ByteEnhanced checks prevent programming based on memory layoutassumptionsImproved conversion facilitiesImproved dataset interfaceImproved support for dynamic programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 23
CONCATENATE cf1 cf2 TO cf3IF cf1 CS cf2
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODEIF xf1 BYTE-CS xf2
Unicode Restrictions ndash String Processing
Character Processing
String operations are only allowed for character-like operandsndash ABAP types C N D and T STRINGndash Structures consisting only of characters (C N D T)ndash X and XSTRING are no longer considered character-like types
Byte Processing
Variants of string operations for byte processingndash Addition bdquoIN BYTE MODEldquo for statementsndash Prefix bdquoBYTE-ldquo for comparison operations
Only operands of type X or XSTRING allowed
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 17
Transparent Unicode Enabling of R3
Character Expansion ModelSeparate Unicode and non-Unicode versions of R3
No explicit Unicode data type in ABAPSingle ABAP source for Unicode and non-Unicode systems
1 character = 2 bytes (UTF16)(types C N D T STRING)Unicode kernelUnicode database
1 character = 1 byte(types C N D T STRING)Non-Unicode kernelNon-Unicode database
ABAPsource
Non-Unicode
R3
UnicodeR3
ABAPsourceABAPsource
SAP AG 2006 SAP TechEd rsquo06 SPC251 18
Transparent Unicode Enabling of R3
ImplicationsMajor part of ABAP coding is ready for Unicode without any changes
Minor part of ABAP coding written before release SAP_BASIS 610 hasto be adapted to comply with Unicode restrictions
ndash Syntactical restrictionsndash Additional runtime checksndash Runtime tests for semantic changes
SAP AG 2006 SAP TechEd rsquo06 SPC251 19
Unicode-Enabled ABAP Programs
Program attribute bdquoUnicode checks activeldquoRequired to run on a Unicode system
If attribute is set additional restrictionsndash apply at compile and at run timendash apply in Unicode systems and in non-Unicode systemsndash ensure that program will run on non-Unicode and Unicode systems with
(almost) identical behavior
not allowedokAttribute not set
(not Unicodeenabled)
okokAttribute set(Unicode enabled)
Unicodesystem
Non-Unicodesystem
SAP AG 2006 SAP TechEd rsquo06 SPC251 20
Program Attribute bdquoUnicode Checks Activeldquo
SAP AG 2006 SAP TechEd rsquo06 SPC251 21
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 22
Unicode Enabled ABAP ndash Overview
Design GoalsPlatform independencendash Identical behavior on Unicode and non-Unicode systems
Highest level of compatibility to the pre-Unicode worldndash Minimize costs for Unicode enabling of ABAP Programs
Improved security maintainability and readability of ABAP programs
Main FeaturesClear distinction between character and byte processing
1 Character 1 ByteEnhanced checks prevent programming based on memory layoutassumptionsImproved conversion facilitiesImproved dataset interfaceImproved support for dynamic programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 23
CONCATENATE cf1 cf2 TO cf3IF cf1 CS cf2
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODEIF xf1 BYTE-CS xf2
Unicode Restrictions ndash String Processing
Character Processing
String operations are only allowed for character-like operandsndash ABAP types C N D and T STRINGndash Structures consisting only of characters (C N D T)ndash X and XSTRING are no longer considered character-like types
Byte Processing
Variants of string operations for byte processingndash Addition bdquoIN BYTE MODEldquo for statementsndash Prefix bdquoBYTE-ldquo for comparison operations
Only operands of type X or XSTRING allowed
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 18
Transparent Unicode Enabling of R3
ImplicationsMajor part of ABAP coding is ready for Unicode without any changes
Minor part of ABAP coding written before release SAP_BASIS 610 hasto be adapted to comply with Unicode restrictions
ndash Syntactical restrictionsndash Additional runtime checksndash Runtime tests for semantic changes
SAP AG 2006 SAP TechEd rsquo06 SPC251 19
Unicode-Enabled ABAP Programs
Program attribute bdquoUnicode checks activeldquoRequired to run on a Unicode system
If attribute is set additional restrictionsndash apply at compile and at run timendash apply in Unicode systems and in non-Unicode systemsndash ensure that program will run on non-Unicode and Unicode systems with
(almost) identical behavior
not allowedokAttribute not set
(not Unicodeenabled)
okokAttribute set(Unicode enabled)
Unicodesystem
Non-Unicodesystem
SAP AG 2006 SAP TechEd rsquo06 SPC251 20
Program Attribute bdquoUnicode Checks Activeldquo
SAP AG 2006 SAP TechEd rsquo06 SPC251 21
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 22
Unicode Enabled ABAP ndash Overview
Design GoalsPlatform independencendash Identical behavior on Unicode and non-Unicode systems
Highest level of compatibility to the pre-Unicode worldndash Minimize costs for Unicode enabling of ABAP Programs
Improved security maintainability and readability of ABAP programs
Main FeaturesClear distinction between character and byte processing
1 Character 1 ByteEnhanced checks prevent programming based on memory layoutassumptionsImproved conversion facilitiesImproved dataset interfaceImproved support for dynamic programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 23
CONCATENATE cf1 cf2 TO cf3IF cf1 CS cf2
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODEIF xf1 BYTE-CS xf2
Unicode Restrictions ndash String Processing
Character Processing
String operations are only allowed for character-like operandsndash ABAP types C N D and T STRINGndash Structures consisting only of characters (C N D T)ndash X and XSTRING are no longer considered character-like types
Byte Processing
Variants of string operations for byte processingndash Addition bdquoIN BYTE MODEldquo for statementsndash Prefix bdquoBYTE-ldquo for comparison operations
Only operands of type X or XSTRING allowed
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 19
Unicode-Enabled ABAP Programs
Program attribute bdquoUnicode checks activeldquoRequired to run on a Unicode system
If attribute is set additional restrictionsndash apply at compile and at run timendash apply in Unicode systems and in non-Unicode systemsndash ensure that program will run on non-Unicode and Unicode systems with
(almost) identical behavior
not allowedokAttribute not set
(not Unicodeenabled)
okokAttribute set(Unicode enabled)
Unicodesystem
Non-Unicodesystem
SAP AG 2006 SAP TechEd rsquo06 SPC251 20
Program Attribute bdquoUnicode Checks Activeldquo
SAP AG 2006 SAP TechEd rsquo06 SPC251 21
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 22
Unicode Enabled ABAP ndash Overview
Design GoalsPlatform independencendash Identical behavior on Unicode and non-Unicode systems
Highest level of compatibility to the pre-Unicode worldndash Minimize costs for Unicode enabling of ABAP Programs
Improved security maintainability and readability of ABAP programs
Main FeaturesClear distinction between character and byte processing
1 Character 1 ByteEnhanced checks prevent programming based on memory layoutassumptionsImproved conversion facilitiesImproved dataset interfaceImproved support for dynamic programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 23
CONCATENATE cf1 cf2 TO cf3IF cf1 CS cf2
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODEIF xf1 BYTE-CS xf2
Unicode Restrictions ndash String Processing
Character Processing
String operations are only allowed for character-like operandsndash ABAP types C N D and T STRINGndash Structures consisting only of characters (C N D T)ndash X and XSTRING are no longer considered character-like types
Byte Processing
Variants of string operations for byte processingndash Addition bdquoIN BYTE MODEldquo for statementsndash Prefix bdquoBYTE-ldquo for comparison operations
Only operands of type X or XSTRING allowed
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 20
Program Attribute bdquoUnicode Checks Activeldquo
SAP AG 2006 SAP TechEd rsquo06 SPC251 21
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 22
Unicode Enabled ABAP ndash Overview
Design GoalsPlatform independencendash Identical behavior on Unicode and non-Unicode systems
Highest level of compatibility to the pre-Unicode worldndash Minimize costs for Unicode enabling of ABAP Programs
Improved security maintainability and readability of ABAP programs
Main FeaturesClear distinction between character and byte processing
1 Character 1 ByteEnhanced checks prevent programming based on memory layoutassumptionsImproved conversion facilitiesImproved dataset interfaceImproved support for dynamic programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 23
CONCATENATE cf1 cf2 TO cf3IF cf1 CS cf2
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODEIF xf1 BYTE-CS xf2
Unicode Restrictions ndash String Processing
Character Processing
String operations are only allowed for character-like operandsndash ABAP types C N D and T STRINGndash Structures consisting only of characters (C N D T)ndash X and XSTRING are no longer considered character-like types
Byte Processing
Variants of string operations for byte processingndash Addition bdquoIN BYTE MODEldquo for statementsndash Prefix bdquoBYTE-ldquo for comparison operations
Only operands of type X or XSTRING allowed
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 21
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 22
Unicode Enabled ABAP ndash Overview
Design GoalsPlatform independencendash Identical behavior on Unicode and non-Unicode systems
Highest level of compatibility to the pre-Unicode worldndash Minimize costs for Unicode enabling of ABAP Programs
Improved security maintainability and readability of ABAP programs
Main FeaturesClear distinction between character and byte processing
1 Character 1 ByteEnhanced checks prevent programming based on memory layoutassumptionsImproved conversion facilitiesImproved dataset interfaceImproved support for dynamic programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 23
CONCATENATE cf1 cf2 TO cf3IF cf1 CS cf2
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODEIF xf1 BYTE-CS xf2
Unicode Restrictions ndash String Processing
Character Processing
String operations are only allowed for character-like operandsndash ABAP types C N D and T STRINGndash Structures consisting only of characters (C N D T)ndash X and XSTRING are no longer considered character-like types
Byte Processing
Variants of string operations for byte processingndash Addition bdquoIN BYTE MODEldquo for statementsndash Prefix bdquoBYTE-ldquo for comparison operations
Only operands of type X or XSTRING allowed
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 22
Unicode Enabled ABAP ndash Overview
Design GoalsPlatform independencendash Identical behavior on Unicode and non-Unicode systems
Highest level of compatibility to the pre-Unicode worldndash Minimize costs for Unicode enabling of ABAP Programs
Improved security maintainability and readability of ABAP programs
Main FeaturesClear distinction between character and byte processing
1 Character 1 ByteEnhanced checks prevent programming based on memory layoutassumptionsImproved conversion facilitiesImproved dataset interfaceImproved support for dynamic programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 23
CONCATENATE cf1 cf2 TO cf3IF cf1 CS cf2
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODEIF xf1 BYTE-CS xf2
Unicode Restrictions ndash String Processing
Character Processing
String operations are only allowed for character-like operandsndash ABAP types C N D and T STRINGndash Structures consisting only of characters (C N D T)ndash X and XSTRING are no longer considered character-like types
Byte Processing
Variants of string operations for byte processingndash Addition bdquoIN BYTE MODEldquo for statementsndash Prefix bdquoBYTE-ldquo for comparison operations
Only operands of type X or XSTRING allowed
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 23
CONCATENATE cf1 cf2 TO cf3IF cf1 CS cf2
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODEIF xf1 BYTE-CS xf2
Unicode Restrictions ndash String Processing
Character Processing
String operations are only allowed for character-like operandsndash ABAP types C N D and T STRINGndash Structures consisting only of characters (C N D T)ndash X and XSTRING are no longer considered character-like types
Byte Processing
Variants of string operations for byte processingndash Addition bdquoIN BYTE MODEldquo for statementsndash Prefix bdquoBYTE-ldquo for comparison operations
Only operands of type X or XSTRING allowed
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 24
Unicode Restrictions ndash Length And Distance
Determining the Length and DistanceCounted in bytes or in characters Specify
DESCRIBE FIELDLENGTH IN (BYTE | CHARACTER) MODE
DESCRIBE DISTANCE BETWEEN AND INTO IN (BYTE | CHARACTER) MODE
Example
FORM write3 USING fld TYPE cDATA fldlen TYPE iDESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODEIF fldlen gt= 3
WRITE fld(3)ENDIF
ENDFORM
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 25
Unicode Restrictions ndash MOVE
MOVE Between Incompatible StructuresMatching data layout (bdquofragment viewsldquo) required
Example
C(4) C(3) X(3) C(4) I
C(6) N(4) X(3) N(4) I P(8)
C(3)
C(10) X(3) C(4) I P(8)
struc1
struc2
fragments
cstru = xstru Unicode error
DATABEGIN OF cstrufirst(10) TYPE ctab(1) TYPE clast(10) TYPE c
END OF cstru
DATABEGIN OF xstrufirst(10) TYPE ctab(1) TYPE x VALUE 09last(10) TYPE c
END OF xstru
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 26
Unicode Restrictions ndash Access With Offset or Length
Access To Structures With OffsetLengthStructure must begin with charactersOffsetlength counted in charactersAccess only allowed within the character type prefix of a structure
ASSIGN fld+off(len) TO Access must not exceed field boundariesIf ASSIGN fails field-symbol is set to bdquounassignedldquoNew RANGE addition allows the permissible boundariesto be expanded
N(6) C(4) X(3) C(5)
+off(len)
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 27
New ABAP Features ndash Character Utilities
Class CL_ABAP_CHAR_UTILITIESConstant attributes with system specific values
charsize length of 1 character in bytesnewlinecr_lfform_feedhorizontal_tabvertical_tabbackspaceminchar Xrsquo00lsquo in non-Unicode systems U+0000 in Unicode systemsmaxchar XlsquoFFlsquo in non-Unicode systems U+FFFD in Unicode systems
Example
CLASS cl_abap_char_utilities DEFINITION LOAD
DATA text TYPE string
REPLACE cl_abap_char_utilites=gthorizontal_tabWITH space INTO text
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 28
New ABAP Features ndash Extended File Interface
Reading Writing Different Text Formats
Only character-like fields allowed for reading writing text filesExplicit open required in Unicode enabled programs
Reading Writing Legacy Formats
Reading or writing data in a format compatible to non-Unicode systemsNot character-like structures allowed
OPEN DATASET dsn IN TEXT MODEENCODING (DEFAULT | UTF-8 | NON-UNICODE)
TRANSFER text TO dsnREAD DATASET dsn INTO text
OPEN DATASET dsn IN LEGACY (TEXT | BINARY) MODE (LITTLE | BIG) ENDIAN CODEPAGE cp
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 29
system code page any code pageCL_ABAP_CONV_OUT_CE
any code page any code pageCL_ABAP_CONV_X2X_CE
any code page system code pageCL_ABAP_CONV_IN_CE
ConversionABAP Class
New ABAP Features ndash Conversion Classes
Conversion classesCode page conversionndash Unicode non-Unicode code pages
Endian conversionndash little endian big endian byte order
Character conversionndash Unicode code point ABAP character
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 30
New ABAP Features ndash Includes With Group Names
Symbolic Access to Includes of Structures
skey = stru-keysrest = stru-restWRITE stru-r2
skey = stru(4)srest = stru+4(20)WRITE stru-r2
Pre-Unicode Unicode enabled with group names
DATA BEGIN OF struINCLUDE TYPE t_key as keyINCLUDE TYPE t_rest as rest
DATA END OF struDATA skey TYPE t_key
srest TYPE t_rest
TYPES BEGIN OF t_keyk1(2) TYPE xk2(2) TYPE c
END OF t_key
TYPES BEGIN OF t_restr1(10) TYPE cr2(10) TYPE c
END OF t_rest
stru
k1 k2 r1 r2
key rest
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 31
DATA my_buffer TYPE xstringdata1 TYPE some_type
EXPORT id = data1 TO DATA BUFFER my_buffer
FORM read_buffer USING buffer TYPE xstringDATA fld2 TYPE some_typeIMPORT id = fld2 FROM DATA BUFFER buffer
ENDFORM
New ABAP Features ndash ImportExport Data Buffer
Using fields of type xstring as data containersWriting data to an xstring
ndash Data is stored in a platform-independent formatndash Contents of xstring can be exchanged with any other 610-system (Unicode
and non-Unicode)
Reading data from an xstring
ndash Automatic conversion of data during import
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 32
New ABAP Features ndash Dynamic Programming Support
Creating Data Objects DynamicallyCreating and accessing data objects on the heap
Casting to User Defined TypesLook at the contents of a field as a value of another type
fld must provide sufficient alignment and length for the given type
DATA dref TYPE REF TO data
CREATE DATA dref TYPE sometypeCREATE DATA dref TYPE (typename)CREATE DATA dref TYPE c LENGTH lenCREATE DATA dref TYPE STANDARD TABLE OF (typename)
ASSIGN dref-gt TO ltfgt access data object
FIELD-SYMBOLS ltfgt TYPE any
ASSIGN fld TO ltfgt CASTING TYPE sometypeASSIGN fld TO ltfgt CASTING TYPE (typename)
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 33
SIMPLESIMPLE
CLIKECLIKE
XSEQUENCEXSEQUENCECSEQUENCECSEQUENCE NUMERICNUMERIC
II FF PPXX XSTRINGXSTRINGCC STRINGSTRING NN DD TT character-likestructures(CNDT)
character-likestructures(CNDT)
New ABAP Features ndash Generic Types
New generic types for parameters and field-symbolsEliminate untyped parameters or field-symbols for improved securityand performance
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 34
New ABAP Features ndash Enhancement Categorization
If you are writing software for othersyou may have the followinghellip
ProblemEnhancements on structures or tables may affect your codingndash Syntax-runtime errorsndash Changed behavior (eg damaged or changed data)
SolutionMaintaining the enhancement category in the DDIC SE11 (Extras -gtEnhancement Category)ndash Can not be enhancedndash Can be enhanced - character likendash Can be enhanced ndash character and numerical typendash Can be arbitrarily enhanced
Additional checks are done on your ABAP programs (SLIN) and showpossible problems in allowed enhancement situations
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 35
New ABAP Features ndash ABAP List Programming
ABAP lists Difference between memory and display length
1 Character 1 Display Column
rsquo rsquoCharacter unitsin the memory
Display columns
Non-Unicode 2 2Unicode 1 2
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 36
New ABAP Features ndash ABAP List Programming
Handling for character fields
Truncation may be done during display to synchronize memory lengthand display length at the field boundaries
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 37
New ABAP Features ndash ABAP List Programming
Padding is done in the list table (here for the first field S1) to synchronizememory length and display length at the field boundaries
Handling for strings
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 38
New ABAP Features ndash Different List Types
DynamicHalf width (Default) Full width
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 39
New ABAP Features ndash ABAP List Programming
New ABAP statementsSETGET CURSOR MEMORY OFFSETDynamic output length WRITE () fieldMaximum output length WRITE () field
Utility Class CL_ABAP_LIST_UTILITIESCalculating display lengthsConversions display length memory length inside fieldsHandling of implicit field boundaries
See note 541299 for details
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 40
New ABAP Features ndash ABAP List Programming
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 41
New ABAP Features ndash ABAP List Programming
Golden rules for ABAP list programming
a) Donrsquot mix up display length and memory length
b) Donrsquot smudge field boundaries
c) Donrsquot overwrite parts of fields
d) Donrsquot do self programmed right-justified or centered
e) Donrsquot do self programmed scrolling (memory based)
f) Donrsquot forget to specify sufficient output length if alldata needs always to be visible
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 42
Agenda
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 43
Migrating to Unicode Enabled ABAP
Step 1
In non-Unicode system
Adapt all ABAP programs to Unicode syntax and runtime restrictions
Set attribute Unicode enabled for all programs
Step 2
Set up a Unicode system
ndash Unicode kernel + Unicode database
ndash Only ABAP programs with the Unicode attribute are executable
Do runtime tests in Unicode system
ndash Check for runtime errors
ndash Look for semantic errors
ndash Check ABAP list layout with former double byte characters
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 44
Step 1 ndash Unicode Enabling With UCCHECK
Use UCCHECK to analyze your applicationsRemove errorsInspect statically not analyzable places (optional)ndash Untyped field symbolsndash Offset with variable lengthndash Generic access to database tables
Set Unicode program attributeusing UCCHECK or SE38 SE24 Do additional checks with SLIN (eg matching of actual and formalparameters in function modules)
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 45
Transaction UCCHECK
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 46
UCCHECK ndash Setting Unicode Flag
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 47
UCCHECK ndash Statically Non-Analyzable Places
What to do with the places that can only be checked atruntime
Reduce their numberndash In many cases you can specify the type of parameters and field-symbolsndash Use generic ABAP types where necessaryndash Mark those places that really need untyped parameters due to some kind of
generic programming with ldquoEC as OK after you did revise them
Do Runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 48
Step 2 ndash Testing Your Application
Final tests in the Unicode system
Runtime tests Runtime tests Runtime tests ndash Because the amount of warnings due to statically not analyzable places may
be very large you cannot type everything In this case you have to rely onrun-time tests
ndash Some semantic problems may be seen only in the Unicodesystem (eg byte or character length)
ndash ABAP list layout can be checked only manually
Monitoring of runtime tests
Having test plans is good knowing the coverage of the testis better
Use the ABAP Coverage Analyzer to monitor runtime tests
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 49
ABAP Coverage Analyzer
Coverage Analyzer (Transaction SCOV)persistently traces the execution of all program objects within onesystemtraces all processing blocksndash ie FORMS Methods Modules and ABAP events
collects Informationndash Number of callsndash Number of runtime errorsndash Number of program changes
Two Different Target GroupsDevelopersndash Help to see in detail which parts of your programs are used and which are not
Quality Managersndash Determine the overall system coverage during a test phase
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 50
Coverage Analyzer ndash Details View For Developers
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 51
Coverage Analyzer ndash Global View For QM
1
23
4
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 52
Public WebwwwsapcomhttpwwwservicesapcomUnicodesap TechnologyhttpwwwservicesapcomUnicode Customer contactNetWeaver Developerlsquos Guide wwwsdnsapcomsdndevelopersguidesdn
Related WorkshopsLectures at SAP TechEd 2006SPC200 Conversion of SAP Systems to Unicode lecture (not in Bangalore)
SPC203 Integration Between Heterogeneous SAP Unicode and Third PartySystems (not in Las Vegas)
SPC251 Making Programs Unicode Enabled hands on (not in Bangalore)
Related SAP Education Training Opportunitieshttpwwwsapcomeducationhttpwwwservicesapcomrkt-unicode
Further Information
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 53
Contacts
globalizationsapcom
internationalizationsapcom
Email to development team
Email to solution management team
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 54
THANK YOU FOR YOURATTENTION
QUESTIONS ndash SUGGESTIONS ndash DISCUSSION
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 55
Part I ndash SAPs approach to UnicodeDemo ndash Unicode vs Non-Unicode R3
Unicode Essentials
Transparent Unicode Enabling for R3
Part II ndash Unicode Enabled ABAPUnicode Restrictions
New ABAP Features
Part III ndash Tools for Unicode EnablingMigration to Unicode
Unicode Scan UCCHECK
Coverage Analyzer SCOV
Exercises
Agenda
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 56
Please make sure that you are only working on programslike ZTECHED_UNICODE_EXERCISE_n_XXwhere XX indicates the two digit numberof your working group or your desk
Exercises
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 57
Please complete your session evaluation
Be courteous mdash deposit your trashand do not take the handouts for the following session
Feedback
Thank You
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved
SAP AG 2006 SAP TechEd rsquo06 SPC251 58
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG The informationcontained herein may be changed without prior noticeSome software products marketed by SAP AG and its distributors contain proprietary software components of other software vendorsMicrosoft Windows Outlook and PowerPoint are registered trademarks of Microsoft CorporationIBM DB2 DB2 Universal Database OS2 Parallel Sysplex MVSESA AIX S390 AS400 OS390 OS400 iSeries pSeries xSeries zSeries zOS AFPIntelligent Miner WebSphere Netfinity Tivoli and Informix are trademarks or registered trademarks of IBM Corporation in the United States andor othercountriesOracle is a registered trademark of Oracle CorporationUNIX XOpen OSF1 and Motif are registered trademarks of the Open GroupCitrix ICA Program Neighborhood MetaFrame WinFrame VideoFrame and MultiWin are trademarks or registered trademarks of Citrix Systems IncHTML XML XHTML and W3C are trademarks or registered trademarks of W3Creg World Wide Web Consortium Massachusetts Institute of TechnologyJava is a registered trademark of Sun Microsystems IncJavaScript is a registered trademark of Sun Microsystems Inc used under license for technology invented and implemented by NetscapeMaxDB is a trademark of MySQL AB SwedenSAP R3 mySAP mySAPcom xApps xApp SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos aretrademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world All other product and service names mentionedare the trademarks of their respective companies Data contained in this document serves informational purposes only National product specificationsmay vary
The information in this document is proprietary to SAP No part of this document may be reproduced copied or transmitted in any form or for any purposewithout the express prior written permission of SAP AGThis document is a preliminary version and not subject to your license agreement or any other agreement with SAP This document contains only intendedstrategies developments and functionalities of the SAPreg product and is not intended to be binding upon SAP to any particular course of business productstrategy andor development Please note that this document is subject to change and may be changed by SAP at any time without noticeSAP assumes no responsibility for errors or omissions in this document SAP does not warrant the accuracy or completeness of the information text graphicslinks or other items contained within this material This document is provided without a warranty of any kind either express or implied including but not limitedto the implied warranties of merchantability fitness for a particular purpose or non-infringementSAP shall have no liability for damages of any kind including without limitation direct special indirect or consequential damages that may result from the useof these materials This limitation shall not apply in cases of intent or gross negligenceThe statutory liability for personal injury and defective products is not affected SAP has no control over the information that you may access through the useof hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-partyWeb pages
Copyright 2006 SAP AG All Rights Reserved