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.
Showing results for 
Search instead for 
Did you mean: 

How to generate IDoc file from IDoc in Database?

Former Member
0 Kudos

Hi, Abaper:

I have a question on IDoc. I write a stand-alone program to generate IDOC in database. how can I output it to IDoc file in a specific directory?

By the way. If I just output a IDoc file. After I create segments, Idoc type then write a program to genrate IDoc in Database, the last step is to generate Idoc file from Database. Should I do any configuration on SAP?

Thanks in advance.

Message was edited by: Yunfa Zhang


Former Member
0 Kudos


File port needs to be defined in system via we21.There you can maintain function module to generate file path from Idoc.

& specify physical directory where this file should be stored.

Now when you run IDoc generation program ,it creates IDoc in system & then uses above setting to generate file.


Mark points if helpful.

Former Member
0 Kudos


Hope you have done the WE20 Partner profile config.

In that specify the reciever port for your message type as the one created through WE21. In WE21 create a file type Port. Mention your physical directory there and you can try using the standard FM <b>EDI_PATH_CREATE_CLIENT_DOCNUM</b>