Professional Documents
Culture Documents
ABAP New Features PDF
ABAP New Features PDF
Horst Keller
Knowledge Architect, SAP AG
a b c 1 2 3 ä à ß , / = …
Special operators (metacharacters)
. * + ? \ ^ $ ( ) [ ] { }
FIND
[{FIRST OCCURRENCE}|{ALL OCCURRENCES} OF] REGEX regx
IN text
[{RESPECTING|IGNORING} CASE]
[MATCH COUNT mcnt]
[RESULTS result_tab].
REPLACE
[{FIRST OCCURRENCE}|{ALL OCCURRENCES} OF] REGEX regx
IN text WITH repl
[{RESPECTING|IGNORING} CASE]
[REPLACEMENT COUNT mcnt]
[RESULTS result_tab].
(?:tick)*(?:tock)*
– Increased performance over ( )
repl = `i`.
CONCATENATE repl '(?![^<>]*>)' INTO regx.
Matcher CL_ABAP_MATCHER
– Main class for interaction with REs
– Stores copy of text to process (efficient for CL_ABAP_MATCHER
strings, costly for fixed-length fields)
___ $0
– Links text to regex object and tracks matching ___
___
and replacing within text
Using CREATE
matcher = cl_abap_matcher=>create(
pattern = `\w+(\.\w+)*@(\w+\.)+(\w{2,4})`
ignore_case = 'X'
text = email ).
DB
User X
Session
Common data
retrieved from DB
DB
Common
Data
User X
Session
Common data
retrieved from DB and
DB aggregated
User X
Session
Common data
retrieved from DB and
DB aggregated for
each user session
DB
User X
Session
Common data
retrieved from DB
DB
Common
Data
User X
Session
Common data
retrieved from DB,
DB aggregated
User X
Session
Common
Data
User X
Session
User X
Session
User X
Session
Commit changes
Commit changes
Attach Reader1
Commit changes
Attach Reader1
Attach Reader2
Commit changes
Attach Reader1
Attach Reader2
Detach Reader1
Commit changes
Attach Reader1
Attach Reader2
Detach Reader1
Detach Reader2
Versioning
Transactionality
Propagation
Client Dependency
Displacement
ABAP in
new aver XML
Data We
Net 04 Doc
XS
LT
LT
XS
Simple
Transformations … .. ….
…. … ..
.. …. …. ..
… …. .. .. Network
XSLT
XS
DB
LT
LT
XS
… .. ….
…. … ..
.. …. …. ..
HTML / Text
Both
symmetric: no generation of ABAP code / XML schemas
integrated in workbench (maintenance / transport)
integrated in ABAP: CALL TRANSFORMATION
<?sap.transform simple?>
<tt:transform
xmlns:tt="http://www.sap.com/transformation-templates">
<tt:root name="table"/>
<tt:template>
<TABLE>
<tt:loop ref=".table">
<ITEM> DATA: itab TYPE TABLE OF i,
<tt:value /> xmlstr TYPE xstring.
</ITEM> DO 3 TIMES. APPEND sy-index TO itab. ENDDO.
</tt:loop> CALL TRANSFORMATION z_simple_table
</TABLE> SOURCE table = itab
</tt:template> RESULT XML xmlstr.
</tt:transform> CALL FUNCTION 'DISPLAY_XML_STRING'
EXPORTING xml_string = xmlstr.
normal termination
consistent state
program flow
unexpected
behavior
system state
normal termination
consistent state
program flow
unexpected
: assertion
behavior
system state
system state
runtime
error
normal termination
normal termination
consistent state consistent state
: assertion
system state
system state
undetected
error
runtime
normal termination
normal termination
error
ASSERT - Statement:
ASSERT ID group
SUBKEY subkey
FIELDS dobj1 dobj2 ...
CONDITION log_exp.
BREAK-POINT - Statement:
BREAK-POINT ID group.
LOG-POINT - Statement:
LOG-POINT ID group.
Activation method
dynamic, while system is running
Activation granularity
Logical „checkpoint groups“
Compose „variants“ from
Checkpoint groups, variants,
All checkpoints in programs, function groups, classes
Extract checkpoint groups from programs, function groups,
classes, packages, development components
User, server
Assertion mechanism
Abort, debug or protocol
Collapse/Expand Block
Collapse Comments
User defined
“Outlining Regions”
Expandable by Ctrl +
Enter
Interactive tags
Surround by template
Code Hints
Suggest valid
keywords
and recently used
identifiers
Runs automatically as
you type
For templates
shortcuts
Customizing of
suggestions
Clipboard Ring
Multiple Clipboard
Formats:
Paste in MS Outlook
with syntax
highlighting
Paste in MS Word with
syntax highlighting
Copy/Cut Append to
clipboard
Insert Special
See mismatching
brackets highlighted in
error color
Incremental search
History of search/replace
items
Saving of search
parameters between
sessions
Block Selection
Mistyping Correction
Auto Brackets
Keyword Case correction
Auto Indent
Caps Lock correction
Smart Tab
Surround Selection
Format After Paste
Line operations
Sort Lines
Change Case
Indent/Unindent
AutoSave
…
© SAP AG 2006, SAP TechEd ’06 / CD200 / 64
Editor Features - Quick Info in ABAP Debugger
Customizing of
quick info
Classic Debugger
Technology
Debugger and debuggee run in the same (internal) session
Debugger dynpros placed “in-between”
Consequences
Not all ABAP code can be debugged (no conversion / field exits)
Not free of side effects (F1, F4 help, list output)
Implementation of new features not always straight-forward
No chance to use modern UI techniques (no ABAP allowed in the debugger !)
ABAP VM
Debugger Engine
/h
UI
11
Process
Process Informations
Informations
22
Control
Control Area
Area 33
Source
Source Code
Code Informations,
Informations,
System
System Fields
Fields
44
Desktops
Desktops
55
Tools
Tools
Enlarge
Enlarge Size
Size 1.
1. Close
Close Tool
Tool
Reduce
Reduce Size
Size 2.
2. New
New Tool
Tool
3.
3. Replace
Replace Tool
Tool
4.
4. Full
Full Screen
Screen
5.
5. Maximize
Maximize Horizontally
Horizontally
6.
6. Exchange
Exchange
7.
7. Services
Services of
of the
the Tool
Tool
What is an Unit?
An unit can be considered as a non-trivial, accessible code portion
(method, function or form) where a given input or action causes a verifiable
effect. Ideally it is the smallest code part which can be tested in isolation.
PROGRAM z_abap_unit.
T1 T2 T3 T4 T1
In ABAP Debugger
TopN-Consumer-Lists
– Aggregation of types (class/data)
– Find References
Memory consumption overview
In Stand-Alone TA
Analyzing memory snapshots
Comparing memory snapshots
– Growth of memory objects in different views
Ways of adaptation:
Customizing
Enhancement new concept!
Modification
Application
User Business
Exits Transaction
Events
Form
Industries
routines
Workbench
Filters
Classes
Business
Add Ins
Function
modules
Customer Kernel based
Exits Business
Add Ins
Kernel
Application Development
Enhancement 1 Enhancement 2
Add On Development
Enhancement 11 Enhancement 12 Enhancement 01
Customer Development
Enhancement 001
Organization of Enhancements
Integrated in Object Navigator (SE80)
Tab Properties & Objects common for all enhancement types
Tab 3 dependent on enhancement technology: e.g. BAdI-
Implementation or Source Code Enhancements
© SAP AG 2006, SAP TechEd ’06 / CD200 / 88
Enhancement Browser (Original and Follow-up System)
ENHANCEMENT 1.
PROGRAM p1. WRITE ’Hello
Paris’.
WRITE ‘Hello World’. ENDENHANCEMENT.
ENHANCEMENT 2.
ENHANCEMENT-POINT ep1 SPOTS WRITE ’Hello
s1. London’.
ENDENHANCEMENT.
..
..
..
ENHANCEMENT 3.
ENHANCEMENT-SECTION ep2 WRITE ’Enhanced’.
SPOTS s1. ENDENHANCEMENT.
WRITE ’Original’.
END-ENHANCEMENT-SECTION.
flt-lang = `D`.
CALL METHOD bd->method
EXPORTING
x = 10
flt_val = flt.
badi_name
bd
Cl_imp1 Cl_imp2
© SAP AG 2006, SAP TechEd ’06 / CD200 / 97
Regular Expressions
Shared Objects
Simple Transformations
Checkpoints
ABAP Editor
ABAP Debugger
ABAP Unit
Memory Inspector
Enhancement Framework
Preview of Next Release
Disclaimer
As of next Release:
You can use computational expressions, functional methods and
built-in functions in expression positions:
– Logical expressions: a + b < oref->meth( )
– Method call parameters: oref1->meth1( oref2->meth2( ... ) )
As of next Release:
New data types for decimal floating point numbers (based on IEEE-
754r):
– decfloat16: 8 bytes, 16 digits, exponent -383 to +384
– decfloat34: 16 bytes, 34 digits, exponent -6143 to +6144
Exact representation of decimal numbers within range (no rounding
necessary as for binary floating point numbers of type f).
Range larger than f!
Calculation accuracy like p!
Supported by new generic type decfloat, new Dictionary types,
new rounding functions round and rescale, new methods in
CL_ABAP_MATH, and new format options in WRITE [TO].
As of next Release:
Dynamic WHERE condition:
– LOOP At itab ... WHERE (cond_syntax) ...
Secondary keys for internal tables:
– Secondary key definition:
TYPES itab TYPE ... TABLE OF ...
WITH {UNIQUE HASHED}|{{UNIQUE|NON_UNIQUE} SORTED}
KEY keynamei COMPONENTS comp1 comp2 ...
– Key specification for key access:
... WITH [TABLE] KEY keynamei COMPONENTS ...
– Key specification for index access:
... USING KEY keynamei ...
Boosting internal table performance
Real key access to standard tables
Index access to hashed tables
As of next Release:
Resumable exceptions:
– Raising a resumable exception
RAISE RESUMABLE EXCEPTION TYPE cx_class.
– Resuming (continue processing behind RAISE):
TRY.
...
CATCH cx_class BEFORE UNWIND.
...
RESUME.
ENDTRY.
Retry:
– Retrying (continue processing behind TRY):
TRY.
...
CATCH cx_class.
...
RETRY.
ENDTRY.
As of next Release:
Role of Packages:
– Packages encapsulate repository objects
– Reusable components must be published in package interfaces
Operational Package Concept:
– A "server package" has to expose everything that is meant for public
usage in an interface.
– A "client package" has to be allowed to use that interface.
– A "client package" has to declare the usage of that interface.
– Package checking is integrated into the ABAP compiler and ABAP
runtime and package violations are treated as ‘first order errors’.
Enhancement of ABAP Objects:
– CLASS cls DEFINITION OPEN WITHIN PACKAGE
– PACKAGE SECTION
As of next Release:
Code Completion:
– Suggests valid
keywords and
valid identifiers
– Invoked explicitly
by pressing special
key combination
– Autofilters result
by typed prefix
Entities completed include …
– Variables, including structures and components
– Types (including ABAP Dictionary), classes
– Methods, attributes, constants, events
– Functions
– Subroutines
– Formal parameters and exceptions of methods, functions, and subroutines
– Database tables
– Keywords
Completion suggestions may be inserted …
– Verbatim as shown
– As pattern with parameters prefilled
(CALL METHOD, CALL FUNCTION, PERFORM, …)
As of next Release:
Refactoring of ABAP programs:
– Renaming of local & global elements
– Code Extraction (convert marked code into procedure)
– Deletion of superflous declarations
– Create GET/SET-methods ...
As of next Release:
Source code based editing of global classes:
As of next Release:
New Dynpro analysis tool
New Web Dynpro analysis tool
Simple Transformation Debugging
Automated Debugging: Debugger Scripting
Layer Debugging
– Define your active software
- Packages
- Free-style expressions
– Dynamically assign your „system code“
– Layer-step through code
Miscellaneous:
– Upload of Internal Tables
– Table View: view and configure sub-components of embedded structures
– Changing long fields
– Call Stack of the internal session of the caller
As of next Release:
Code Coverage
measured on statement
level
Condition Coverage for
logical expressions
Coverage of empty
branches
Statement results
visualized using new
ABAP Edit Control
Integrated to ABAP
Unit
As of next Release:
Controls based UI
(like ABAP Debugger)
Multiple Tools on
Customizable
Desktops
More flexible and
powerful Analysis
Tools
Trace Data stored on
Database (Server and
Platform independant)
Cross
System/Release Trace
Comparison
As of next Release:
directly
tRFC
bgRFC
Sequencing:
Processed by Type “T” or Type “Q”
Scheduler Serialization:
RFC Protocol
qRFC
LDQ
No-Send Sequencing:
Scenario Type “Q”
Serialization:
XML or binary
As of next Release:
Optimized alternatives for tRFC, qRFC, and qRFC No-Send:
bgRFC (Background RFC)
– CALL FUNCTION IN BACKGROUND UNIT oref (TYPE REF TO IF_BGRFC_UNIT)
– Remote Function Calls are recorded, and execution takes place at a later point in
time, which is controlled automatically by a scheduler process.
– The execution scales with O(n*log(n)), i.e. linear-logarithmic, which is determined
by the I/O system only.
– The inbound procedure is executed at the caller system and serves for load-
balancing purposes.
– The outbound procedure is executed at the receiver system and serves for de-
coupled, remote system environments with load-balancing at the receiver.
LDQ (Local Data Queue)
– Persistency layer to provide first-in first-out (queue) access to data.
– Receiver actively pulls data from such a queue, similar to a mailbox.
– Access is locally within one SAP system.
– The data model of LDQ is absolutely de-coupled from any RFC database tables.
As of next Release:
RFC Communication
– Binary asXML serialization replaces the different RFC serialization concepts, e.g.
“xRFC”.
- Available for ABAP Application Server, Java Application Server, and
SAP NetWeaver RFC SDK
– SAP NetWeaver RFC SDK replaces the classic RFC SDKs for ASCII and Unicode.
- Homogeneous handling of all RFC parameter types.
- Compatible with all backend system variants R/3, mySAP, …
- Classic RFC SDKs are still maintained.
Thank You !
Public Web
www.sap.com
SAP Developer Network:
http://www.sdn.sap.com/sdn/developerareas/abap.sdn
SAP Help Portal: http://www.help.sap.com
ABAP Keyword-Documentation
Transaction ABAPHELP, always the first source of information
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 purpose
without the express prior written permission of SAP AG.
This document is a preliminary version and not subject to your license agreement or any other agreement with SAP. This document contains only intended
strategies, developments, and functionalities of the SAP® product and is not intended to be binding upon SAP to any particular course of business, product
strategy, and/or development. Please note that this document is subject to change and may be changed by SAP at any time without notice.
SAP assumes no responsibility for errors or omissions in this document. SAP does not warrant the accuracy or completeness of the information, text, graphics,
links, or other items contained within this material. This document is provided without a warranty of any kind, either express or implied, including but not limited
to the implied warranties of merchantability, fitness for a particular purpose, or non-infringement.
SAP shall have no liability for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use
of these materials. This limitation shall not apply in cases of intent or gross negligence.
The statutory liability for personal injury and defective products is not affected. SAP has no control over the information that you may access through the use
of 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-party
Web pages.