Top Banner
5/28/2018 Comp268-slidepdf.com http://slidepdf.com/reader/full/comp-268 1/55 COMP268 ABAP and XML Stefan Bresch, NW F ABAP Thomas Ritter, NW F ABAP Christoph Wedler, NW F ABAP
55
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
  • 5/28/2018 Comp 268

    1/55

    COMP268

    ABAP and XML

    Stefan Bresch, NW F ABAPThomas Ritter, NW F ABAP

    Christoph Wedler, NW F ABAP

  • 5/28/2018 Comp 268

    2/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 2

    Disclaimer

    This presentation outlines our general product direction and should not be

    relied on in making a purchase decision. This presentation is not subject to

    your license agreement or any other agreement with SAP. SAP has no

    obligation to pursue any course of business outlined in this presentation or to

    develop or release any functionality mentioned in this presentation. This

    presentation and SAP's strategy and possible future developments are

    subject to change and may be changed by SAP at any time for any reasonwithout notice. 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

    assumes no responsibility for errors or omissions in this document, except if

    such damages were caused by SAP intentionally or grossly negligent.

  • 5/28/2018 Comp 268

    3/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 3

    1. XML Overview

    2. XML Processing in ABAP

    3. ABAP XML Data Serialization

    4. ABAP XML Mapping with ST and XSLT

    5. Summary

    Agenda

  • 5/28/2018 Comp 268

    4/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 4

    XML from a Programmers Perspective

    From a programmers perspective, XMLis ...

    a generic data model(XML Infoset) for trees

    ordered, structured nodes (elements)

    unordered, unstructured nodes (attributes)

    a generic syntax(markup) for representation of trees

    the basis for an open set of standards and toolsparsing: texttree; rendering: treetext

    typing, validating: XML Schema

    querying, transforming: XPath, XSLT

    a generic data structure conceptfor programming languages

    primitive: DOM, SAX

    data binding: JAXB

    For all kinds of processing

    except input/output, XMLdocuments should be thought

    of in terms of the data model,

    not in terms of their textual

    representation. I.e., trees of

    nodes, not sequences of tags.

  • 5/28/2018 Comp 268

    5/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 5

    Transforming XML with XSLT

    XSLT(extensible stylesheet language / transformations)is ...

    a high level tree transformation language with XML syntax

    declarative: no "state"

    rule-based: pattern matching against source tree

    functional: source navigation by XPathexpressions

    compositional: result tree construction by XSLT instructionsmixed with literalXML

    "the SQL of the web"

    XSLT

  • 5/28/2018 Comp 268

    6/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 6

    1. XML Overview

    2. XML Processing in ABAP

    3. ABAP XML Data Serialization

    4. ABAP XML Mapping with ST and XSLT

    5. Summary

    Agenda

  • 5/28/2018 Comp 268

    7/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 7

    iXML Package

    The iXML packages (since 4.6D): features

    general XML parser/renderer

    implemented in kernel (C++)

    encapsulated in ABAP proxy classes (package SIXML)

    interfaces IF_IXML_PARSER, IF_IXML_NODE, etc.

    main factory class CL_IXMLDOM (Document Object Model)

    superset of DOM level 1 (incl. XML namespaces)

    DTD validation (since 6.10)

    event-based parser (~SAX)

    codepage support; implemenation based on UCS2/UCS4

    examples program in package SIXML_TEST(examples shown here:T_PARSING_DOM, T_DOM_ITERATOR, T_PARSING_EVENT)

  • 5/28/2018 Comp 268

    8/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 8

    iXML Package: XML Parser Example

    Example: Create an iXML parser instance

    create an input stream for the XML document xmlusing the stream factory

    create a document and a parser for the document and input stream

    DATA ixml TYPE REF TO if_ixml.DATA streamfactory TYPE REF TO if_ixml_stream_factory.DATA istream TYPE REF TO if_ixml_istream.

    DATA document TYPE REF TO if_ixml_document.DATA parser TYPE REF TO if_ixml_parser.

    ixml = cl_ixml=>create( ).streamfactory = ixml->create_stream_factory( ).istream = streamfactory->create_istream_xstring( string = xml).

    document = ixml->create_document( ).parser = ixml->create_parser( document = documentstream_factory = stream_factoryistream = istream ).

  • 5/28/2018 Comp 268

    9/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 9

    iXML Package: DOM Iterator

    DATA iterator TYPE REF TO if_ixml_node_iterator.DATA node TYPE REF TO if_ixml_node.DATA name TYPE STRING.

    parser->parse( ).node = document.iterator = node->create_iterator( ).node = iterator->get_next( ).WHILE node IS NOT INITIAL.

    node = iterator->get_next( ).CASE node->get_type( ).WHEN if_ixml_node=>co_node_element.

    name = node->get_name( )....

    ENDCASE.node = iterator->get_next( ).

    ENDWHILE.

    Example: Iterate over the DOM

    invoke the iXML parser and create an iterator

    get the next node from the iterator in a loop until there is no more node

  • 5/28/2018 Comp 268

    10/55 SAP 2008 / SAP TechEd 08 / COMP268 Page 10

    iXML Package: Event Parser

    DATA event TYPE REF TO if_ixml_event.DATA node TYPE REF TO if_ixml_node.DATA name TYPE STRING.

    parser->set_event_subscription( if_ixml_event=>co_event_element_pre ).event = parser->parse_event( ).WHILE event IS NOT INITIAL.

    node ?= event->get_node( ).CASE event->get_type( ).WHEN if_ixml_event=>co_event_element_pre.

    name = node->get_name( )....

    ENDCASE.event =parser->parse_event( ).

    ENDWHILE.

    Example: Listen to the event parser

    subscribe to the events you are interested in

    get the next event in a loop until there is no more event

  • 5/28/2018 Comp 268

    11/55 SAP 2008 / SAP TechEd 08 / COMP268 Page 11

    SXML Package

    The SXML packages (since 7.0): features

    streaming XML reader(parser) and writer(renderer)

    implemented in kernel (C)

    encapsulated in ABAP proxy classes

    interfaces IF_SXML_READER, IF_SXML_WRITER, etc.

    factories CL_SXML_STRING_READER, CL_SXML_STRING_WRITER, etc. token-based reader (pull principle)

    additional high level interface (based on IF_SXML_NODEinterface)

    codepage support; optimized for utf-8 (default codepage for XML)

    optimized binary XML protocol (automatic detection in reader, writer can be

    configured by factory method parameter TYPE = IF_SXML=>CO_XT_BINARY) streaming from/to dataset with CL_SXML_DATASET_READER,

    CL_SXML_DATASET_WRITER(since 7.1)

    reader and writer interoperable by reader method SKIP_NODE and writer methodWRITE_NODE

  • 5/28/2018 Comp 268

    12/55 SAP 2008 / SAP TechEd 08 / COMP268 Page 12

    SXML Package: XML Reader (token-based)

    DATA reader TYPE REF TO if_sxml_reader.

    DATA name TYPE STRING.

    reader = cl_sxml_string_reader=>create( input = xml).

    reader->next_node( ).

    WHILE reader->node_type if_sxml_node=>co_nt_final.

    CASE reader->node_type.

    WHEN if_sxml_node=>co_nt_element_open.

    name = reader->name....

    ENDCASE.

    reader->next_node( ).

    ENDWHILE.

    Example: Parse an XML document using the token-based interface

    create a reader instance for the XML document xml loop until the final state is reached

    the current node type, name and/or value are stored in the reader interface attributes

  • 5/28/2018 Comp 268

    13/55 SAP 2008 / SAP TechEd 08 / COMP268 Page 13

    SXML Package: XML Reader (node-based)

    DATA reader TYPE REF TO if_sxml_reader.

    DATA node TYPE REF TO if_sxml_node.

    DATA open_element TYPE REF TO if_sxml_open_element.

    DATA name TYPE STRING.

    reader = cl_sxml_string_reader=>create( input = xml ).

    node = reader->read_next_node( ).

    WHILE node->type if_sxml_node=>co_nt_final.

    CASE node->type.

    WHEN if_sxml_node=>co_nt_element_open.open_element ?= node.

    name = open_element->qname-name.

    ...

    ENDCASE.

    node = reader->read_next_node( ).

    ENDWHILE.

    Example: Parse an XML document using the node-based interface

    create an reader instance for the XML document xml read next node until the final state is reached

  • 5/28/2018 Comp 268

    14/55 SAP 2008 / SAP TechEd 08 / COMP268 Page 14

    EXERCISE 1

  • 5/28/2018 Comp 268

    15/55 SAP 2008 / SAP TechEd 08 / COMP268 Page 15

    XSLT Processor

    The SAP XSLT processor (since 6.10): features

    performance, implemented in kernel (C++)

    interoperable with iXML package

    standard conformance (XSLT 1.0)

    virtual machine: compilation to byte code, storage in database, and interpretation in

    kernel integrated in ABAP language and ABAP Workbench

    ABAP method call

    XML result: (X)STRINGor tableor REF TO IF_IXML_OSTREAM

    or

    REF TO IF_IXML_DOCUMENT

    XML source: (X)STRING or tableor REF TO IF_IXML_ISTREAMor REF TO IF_IXML_NODE

    CALL TRANSFORMATION my_xsltPARAMETERS p1 = my1 ... pn = myn

    SOURCE XML my_sourceRESULT XML my_result.

  • 5/28/2018 Comp 268

    16/55 SAP 2008 / SAP TechEd 08 / COMP268 Page 16

    1. XML Overview

    2. XML Processing in ABAP

    3. ABAP XML Data Serialization

    4. ABAP XML Mapping with ST and XSLT

    5. Summary

    Agenda

  • 5/28/2018 Comp 268

    17/55 SAP 2008 / SAP TechEd 08 / COMP268 Page 17

    ABAP XML Data Serialization

    Serializing ABAP data to XML ...

    ... for XML-based communication

    example: basXML

    ... for XML-based persistence

    example: TREX

    The canonical representation of ABAP data in XML is called asXML (ABAP

    serialized XML)

    ABAP data structure canonical representation /

    asXML

    serialization

    de-serialization

  • 5/28/2018 Comp 268

    18/55 SAP 2008 / SAP TechEd 08 / COMP268 Page 18

    DEMO

  • 5/28/2018 Comp 268

    19/55 SAP 2008 / SAP TechEd 08 / COMP268 Page 19

    ABAP XML Data Serialization

    The asXML representation is generated with the identity transformation ID.

    CALL TRANSFORMATION ID

    SOURCEp1= my_p1 ...pn= my_pn

    RESULT XML xml.

    Serialization: Type of ABAP sourcevariables determines generated asXML

    representation.

    CALL TRANSFORMATION ID

    SOURCE XML xml

    RESULTp1= my_p1 ...pn= my_pn.

    De-serialization: Type of ABAP result

    variables determines required asXML

    representation.

    ...

    ...

    ...

    XML source: (X)STRING or tableor REF TO IF_SXML_READERor REF TO CL_FX_READER

    XML result: (X)STRINGor tableor REF TO IF_SXML_WRITERor REF TO CL_FX_WRITER

    uppercase!

  • 5/28/2018 Comp 268

    20/55 SAP 2008 / SAP TechEd 08 / COMP268 Page 20

    asXML: Values

    DATA my_time type T.

    my_time = '151659'.

    CALL TRANSFORMATION ID

    SOURCE time= my_time

    RESULT xml xml.

    15:16:59

    ABAP type/domain XML schema type Format/can. rep.

    C,STRING xsd:string Hello

    N xsd:string([0-9]+)

    0123

    I xsd:int -123

    P xsd:decimal -1.23

    F xsd:double -1.23E-2

    D xsd:date* 2008-09-10

    T xsd:time* 08:59:17

    X,XSTRING xsd:base64Binary RWeJwq==

    DECFLOAT16,DECFLOAT34

    xsd:precisionDecimal

    -1.2300

    XSDBOOLEAN** xsd:boolean true,false

    XSDLANGUAGE** xsd:language enXSDDATETIME_Z** xsd:dateTime 2008-09-10T08:59:17Z

    XSDUUID_RAW**XSDUUID_CHAR**

    001a4b50-534a-1ddc-95f8-7f56747c4990

    XSDDATE_D** xsd:date 2008-09-10

    XSDTIME_T** xsd:time 08:59:17

    XSDANY** xsd:any ...mixed content ...*without consistency check, all content allowed ** since 7.0

  • 5/28/2018 Comp 268

    21/55 SAP 2008 / SAP TechEd 08 / COMP268 Page 21

    asXML: Structures

    DATA my_time TYPE ty_time.

    my_time-tzone = 'CET'.

    my_time-time = '151659'.

    CALL TRANSFORMATION ID

    SOURCE time= my-time

    RESULT XML xml.

    CET

    15:16:59

    TYPES: BEGIN OF ty_time,

    tzoneTYPE c LENGTH 3,timeTYPE T,

    END OF ty_time.

    Component names determine XML

    sub element names

    All types are allowed in

    components, including structures

    and internal tables

    Additional sub elements are

    ignored in XML input, components

    without a corresponding XMLelement keep their value

    Components are serialized in the

    order in which they are defined in

    the structure. Order in input is

    insignificant; components are

    addressed by name.

  • 5/28/2018 Comp 268

    22/55 SAP 2008 / SAP TechEd 08 / COMP268 Page 22

    asXML: Tables

    DATA my_times TYPE ty_times.

    my_time-tzone = 'CET'. INSERT my_time INTO TABLE my_times.

    my_time-tzone = 'PST'. INSERT my_time INTO TABLE my_times.

    CALL TRANSFORMATION ID

    SOURCE times= my_times

    RESULT XML xml.

    CET15:16:59

    PST15:16:59

    TYPES ty_times TYPE STANDARD TABLE

    OF ty_time WITH DEFAULT KEY.

    In serialization, the table line name is itemor the ABAP dictionary type

    name if defined there. In de-serilization, the table line name is irrelevant.

  • 5/28/2018 Comp 268

    23/55 SAP 2008 / SAP TechEd 08 / COMP268 Page 23

    asXML: References

    References and Referenced Objects

    Separate section for referenced objects (heap section) anonymous data objects (created with CREATE DATA)

    instances of ABAP classes (created with CREATE OBJECT)

    Objects on the heap section (heap objects) have an identity represented by the id

    attribute

    References to heap objects refer to this identity and are therefore represented by anhrefattribute

    Heap objects provide type information for deserialization (potential polymorphism)

    Objects (instances of ABAP classes)

    ABAP class must implement the interface IF_SERIALIZABLE_OBJECT

    All attributes (including private attributes) are serialized and grouped into class parts

    to avoid naming conflicts

    Customized serialization by providing the private methods SERIALIZE_HELPERand

    DESERIALIZE_HELPER: For each class part, only the parameters of the respecting

    method are serialized / de-serialized.

  • 5/28/2018 Comp 268

    24/55 SAP 2008 / SAP TechEd 08 / COMP268 Page 24

    asXML: Objects

    DATA incl_info TYPE REF TO cl_abap_source_info.

    CREATE OBJECT incl_info EXPORTING p_name = 'MY_INCLUDE' p_kind = 'I'.

    CALL TRANSFORMATION ID

    SOURCE src_info= incl_info

    RESULT XML xml.

    MY_INCLUDE

    I

  • 5/28/2018 Comp 268

    25/55 SAP 2008 / SAP TechEd 08 / COMP268 Page 25

    asXML: Anonymous Data Objects

    DATA iref TYPE REF TO I.

    DATA dref TYPE REF TO DATA.

    CREATE DATAdref.

    iref->* = 42.

    dref = iref.

    CALL TRANSFORMATION IDSOURCE i= iref d= dref

    RESULT XML xml.

    42

  • 5/28/2018 Comp 268

    26/55 SAP 2008 / SAP TechEd 08 / COMP268 Page 26

    EXERCISE 2

  • 5/28/2018 Comp 268

    27/55 SAP 2008 / SAP TechEd 08 / COMP268 Page 27

    1. XML Overview

    2. XML Processing in ABAP

    3. ABAP XML Data Serialization

    4. ABAP XML Mapping with ST and XSLT

    5. Summary

    Agenda

  • 5/28/2018 Comp 268

    28/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 28

    ABAP XML Mapping

    The structure mapping

    problem.

    Which side is driving?

    Inside-out approach: XMLXML mapping

    Outside-in approach:

    generation of proxy

    classes

    Symmetric approach:

    mapping engine

    XSLT with asXML

    Simple Transformations

    external XML format

    ABAP data structure

    external application

    ABAP application

    XML-based communicationoutside

    inside

    Mapping Engine

    ... for XML-based communication with external applications

  • 5/28/2018 Comp 268

    29/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 30

    ABAP XML Mapping with XSLT and the asXML

    format (1)

    external XML format

    ABAP data structure

    canonical DOM

    inboundoutbound

    external XML format

    1. build canonicalDOM

    2. transform DOM to

    outbound XML

    1. parse inbound

    XML to DOM

    ABAP data structure

    2a. transform inbound

    DOM to canonical DOM

    2b. bind data

    2. transform inbound

    DOM to data

  • 5/28/2018 Comp 268

    30/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 31

    DEMO

  • 5/28/2018 Comp 268

    31/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 32

    ABAP XML Mapping with XSLT and the asXML

    format (2)

    15:16:59

    Rule for writing XSLT transformations for ABAP XML Mapping: Treat the

    ABAP values (on the source or result side) in the XSLT program as if theywere given in their canonical representation.

    Example

    (outbound):

    XML:

  • 5/28/2018 Comp 268

    32/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 33

    ABAP XML Mapping with XSLT: Weaknesses

    Learning XSLT

    overkill for trivial transformation task

    no integrated tool support

    Asymetric programs

    one program for ABAP to XML, one for XML to ABAP

    Processing model

    source tree node can be accessed in a random order using XPath

    result tree can only be produced in a strictly linear fashion (document order)

    Resource consumptionDOM construction (the DOM consumes 10 times as much memory as the textual

    XML)

    (Superflous codepage conversions)

    XSLT Engine overhead

  • 5/28/2018 Comp 268

    33/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 34

    ABAP XML Mapping with ST: Key Features

    Simple Transformation programs are XML templates

    literal XMLwith interspersed instructions

    declarative, straightforward semantics

    Data tree access by node references

    instructions access data by simple reference expression

    named childs of a data node are accessible by name

    ST programs are reversible

    serialization: write tokens to an xml stream

    deserialization: match/consume token from an xml stream

    Virtual machine (VM) compilation to byte code and storage in database

    interpretation of byte code in kernel (lean engine)

    In ST programs (as

    opposed to XSLT),

    the XML source is

    accessed in a strictly

    linear fashion.

    Si l T f ti E i P

  • 5/28/2018 Comp 268

    34/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 35

    Simple Transformations: Expressive Power

    Anything that can be done with ...

    accessing each node in the data tree any number of times

    accessing each node in the XML tree at 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

  • 5/28/2018 Comp 268

    35/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 36

    DEMOD b I t t d XML B

  • 5/28/2018 Comp 268

    36/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 37

    Debugger: Integrated XML Browser

    ST D b

  • 5/28/2018 Comp 268

    37/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 38

    ST Debugger

    ST C t t T l t

  • 5/28/2018 Comp 268

    38/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 39

    ( )*

    ( )*

    (

    [ context declaration]

    template content

    )*

    ST Constructs: Templates

    Example:

    ST C t t V l

  • 5/28/2018 Comp 268

    39/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 40

    ST Constructs: Value

    S: ABAP data (by ref-node-expression) to XML (apply asXML value conversion rules)

    D: XML to ABAP data (by ref-node-expression) (apply asXML value conversion rules)

    Example:

    ST Constr cts Literal XML

  • 5/28/2018 Comp 268

    40/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 41

    ST Constructs: Literal XML

    S: write literal content

    D: match literal content (if no match: CX_ST_MATCH exception)

    template content

    07:12:00

    Example:

    Short:

    ST Constructs: Table Loop

  • 5/28/2018 Comp 268

    41/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 42

    ST Constructs: Table Loop

    S: Evaluate content for all lines of internal table

    D: Evaluate content, insert lines into table until matching fails

    template content

    Example:

    08:57:00

    08:58:00

    ST Constructs: Basic Conditional

  • 5/28/2018 Comp 268

    42/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 43

    ST Constructs: Basic Conditional

    S: [if check-clause and assertions are true:] evaluate template content

    D: [if template content matches:] evaluate template content [establish assertions][evaluate check-clause]

    template content

    Example:

    15:00:00

    ST Constructs: Composite Conditional

  • 5/28/2018 Comp 268

    43/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 44

    ST Constructs: Composite Conditional

    S: evaluate first case with true data condition (case with no data condition: serialization default)

    D: evaluate first case with matching pattern (case with no pattern content: deserialization default)

    ( template content )*

    ( template content )*

    S: evaluate all cases with true data condition

    D: evaluate all cases with matching pattern

    ST Constructs: Modularization

  • 5/28/2018 Comp 268

    44/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 45

    ST Constructs: Modularization

    Apply template and pass roots and parameters(A sub-template without an explicit rootdeclaration has an implicit unnamed root bound to the current nodeat the point of invocation.)

    ( )*

    ( )*

    ( )*

    ( )*

    Call main template in another ST program and pass roots and parameters

    ST Constructs: Variables

  • 5/28/2018 Comp 268

    45/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 46

    ST Constructs: Variables

    Declare variable (part of the context declaration)

    S: Write variable to XML

    D: Read variable from XML

    S: Assign ABAP data (by ref-node-expression) to variable

    D: Assign variable or constant to ABAP data (by ref-node-expression)

    type = C|STRING|D|T|F|I|N|P|X|XSTRING

    ST Constructs: Skip and Copy

  • 5/28/2018 Comp 268

    46/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 47

    ST Constructs: Skip and Copy

    S: copy ABAP data (by ref-node-expression) to XML using asXML representation

    D: copy XML (in asXML format) to ABAP data (by ref-node-expression)

    D: match and skip [numberof] nodes [named element-name]

    Example:

    CET08:58:00

    PST08:59:00

    ST Constructs: ABAP call

  • 5/28/2018 Comp 268

    47/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 48

    ST Constructs: ABAP call

    ( )*

    Example:

  • 5/28/2018 Comp 268

    48/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 49

    EXERCISE 3

    Agenda

  • 5/28/2018 Comp 268

    49/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 50

    1. XML Overview

    2. XML Processing in ABAP

    3. ABAP XML Data Serialization

    4. ABAP XML Mapping with ST and XSLT

    5. Summary

    Agenda

    Summary: XML Transformations in ABAP

  • 5/28/2018 Comp 268

    50/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 51

    Summary: XML Transformations in ABAP

    XSLT (since release 6.20)

    works on the canonical representation of ABAP data (asXML)

    builds DOM for source side

    arbitrary complex transformations

    ST (since release 6.40)

    only for ABAP to XML and XML to ABAP

    only linear transformations

    speedup of 10-30; unlimited size of data

    reversible (one transformation for both directions)

    ID (since release 6.20) fast, unlimited size of data

    supports only asXML fromat; no external format

    examples: basXML RFC, TREX, MemoryInspector

    Building Your Business with

  • 5/28/2018 Comp 268

    51/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 52

    SDN Subscriptions offers developers and consultants like you,

    an annual license to the complete SAP NetWeaver platformsoftware, related services, and educational content, to keepyou at the top of your profession.

    SDN Software Subscriptions: (currently available in U.S. and Germany)

    A one year low cost, development, test, and commercializationlicense to the complete SAP NetWeaver software platform

    Automatic notification for patches and updates

    Continuous learning presentations and demos to buildexpertise in each of the SAP NetWeaver platform components

    A personal SAP namespace

    SAP NetWeaver Content Subscription:(available globally)

    An online library of continuous learning content to help build skills.Starter Kit

    Building Your Business with

    SDN Subscriptions

    To learn more or to get your own SDN Subscription, visit us at the

    Community Clubhouse or atwww.sdn.sap.com/irj/sdn/subscriptions

    Fuel your Career with SAP Certification

    http://www.sdn.sap.com/irj/sdn/subscriptionshttp://www.sdn.sap.com/irj/sdn/subscriptions
  • 5/28/2018 Comp 268

    52/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 53

    Fuel your Career with SAP Certification

    Take advantage of the enhanced, expanded and multi tier certifications from SAP today!

    What the industry is saying Teams with certified architects and

    developers deliver projects on

    specification, on time, and on budget

    more often than other teams.2008 IDC Certification Analysis

    82% of hiring managers use

    certification as a hiring criteria.2008 SAP Client Survey

    SAP Certified Application

    Professional status is proof of quality,

    and thats what matters most tocustomers.*Conny Dahlgren, SAP Certified Professional

    Further Information

  • 5/28/2018 Comp 268

    53/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 54

    Further Information

    SAP Professional JournalJul/Aug 2002: From XML to ABAP Data Structures and Back: Bridging the Gap with

    XSLT

    Nov/Dec 2002: Mastering the asXML Format to Leverage ABAP-XML Serialization

    Jan/Feb 2005: Quickly and Easily Map Your ABAP and XML Data Using Simple

    Transformations

    SAP Public Web:

    SAP Developer Network (SDN): www.sdn.sap.comForumsABAPDevelopement

    http://www.sdn.sap.com/http://www.sdn.sap.com/
  • 5/28/2018 Comp 268

    54/55

    SAP 2008 / SAP TechEd 08 / COMP268 Page 55

    Thank you!

  • 5/28/2018 Comp 268

    55/55

    Please complete your session evaluation.

    Be courteous deposit your trash,and do not take the handouts for the following session.

    Thank You !

    Feedback