将内表序列化为XML
TYPES: BEGIN OF ty_marc,
matnr TYPE marc-matnr,
werks TYPE marc-werks,
END OF ty_marc.
DATA: lt_marc TYPE TABLE OF ty_marc.
DATA: xmlstr TYPE xstring.
SELECT *
FROM marc
INTO CORRESPONDING FIELDS OF TABLE lt_marc
UP TO 3 ROWS.
CALL TRANSFORMATION id
SOURCE table = lt_marc
RESULT XML xmlstr.
cl_abap_browser=>show_xml( xml_xstring = xmlstr ).