cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP CLOUD - EDOC_IT_XML_FILE - update description in changing structure

Member2808
Discoverer
0 Kudos
503

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 Cloud Public Edition  

Accepted Solutions (0)

Answers (1)

Answers (1)

Sean_Zhang
Product and Topic Expert
Product and Topic Expert
0 Kudos
My Dear Community Friend, May I ask whether you had any progress for your question? if not, as you also mentioned the sample code is also not working, one potential option would be you create an ticket for this, then the SAP expert may have the chance to check it in your system.