Top Banner
ABAP Runtime Tools Thomas Jung Peter McNulty SAP Netweaver Product Management, SAP Labs, LLC.
56
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: ABAP Runtime Tools

ABAP Runtime Tools

Thomas JungPeter McNulty

SAP Netweaver Product Management, SAP Labs, LLC.

Page 2: ABAP Runtime Tools

MotivationDebuggingCheckpointsMemory InspectorXML Processing / XSLT Transformations with ABAP

Page 3: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 3

Positioning: IT Practices and IT Scenarios

SAP NetWeaver™

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 INTEGRATIONIntegration Broker

BusinessProcess Mgmt

APPLICATION PLATFORM

J2EE

DB and OS Abstraction

ABAP

Life Cycle M

gmt

IT practices “slice” SAP NetWeaver to directly address key issues ... and help enterprises find the right starting point

Use

r Pro

duct

ivity

Ena

blem

ent

Dat

a U

nific

atio

n

Bus

ines

s In

form

atio

n M

anag

emen

t

Bus

ines

s Ev

ent M

anag

emen

t

End-

to-E

nd P

roce

ss In

tegr

atio

n

Cus

tom

Dev

elop

men

t

Uni

fied

Life

-Cyc

le M

anag

emen

t

App

licat

ion

gove

rnan

ce a

nd S

ecur

ity

Con

solid

atio

n

Ente

rpris

e Se

rvic

e A

rchi

tect

ure

Different capabilities used jointly in each “slice”

Page 4: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 4

Positioning: SAP NetWeaver Technology Map

User Productivity Enablement

Running an Enterprise Portal

Enabling User Collboration

Business Task Management

Mobilizing Business Processes

Enterprise Knowledge Management

Data Unification Master-Data Harmonization Master-Data Consolidation Central Master-Data Management Enterprise Data Warehousing

Business Information Management

Enterprise Reporting, Query, and Analysis

Business Planning and Analytical Services Enterprise Data Warehousing

Business Event Management Business Event Resolution Business Task Management

End-to-End Process Integration

Enabling Application-to-Application Processes

Enabling Business-to-Business Processes

Business Process Management

Enabling Platform Interoperability

Business Task Management

Custom Development Developing, Configuring, and Adapting Applications Enabling Platform Interoperability

Unified Life-Cycle Management Software Life-Cycle Management SAP NetWeaver Operations

Application Governance & Security Authentication and Single Sign-On Integrated User and Access Management

Consolidation Enabling Platform Interoperability SAP NetWeaver Operations Master-Data Consolidation Enterprise Knowledge

Management

Enterprise Service Architecture – Design & Deployment

Enabling Enterprise Services

IT Practices IT Scenarios

Page 5: ABAP Runtime Tools

MotivationDebuggingCheckpointsMemory InspectorXML Processing / XSLT Transformations with ABAP

Page 6: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 6

The Power of ABAP

Historically one of the most powerful aspects of the ABAP environment are the runtime tools

The tools are well integrated into the design time environment

They are easy to access and activate even in a Production system without disruption to the rest of the system

They provide great visibility to all components of even the most complex application

Page 7: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 7

New ABAP Debugger Benefits

Two Process Debugger

New Debugger Screen LayoutProvides better usability through more power screen elements

Modular and Customizable DesktopsMultiple tools on screen at once. The ability to switch to the right tool for the right kind of debugging

Future Plug-insThe flexibility for SAP to develop and easily integrate new tools into the debugger going forward

Page 8: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 8

New ABAP Debugger Benefits

Demo

Page 9: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 9

New ABAP Debugger – The Future

Debugger Scripting

Axis Title Here

Page 10: ABAP Runtime Tools

MotivationDebuggingCheckpointsMemory InspectorXML Processing / XSLT Transformations with ABAP

Page 11: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 11

Checkpoints

In order to facilitate the development, test and maintenance of applications ABAP features a new statement ASSERT and a new variant of the BREAK-POINT.

Page 12: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 12

Checkpoint Classification

always active

unconditional

BREAK-POINT.

conditional

ASSERT <log_expr>.

ASSERT ID <group>CONDITION <log_expr>.activatable BREAK-POINT ID <grp>.

Page 13: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 13

Assertion

Definition:

Program language construct which allows to verify correct state by explicit declaration of assumptions

ASSERT <log_expr>.ASSERT <log_expr>.

An assertion is a boolean-typed expression which, if false, indicates an error.

Page 14: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 14

Assertion Failure

An assertion is violated if the expression <log_expr> does not evaluate to true when processing the ASSERT statement.

Violating an (always active) assertion terminates the program with runtime error ASSERTION_FAILED.

Page 15: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 15

Benefits of Assertionssy

stem

sta

te

program flow

consistent state

norm

al te

rmin

atio

n

Page 16: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 16

Benefits of Assertionssy

stem

sta

te

program flow

consistent state

norm

al te

rmin

atio

n

unexpected behavior

Page 17: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 17

Benefits of Assertionssy

stem

sta

te

program flow

consistent state

norm

al te

rmin

atio

n

unexpected behavior

syst

em s

tate

program flow

consistent state

norm

al te

rmin

atio

n

Page 18: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 18

Benefits of Assertionssy

stem

sta

te

program flow

consistent state

norm

al te

rmin

atio

n

unexpected behavior

syst

em s

tate

program flow

consistent state

norm

al te

rmin

atio

n

: assertion

runtime error

Execution is terminated as soon as incorrect state is detected.

Ensure program correctness

Page 19: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 19

Checkpoints

Demo

Page 20: ABAP Runtime Tools

MotivationDebuggingCheckpointsMemory InspectorXML Processing / XSLT Transformations with ABAP

Page 21: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 21

Motivation for the Memory Inspector

Short-lived online SAP transactions, i.e. short-lived internal modes.

Long-lived online transactions (e.g. CRM: cic0, SEM-BCS: ucmon), i.e. long-lived internal modes.

Different kinds of transactions

Former Present

T1 T2 T1T3 T4 cic0

A1 A2 A3 A4

Internal modeLegend:

Memory leaks will not take effect as all memory is freed during deletion of an internal mode.

Memory leaks will take effect by summing up as the internal mode will not be deleted.

Page 22: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 22

Memory Problems

Objects that are pseudo-garbage, i.e. an application still holds references to objects that are no longer needed.Anonymous data objects that are pseudo-garbage.

Memory leaks

Former PresentUnintended growth of internal tables.Unintended long-lived internal tables.

Unintended growth of internal tables.Unintended long-lived internal tables.Unintended growth of strings.Unintended long-lived strings.

Page 23: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 23

Memory Inspector

Demo

Page 24: ABAP Runtime Tools

MotivationDebuggingCheckpointsMemory InspectorXML Processing / XSLT Transformations with ABAP

Page 25: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 25

XML in General (3)

Using XML

Problems solvedstandard syntaxstandard toolscan model almost anything

Problems gainedperformance drainno semanticsunclear relationship with data structures (data conversion)schema inflation

– "Business ML" by standards body X– "Business ML" by vendor Y– Proprietary format by application Z

need fortransformations

Page 26: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 26

XSLT in General (1)

Tree transformations with XSLT

(a) XML tree to XML tree (data-centric)(b) XML tree to text (document-centric)

XML Tree

...... ...

......

......

Text

(b)

XML Tree

(a)

XSLT

Page 27: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 27

XSLT in General (2)

XSLT* is ...

a high-level tree-transformation languagewith XML syntaxdeclarative

no "state"

rule-basedpattern matching against source tree

functionalsource tree navigation by XPath expressions

compositionalresult tree construction by XSLT instructions mixed withliteral XML fragments

"the SQL of the Web"

* "Extensible Stylesheet Language / Transformations"

Page 28: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 28

XML in ABAP: XSLT Development

Workbench integration

SE80: Edit object → More... → XSLT program

object tree, context menu: Create → More... → XSLT program

direct: transaction XSLT_TOOL

testing: transaction XSLT

programs must be activated before use

check / activate triggers compilation

maintenance API: function XSLT_MAINTENANCE

Page 29: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 29

XML in ABAP: Invocation of XSLT

ABAP statement CALL TRANSFORMATION

TRY.CALL TRANSFORMATION my_trans

or (my_trans_name)

PARAMETERS p_1 = my_par_1 ... p_n = my_par_nor (my_par_table)

SOURCE XML my_xml_source

RESULT XML my_xml_result.

CATCH cx_xslt_runtime_error INTO exc....

ENDTRY.

static or dynamic call of XSLT program

program parameters

XML source: (x)string or tableor REF TO IF_IXML_ISTREAM

or REF TO IF_IXML_NODE

XML result: (x)string or tableor REF TO IF_IXML_OSTREAM

or REF TO IF_IXML_DOCUMENT

runtime errors throw exceptions

Page 30: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 30

XML ABAP: Structure Mapping

The structure mapping problem

outsideinside ABAP functionality

ABAP applications

externalapplications

ABAP data structure

external XML format

XML-based communicationstructure difference

Page 31: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 31

XML ABAP: Approaches

Which side is driving?

inside-out approach

outside-in approach

symmetric approach (6.20)canonical XML encoding of data structures+transformation with XSLT

symmetric approach (6.40)dedicated XML / data transformation languageno conceptual "canonical encoding" indirection

Page 32: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 32

XML ABAP: Inside-out

The inside-out approach

ABAP functionality

ABAP data structure1

outsideinside

external XML format3

external mapping (XSLT...)

canonical XML encoding2

XML handler6.20 kernel

Page 33: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 33

generated

[ generated ]

6.20 kernel

XML ABAP: Outside-in

The outside-in approach ("data binding")

ABAP functionality

ABAP data structure1b

outsideinside

external XML format1a

ABAP adapter3

XML handlerABAP proxy

ABAP proxy interface2

Page 34: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 34

XML ABAP: Symmetric

The symmetric approach (6.20)outsideinside

ABAP functionality

ABAP data structure1

external XML format1

2

MappingEngine

(6.20 Kernel) XSLT programsXSLT

Page 35: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 35

ABAP XML with XSLT

Outbound XML

transform DOM to

outbound XML

XSLT(outbound)

construct canonical DOM for data tree

XML

ABAP

Page 36: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 36

XML ABAP with XSLT

Inbound XML

transform DOM to

data tree (directly)

XML

conceptual:transform

to canonicalXML tree

XSLT(inbound)

ABAP

parse inbound

XML to DOM

Page 37: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 37

XML ABAP with XSLT: Advantages

Advantages of the XSLT solution

no restrictionsarbitrary XML schemasarbitrary data & object types

– graphs of objects

arbitrarily complex structural transformations

no redundancyno generation of schemas from types (schema inflation)no generation of types from schemas (type inflation)each side retains its structures

high abstraction levelno low-level XML handling in applicationsseparate, expressive transformation language

Page 38: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 38

XML ABAP: Invocation of XSLT

SerializationCALL TRANSFORMATION ...

PARAMETERS ...OPTIONS option_1 = string ... option_n = stringSOURCE XP_1 = my_var_1 ... XP_n = my_var_n

or (my_var_table)RESULT XML my_xml_result.

CALL TRANSFORMATION ...PARAMETERS ...OPTIONS option_1 = string ... option_n = stringSOURCE XML my_xml_sourceRESULT XP_1 = my_var_1 ... XP_n = my_var_n

or (my_var_table).

Deserializationbinding of

program variablesto symbolic XML names

Page 39: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 39

ABAP XML: Invocation of XSLT (Example)

ABAP fragmentDATA num TYPE P LENGTH 5 DECIMALS 2.DATA txt TYPE STRING.num = '1.23-'.txt = 'Yes, 2 < 3'. CALL TRANSFORMATION id

SOURCE Foo = num bar = txtRESULT XML my_xml_result.

XML result fragment

...<FOO>-1.23</FOO><BAR>Yes, 2 &lt; 3</BAR>...

symbolic names are normalized to uppercase

format depends on corresponding ABAP variable

identity transformation

Page 40: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 40

XML ABAP: Invocation of XSLT (Example)

ABAP fragmentDATA num TYPE P LENGTH 5 DECIMALS 2.DATA txt TYPE STRING.CALL TRANSFORMATION id

SOURCE XML my_xml_sourceRESULT Foo = num bar = txt.

WRITE: / num, / txt.

XML source fragment

...<FOO> -1.23 </FOO><BAR>Yes, 2 &lt; 3</BAR>...

insignificant whitespace

ABAP type determines expected XML content

1.23-Yes, 2 < 3

Page 41: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 41

asXML Format: Structures

StructuresDATA miles TYPE person.miles-name = 'Miles Davis'.miles-born = '19260526'.CALL TRANSFORMATION id

SOURCE LEGEND = milesRESULT XML my_xml_result.

...<LEGEND><NAME>Miles Davis</NAME><BORN>1926-05-26</BORN>

</LEGEND>...

DDict Structure PERSON:NAME TYPE STRINGBORN TYPE D

component names determine XML sub-element names

Page 42: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 42

asXML Format: Internal Tables

Internal TablesDATA: one TYPE person.DATA: itab TYPE STANDARD TABLE OF person.one-name = 'John Coltrane'. one-born = '19260923'. APPEND one TO itab.one-name = 'Miles Davis'. one-born = '19260526'. APPEND one TO itab.one-name = 'Charlie Parker'. one-born = '19200829'. APPEND one TO itab.

CALL TRANSFORMATION idSOURCE GREATEST = itabRESULT XML my_xml_result.

...<GREATEST>

<PERSON><NAME>John Coltrane</NAME> <BORN>1926-09-23</BORN></PERSON><PERSON><NAME>Miles Davis</NAME> <BORN>1926-05-26</BORN></PERSON><PERSON><NAME>Charlie Parker</NAME><BORN>1920-08-29</BORN></PERSON>

</GREATEST>... line type from DDict (or <item>)

Page 43: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 43

XML ABAP with XSLT: Disadvantages

Disadvantages of the XSLT solution

learning XSLToverkill for simple conversion tasksno tool support

no static type checking

asymmetric programsone for XML ABAP, one for ABAP XML

resource consumption (Time & Space)T / S : DOM construction (on source side)T : codepage conversions (internal encoding ≠ SAP CP)T : XSLT engine overhead (complex state, powerful operations)

Page 44: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 44

XML ABAP without XSLT: Requirements

Requirements for a dedicated XML/ABAP mapping engine

time: increase throughput by factor ≥ 10

space: increase / eliminate upper limit on size of data

ease of usesimple syntax & semantics, statically type-checkedtool support for creating mappingsone program for XML→ABAP and ABAP→XML

Deliberate trade-offslower expressive power (but cover 90% of typical applications)not usable for XML ↔XML

"Simple Transformations"

Page 45: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 45

random access

linear(stream reader)

linear(modulo component order)

random access (XPath)

ABAP resulttree construction

XML sourcetree navigation

linear

random access

linear

random access (XPath on canonical DOM)

XML resulttree construction

ABAP sourcetree navigation

Simple Transformations: Tree Access

Tree access in XSLT vs. Simple TransformationsSimple

TransfomationsXSLT

Deserialization

Serialization

Page 46: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 46

Simple Transformations: Expressive Power

Anything that can be done with ...accessing each node in the data treeany number of timesaccessing each node in the XML treeat most once,in document order (with "lookahead 1" on XML source)

... which includes (any combination of) ...renamings (e.g.: structure-component / element names)projections (omission of sub-trees)permutations (changes in sub-tree order)constants (e.g.: constant values, insertion of tree levels)defaults (for initial / special values)conditionals (e.g.: existence of sub-trees, value of nodes)value maps (including ABAP calls)

covers most data mappings in practice

Page 47: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 47

Simple Transformations: Key Features (1)

Programs are XML templatesliteral XML withinterspersed instructionsdeclarative, straightforward semantics

Data tree access bynode references

instructions access data by simple "path expressions"all named children of a data node are accessible by nametables are accessible as a whole (all lines or none)

<Customers tt:ref=

"CUSTOMER_LIST.+">

<LastName>

<tt:value ref=

"NAME.LAST"/>

</LastName>

</Customers>

Page 48: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 48

Simple Transformations: Key Features (2)

Programs are reversible

serialization : write (produce) tokens to stream

deserialization : match (consume) tokens from stream

invocation determines direction

if no asymmetric construct is used:

D[program] ( S[program] (data) ) = dataS[program] ( D[program] (document) ) ≈ document

(D: deserialization, S: serialization)

Page 49: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 49

Simple Transformations: Programs

<tt:transform version="1.0"

xmlns:tt="http://www.sap.com/transformation-templates">

( <tt:include name="name"/> )*

( <tt:root name="name"/> )*( typespec )*

( <tt:template [name="name"]>template content

</tt:template> )*

</tt:transform>

formal root name(s)

transformation template(s)

Page 50: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 50

ST Constructs: Loop

Loop

S loop over table

D construct table

<tt:loop

[ref="ref"][name="name"] />

inside loop, the current ref-node R is set to each table line in turn

Page 51: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 51

ST Constructs: Value

Value

S ref-node value to XML

D XML value to ref-node

<tt:value

[ref="ref"][map="mapping-list"] />

examplecopy value from/to X,with special mappings: S map {∗, +, –} to ~D map ~ to ∗

<tt:value

ref="X"

map="val('*‘) = xml(‘~'),

val(‘+',‘-') > xml(‘~’)"

/>

Page 52: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 52

ST Constructs: Literal Text

Literal text

S write literal text

D match literal text

<tt:text>text</tt:text>

example <Time>

<tt:value ref="TIME"/>

<tt:text>CET</tt:text>

</Time>

text

Page 53: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 53

ST Constructs: Basic Conditional

Basic ConditionalS if precondition, assertion,

and check is true:evaluate pattern content

D if precondition is true and pattern matches:evaluate template content,establish assertionsand evaluate checks (might fail)

preconditions check whether variables exist or have a specific type:exist(ref), type-D(ref)

assertions are conditions which can be “established”:initial(ref), ref = 50

checks are usual boolean checks

<tt:cond[using=“precondition"][data=“assertion"][check=“check"][s-check=“check"][d-check=“check"]

>pattern content

</tt:cond>

Page 54: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 54

ST Constructs: Composite Conditional

Switch

S evaluate first case with true condition

D evaluate first case with matching pattern

<tt:switch>

cases</tt:switch>

<tt:group>

cases</tt:group>

Group

S evaluate all cases with true condition

D evaluate all cases with matching pattern

Page 55: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 55

Summary

XML in ABAP

basic tools available: parser, renderer, DOM (4.6D)

... but there are better ways if the subject is actually ...

XML from/to ABAP

XML: often the foundation for open system integrationstructure difference inside/outside must be bridged

XSLT-based solution (6.20)complex structural transformations, limited throughput

Simple Transformations (6.40)high throughput, structurally simple conversionsplain template language, tool support

Page 56: ABAP Runtime Tools

© SAP Labs, LLC. 2006, ABAP Runtime Tools / Thomas Jung and Peter McNulty / 56

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 information contained herein may be changed without prior notice.Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, and Informix are trademarks or registered trademarks of IBM Corporation.Oracle is a registered trademark of Oracle Corporation.UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc.HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc.JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden.SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

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.

Copyright 2006 SAP AG. All Rights Reserved