Code: Alles auswählen.
<debitoren>
<Kostenstelle> = "1234">
Code: Alles auswählen.
<debitoren Kostenstelle="1234">
Code: Alles auswählen.
<debitoren>
<Kostenstelle>1234</Kostenstelle>
Code: Alles auswählen.
TYPES: BEGIN OF ty_debitor,
kunde_name TYPE name1,
kunde_nummer TYPE kunnr,
kunde_ort TYPE ort01,
kunde_land TYPE land1,
END OF ty_debitor,
ty_debitoren_t TYPE STANDARD TABLE OF ty_debitor WITH NON-UNIQUE DEFAULT KEY,
BEGIN OF ty_xml,
kostenstelle TYPE kostl,
debitoren TYPE ty_debitoren_t,
END OF ty_xml.
DATA lt_debitoren TYPE ty_debitoren_t.
DATA ls_debitor TYPE ty_debitor.
DATA ls_xml TYPE ty_xml.
DATA lt_xml TYPE STANDARD TABLE OF ty_xml.
ls_debitor-kunde_nummer = '1234'.
ls_debitor-kunde_name = 'Sushi AG'.
ls_debitor-kunde_ort = 'Bremerhaven'.
ls_debitor-kunde_land = 'DE'.
APPEND ls_debitor TO lt_debitoren.
ls_debitor-kunde_nummer = '5555'.
ls_debitor-kunde_name = 'Fisch AG'.
ls_debitor-kunde_ort = 'Bremerhaven'.
ls_debitor-kunde_land = 'DE'.
APPEND ls_debitor TO lt_debitoren.
ls_debitor-kunde_nummer = '6666'.
ls_debitor-kunde_name = 'Wal GmbH'.
ls_debitor-kunde_ort = 'Bremen'.
ls_debitor-kunde_land = 'DE'.
APPEND ls_debitor TO lt_debitoren.
ls_xml-kostenstelle = 'DE0001'.
ls_xml-debitoren = lt_debitoren.
APPEND ls_xml TO lt_xml.
DATA xml_string TYPE string.
CALL TRANSFORMATION id SOURCE root = lt_xml RESULT XML xml_string.
cl_abap_browser=>show_xml(
EXPORTING xml_string = xml_string
size = cl_abap_browser=>xlarge ).