Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Showing results for 
Search instead for 
Did you mean: 
Active Participant
I have recently come  across the need to "manually" move an IDoc for testing purposes form one SAP system to another. The two systems were in two different environments and not planned to be connected network wise. So we needed a way to export and import an IDoc.

The idea was to export the IDoc on system A to a file and then import it in system B from that file. It seemed an easy task, but turned out to be quite tricky. I haven't found much help from searching online or in SAP docs but enough to put something together that worked at the end. I'd like to share this here in a step-by-step guide.

Please note that this is only for manual testing purposes for single cases and not intended to serve as any kind of IDoc interface.

We firsts export an existing IDoc from source system, download the file to the local computer and then upload it to another system:



1 How to export a flat IDoc file in SAP ERP:


SAP GUI, Transaction Code: WE19

  1. Load an existing Idoc (see we02) via idoc number.

  2. Click on "inbound file" (note: this is actually confusing. You're going to write a file to the file system, but the function is called inbound file. But it's all right and you can go ahead.)

  3. Uncheck the checkbox "start inbound processing of file now".

  4. Enter a path on the server (use transaction AL11 to find a suitable path) and a filename. The file name can be chosen freely. Execute the function.


  1. Download the exported file to your local machine using Transaction Code: CG3Y (or FM ARCHIVFILE_SERVER_TO_CLIENT as per a reader's comment).
    You can also use AL11 which displays a list of all available files. Select the file and then click the button marked below ("Download File as Text"):

  2. Target is a path on your local machine.

  3. Choose ASC for ASCII mode.

  4. Execute the download.

  5. You can now edit the file on your PC if needed, or further process/distribute it. Or you can now upload it e.g. to another SAP system and edit it there before processing (see next chapter).



2 Upload and Inbound Process a Flat IDoc File

  1. Upload the file using transaction code CG3Z (or FM ARCHIVFILE_CLIENT_TO_SERVER as per a reader's comment) e.g. to a temp directory.

  2. Use t.code WE19 and select "File as Template".

  3. Enter the path where you've uploaded the file and the filename.

  4. The test tool displays your IDoc, you can also change it here.

  5. You also need to create the control record (I don't go into details of this here as this is required knowledge about the standard IDoc processing and can be found elsewhere). To create the control record, click on the first line in the editor and enter the data as needed (of course, change the name to your IDoc's message type. Here it's a business partner IDoc) :

  6. When you're ready, click "Standard Inbound". If a partner profile (WE20) exists, it will be processed after executing the function (or collected for later processing). See the status of the new IDoc in WE02.

Labels in this area