Application Development 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: 

Exporting a IDOC to text file

Former Member
0 Kudos

Hi All,

I have a IDOC number and also know IDOC type.

I want to export this IDOC to a standard IDOC file to be sent to another system.

How do I do this? Is there some function module available?

Could you provide any sample code?

Thanks a lot.

-Shreyas

(Helpful replies will be rewarded. )

5 REPLIES 5

Former Member

former_member927251
Active Contributor
0 Kudos

Hi,

Check out the following function modules :

IDOCS_OUTPUT_TO_FILE

IDOCS_OUTPUT_TO_INTERNET

IDOCS_OUTPUT_TO_OWN_FUNCTION

IDOCS_OUTPUT_TO_R2

IDOCS_OUTPUT_TO_R3

Please reward points if it helps.

Regards,

Amit Mishra

ferry_lianto
Active Contributor
0 Kudos

Hi Shreyas,

Welcome to SDN.

Have you looked <b>File Port</b> (WE21) to ouput IDoc(s) to flat file?

For more information, please check this link.

http://help.sap.com/saphelp_di471/helpdata/EN/dc/6b7fa443d711d1893e0000e8323c4f/content.htm

Regards,

Ferry Lianto

Please reward points if helpful as way to say thanks.

Former Member

Go to a server and find yourself an idoc that you want to use as a template.

Display the idoc using WE19.

Click Inbound file

Type in a file name - for example /tmp/test (you need to use an AL11 directory).

Make sure the option 'Start inbound idoc processing of the file immediately' is unchecked.

Choose overwrite file

Then click the tick.

This will write you an idoc into the AL11 directory structure in the system you are operating in.

Using the download and upload functions (CG3Z & CG3Y), get the file transferred to the production AL11 directories.

Use WE19 to process your downloaded idoc.

Use the option 'File as template' to pick up your file.

You should now be able to process your idoc as you wish

regards

Aveek

0 Kudos

That is the exact answer I was looking for.

Thanks Aveek!