(The recommended XML format can be looked up in the SAP Interface Repository ifr.sap.com.)
append '= < IDOC= > ' to xml. ... header info ... loop at int_edidd. concatenate '= < SEGMENT name="' int_edidd-segnam '"= > ' into xml. append xml. CALL FUNCTION 'DDIF_TABL_GET' EXPORTING NAME = int_edidd-segnam TABLES DD03P_TAB = DD03P_TAB. ofs = 0. loop at seginfo. len = DD03P_TAB-intlen. assign int_edidd+ofs(len) to = < fld= > . concatenate '= < FIELD name="' DD03P_TAB-fieldname '"= > ' into xml. append xml. append = < fld> to xml. append '= < /FIELD= > ' to xml. ofs = ofs + len. endloop. append '= < /SEGMENT= > ' to xml. endloop. append '= < /IDOC= > ' to xml.
Dig deeper on SAP interface technologies
Related Q&A from Axel Angeli
An SAP user wants to know how to upload data into SAP R/3 when SAP Scripting is not enabled.continue reading
An SAP user is receiving an error message while integrating SAP iDoc PORDCR1 for a purchase order.continue reading
An SAP user is having difficulty with PERNR iDoc while transporting data from SAP to an external system.continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.