Beruflich Dokumente
Kultur Dokumente
ASUG Upgrade Symposium June 2007 Thomas Jung SAP NetWeaver Product Management
Introduction Today we will focus on an upgrade from 4.6C to SAP ERP 6.0 (Formerly mySAP ERP 2005) from the view of the ABAP development team. We will look at the tasks and challenges your developers will face, showing some of the program changes that will need to be made. Also we will see some of the new ABAP features that you will be able to leverage once you are upgraded.
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 3
Program Adjustments - Experiences Made the Unicode Adjustments to programs during the Upgrade Must adjust Customer Functions for Unicode Of the 2000 Objects approx 200 needed to be touched Dev System adjustments 3 developers for 3 days Used the Sandbox system and Standalone Netweaver system to fix difficult problems in advance Polish HR Add-in was messy
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 5
SPAU
The upgrade process stops and provides the opportunity to make Modification Adjustments
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 6
DEMO
Demo SPAU
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 7
SE95
Allows you to view ALL modifications regardless of how they may or may not have been touched by the Upgrade Note Corrections are also listed (separately if made via Note Assistant)
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 8
DEMO
Demo SE95
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 9
SAMT
General Tool for performing multiple types of system wide program scans
Can create separate scan sets broken down by Object Name, Package, etc.
Large Scans can be ran in the background Stops scanning an object upon finding the first syntax error
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 10
DEMO
Demo SAMT
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 11
U+0061
U+00E4 U+03B1 U+3479 U+2007B
00 61
00 E4 03 B1 34 79 DA00 DC7B
61 00
E4 00 B1 03 79 34 00DA7BDC
61
C3 A4 CE B1 E3 91 B9 F0A081BB
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 13
ok
not allowed
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 14
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 15
UCCHECK
Similar tool to SAMT, except it is specifically designed for Unicode Compatibility Checks
Does NOT stop scanning an object after the first problem is found
Can be used to set the Unicode Attribute on a group of objects
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 16
DEMO
Demo UCCHECK
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 17
Main Features
Clear distinction between character and byte processing 1 Character 1 Byte Enhanced checks prevent programming based on memory layout assumptions Improved conversion facilities Improved dataset interface Improved support for dynamic programming
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 18
Byte Processing
CONCATENATE xf1 xf2 TO xf3 IN BYTE MODE. IF xf1 BYTE-CS xf2. ... Variants of string operations for byte processing
Addition IN BYTE MODE for statements Prefix BYTE- for comparison operations
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 19
Unicode Restrictions Length And Distance Determining the Length and Distance
Counted in bytes or in characters? Specify! DESCRIBE FIELD...LENGTH... IN (BYTE | CHARACTER) MODE DESCRIBE DISTANCE BETWEEN ... AND ... INTO ... IN (BYTE | CHARACTER) MODE.
Example
FORM write3 USING fld TYPE c. DATA: fldlen TYPE i. DESCRIBE FIELD fld LENGTH fldlen IN CHARACTER MODE. IF fldlen >= 3. WRITE: / fld(3). ENDIF. ENDFORM.
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 20
struc2
C(4)
C(3) C(10)
C(3)
X(3) X(3)
C(4) C(4)
I I P(8) fragments
Example
DATA: BEGIN OF cstru, first(10) TYPE c, tab(1) TYPE c, last(10) TYPE c, END OF cstru. cstru = xstru. DATA: BEGIN OF xstru, first(10) TYPE c, tab(1) TYPE x VALUE '09', last(10) TYPE c, END OF xstru. "Unicode error!
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 21
Unicode Restrictions Access With Offset or Length Access To Structures With Offset/Length
Structure must begin with characters Offset/length counted in characters
N(6) +off(len)
C(4)
X(3)
C(5)
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 22
Example
CLASS cl_abap_char_utilities DEFINITION LOAD. DATA: text TYPE string. REPLACE cl_abap_char_utilites=>horizontal_tab WITH space INTO text.
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 23
New ABAP Features Extended File Interface Reading / Writing Different Text Formats
OPEN DATASET dsn IN TEXT MODE ENCODING (DEFAULT | UTF-8 | NON-UNICODE). TRANSFER text TO dsn. READ DATASET dsn INTO text.
Only character-like fields allowed for reading / writing text files Explicit open required in Unicode enabled programs
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 24
Endian conversion
little endian / big endian byte order
Character conversion
Unicode code point / ABAP character
Conversion
any code page system code page
CL_ABAP_CONV_OUT_CE
CL_ABAP_CONV_X2X_CE
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 25
New ABAP Features Includes With Group Names Symbolic Access to Includes of Structures
TYPES: BEGIN OF t_key, k1(2) TYPE x, k2(2) TYPE c, END OF t_key. TYPES: BEGIN OF t_rest, r1(10) TYPE c, r2(10) TYPE c, END OF t_rest. stru k1 k2 key r1 r2 rest
DATA: BEGIN OF stru. INCLUDE TYPE t_key as key. INCLUDE TYPE t_rest as rest. DATA: END OF stru. DATA: skey TYPE t_key, srest TYPE t_rest.
Pre-Unicode
skey = stru(4). srest = stru+4(20). WRITE: stru-r2.
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 26
User Exits
Form routines
Filters Classe s
Workbench
Enhancement Framework
Kernel
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 28
Begin/End of Form routine / Function module / Method End of a structure End of Private/Protected/Public Section of a local class ...
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 31
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 32
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 33
to leave Enhancement
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 34
DEMO
Source Code Plugin
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 35
Class/Interface Enhancements
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 36
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 37
Pre/Post Exits
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 38
DEMO
Class Enhancement
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 39
BADIs - Overview What are BAdIs? Business Add-Ins is an anticipated point of extension these points act like sockets and exist in the original coding has a well-defined interface in contrast to source code plug-ins and is therefore more stable to changes in the original coding Kernel BAdIs - New Features
Are integrated directly in the ABAP Language/Runtime Improved filter support allows non-character filter types (packed, numeric, string) and complex filter conditions Enable reusable implementation instances (Stateful BAdI) Control of the lifetime of implementations (BAdI-context) Allow for inheritance of implementations Can be switched by the Switch Framework
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 40
Active implementations are evaluated at compile time and included in the load of the BAdI-handle.
selecting implementations and issuing calls is mixed up calls cause DB access calls are redirected over a proxy class
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 41
Implementation
BAdI Implementation 1
Simple Enhancement Implementation SEI1
Package A
BAdI Implementation 2
BAdI BADI_A
BAdI BADI_B BAdI Implementation 3 BAdI Implementation 4
Simple Enhancement Implementation SEI2
BAdI BADI_C
Package B
BAdI Implementation 5
Switch_2
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 42
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 43
DEMO
Kernel-BAdI
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 44
Automatic migration by by selecting utilitiesmigrate Automatic migration selecting utilitiesmigration from BAdI from BAdI Builder (SE18) Builder (se18)
Specify Enhancement Spot Defintion Specify Enhancement Spot for BAdIfor BAdI Definition Specify Enhancement Implementation for BAdI Specify Enhancement Implementation for BAdI Implementation
no special knowledge necessary
Implementation
can be automated.
Performance Comparison
Classic BAdI
Migrated BAdI
New BAdI
2-27
x faster as classic BAdI
40-600
x faster as classic BAdI
200%-2600%
4000%-60000%
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 46
Further Information
Documentation
Transaction ABAPDOCU Books ABAP Objects and Official ABAP Reference by Horst Keller and Next Generation ABAP Development by Rich Heilman and Thomas Jung; SAP Press
Public Web
SAP Developer Network: www.sdn.sap.com NetWeaver Application Server ABAP SAP Customer Services Network: www.sap.com/services/
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 47
QUESTIONS
How to contact me: Thomas Jung thomas.jung@sap.com
SAP AG 2007, SAP ERP: Upgrades for ABAP Developers/ Thomas Jung / 48