Skip to Content

ABAP and XML – Introducing ST

I am happy to announce, that the documentation of ST has finally made its way to the SAP Help Portal. You find it here!

What is ST?

As of Release 6.10 ABAP contains the statement CALL TRANSFORMATION that allows you to transform ABAP data to XML and vice versa.

As of Release 6.10/6.20, you could call XSLT programs for that purpose. Read here and here what the real geeks have to say about that!

XSLT is a very powerful language for general transformations. Yet it has some drawbacks:

  • Learning XSLT
  • Overkill for simple conversion tasks
  • No tool support
  • No static type checking
  • Asymmetric programs (one for XML ->ABAP, one for ABAP -> XML)
  • Resource consumption (DOM construction ,  codepage conversions, XSLT engine overhead).

 Therefore, SAP offers its own transformation language as of Release 6.40: Simple Transformations (ST)

 The benefits of Simple Transformations are:

  • Increase throughput by factor ≥ 10
  • Eliminate upper limit on size of data
  • Ease of use
Simple syntax & semantics, statically type-checked
Tool support for creating mappings
One program for XML→ABAP and ABAP→XML
  • Deliberate trade-offs
    • lower expressive power (but cover 90% of typical applications)
    • not usable for XML ↔XML

 The following picture compares serialization/deserialization of ABAP data with XSLT and ST:

image

 When serializing and deserializing ABAP data with XSLT, you must consider asXML (ABAP Serialization XML), the canonical XML representation of ABAP data:

  • If you have written any XSL transformations of ABAP data into an XML format, the asXML format of the serialization result must be known.
  • If you want to create external XML documents that can be deserialized into ABAP data, they must be in asXML format.

 When serializing and deserializing ABAP data with ST, you don’t need to know asXML (except for the representation of elementary types). Instead, you have to learn ST of course J.

Check out the examples in the documentation!

5 Comments
You must be Logged on to comment or reply to a post.