What does it do? The attribute map> can be used to specify a list of mapping rules for tt:value>>, tt:write>>, and tt:read>>. This is done to map a list of explicitly specified values to exactly one value when serializing or deserializing. A mapping list consists of a single mapping rule or a comma-separated list of multiple mapping rules. The following mapping rules are possible:
val(a1, a2, ...) > xml(x)> This mapping rule is evaluated in serializations. If the value of the current data node matches one of the specified values a1>, a2 >, ... it is transformed to the value x>.
xml(x1, x2, ...) > val(a)> This mapping rule is evaluated in deserializations. If the value of the current node matches one of the specified values x1>, x2>, ... it is transformed to the ABAP value a>.
val(a) = xml(x)> and xml(x) = val(a)> These mapping rules both mean the same thing and are evaluated in both serializations and deserializations. If the value of the current node corresponds to the specified value a>, it is converted into value x>, and vice versa. The values a>, a1>, a2>, ... must be specified in accordance with the representation of ABAP values>. The XML values x>, x1>, x2>, ... must be enclosed in quotation marks.
Latest notes: If mapping rules with more than one argument are used, transformation is usually no longer symmetrical>. NON_V5_HINTS ABAP_HINT_END
ABAP_EXAMPLE_VX5 Serialization of ABAP data using a mapping list with transformation DEMO_ST_MAPPING_LIST>>: TRNS DEMO_ST_MAPPING_LIST The transformation is not symmetrical>. In the following ABAP program, field1> and field2> contain the value Person> after deserialization. ABEXA 01708 ABAP_EXAMPLE_END