Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

way to download an Idoc to XML

former_member182354
Contributor
0 Kudos
50,921

Hi Folks,

             Is there any way we can download an Idoc into XML apart from creating a XML port.

Raghav

10 REPLIES 10

Former Member
0 Kudos
19,094

Hi Raghavender,

This might help you:

http://scn.sap.com/thread/1673304

If you want to export an XML-file from your SAP System to your Computer, you can follow this tutorial:

http://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=153388639

Regards,

Niels

ThangaPrakash
Active Contributor
0 Kudos
19,094

Hello Raghavender,

Try to use the below steps

1) Use FM "IDOC_READ_COMPLETELY" to read the Idoc data.

2) Use FM "SAP_CONVERT_TO_XML_FORMAT" to convert the internal table obtained in step1 into XML file.

Regards,

Thanga Prakash T

former_member182354
Contributor
0 Kudos
19,094

Hi All,

          Thanks for your reply. I should have added to my question that I dont want a programmatic solution. Is there any standalone function module that can be used to get an XML.

         I know of IDOC_XML_TRANSFORM FM which can do this. I can see the XML tags created in output but no option to download it in XML.

Raghav

0 Kudos
19,094

The easiest way that I've found is to follow the tutorial underneath:

http://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=153388639

It doesn't involve any programming, you just have to follow the steps and copy the code they have written for you. This will create a program where you enter your iDoc number and exports an XML-file.

Hope this was helpfull.

Regards,

Niels

Former Member
19,094

Hello,

You can use the FM  "Out_Idoc_xml_Transform"-Just mention the Idoc number as 'docnum' and give the address and file name in 'out_file'. System will convert Idoc into XML format and it get stored.

Regards,
Soumya Chakraborty

Ayman_Aqel
Discoverer
19,094

SE38

RCOD_DOWNLOAD_IDOC_AS_XML

0 Kudos
19,094

Thanks a lot for this, it's by far the best answer!

19,094

Thank you. Worked like a charm, even on production where there were no rights for executing function modules.

0 Kudos
7,454

You saved me! Thank you. Strange that this report is not more well known - and that it's such a hidden way to reach something so simple.