cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CLOUD - EDOC_IT_XML_FILE - update description in changing structure

Member2808
Discoverer
0 Kudos

Dears Gurus,

I we wnat to use the standard badi EDOC_IT_XML_FILE to updated the text in the output xml. The text is correctly contained in the HEADER_ITEM_TEXTS table, we applied the following code based on sample provided but nothijng happen in changing structure:

READ TABLE xml_file_modified_121-fattura_elettronica_body
INDEX 1 ASSIGNING <ls_body2>.
IF <ls_body2>-dati_beni_servizi-dettaglio_linee IS NOT INITIAL.
READ TABLE header_item_texts
ASSIGNING <ls_headit_txt>
WITH KEY tdobject = lv_tdobj_item
tdid = '0001'
numero_linea = <ls_item_num>-numero_linea
tdspras = lv_tdspras.
APPEND INITIAL LINE TO <ls_body2>-dati_beni_servizi-dettaglio_linee ASSIGNING <ls_dettaglio2>.
<ls_dettaglio2>-descrizione = <ls_headit_txt>-tdline.
<ls_dettaglio2>-numero_linea = <ls_item_num>-numero_linea.
ELSE.
LOOP AT <ls_body2>-dati_beni_servizi-dettaglio_linee ASSIGNING <ls_dettaglio2>.
<ls_dettaglio2>-descrizione = <ls_headit_txt>-tdline.
<ls_dettaglio2>-numero_linea = <ls_item_num>-numero_linea.
ENDLOOP.
ENDIF.
ENDIF.

cdo you have any suggestions on it? even other sample code seems not working..

SAP S/4HANA Public Cloud  

Accepted Solutions (0)

Answers (0)