Get Example source ABAP code based on a different SAP table
ABAP_ST - Option for Regime The example demonstrates the representation of ABAP types when using regimes.
ABAP_SOURCE_CODE DEMO CL_DEMO_ST_REGIME_OPTION
ABAP_DESCRIPTION This example passes various types of ABAP data to the transformation DEMO_ST_REGIME_OPTION>> and displays the result for XML and JSON>. The transformation applies the option regime >> to the ABAP data: TRNS DEMO_ST_REGIME_OPTION The transformation creates JSON-XML> to represent both XML and JSON. The example shows the following:
Source Field of Type t>
Normal asXML> representation according to the XML schema type xsd:time>.
Applying regime(num)> gives the number of days since 01.01.0001.
Applying regime(num),decimals(2)> appends two decimal places.
Source field with reference to the special domain XSDBOOLEAN>
Special representation of the value X> in the XML schema type xsd:boolean> as true>.
Applying regime(char)> removes the effect of the domain and X > is represented according to the XML schema type xsd:string>.
Applying regime(char),format(boolean)> restores the representation true>.
Source field of type n> with length 3
Normal asXML> representation according to the XML schema type xsd:string (pattern [0-9]+)>.
Applying regime(bin)> converts the number in the source field to its binary representation and represents it in the XML schema type xsd:base64Binary>.
Applying regime(bin),format(uri1)> represents the binary value hexadecimally and adds quotation marks and a prefix.