2005 Apr 21 4:18 AM
Hi,
I would like to know is there any way to generate flat file from Idoc.
Thanks
Kishore
2005 Apr 21 7:47 AM
Hi Kishore!
It might not be as flat as you expect (file structure looks more like IDOC structure, but it's a text file):
In partner profiles (WE20) in customizing of outbound message, tab outbound options you can define a receiver port. This can not only be a system, but several different types. Hit F4, in second tab you can define a file output.
Regards,
Christian
2005 Apr 21 7:47 AM
Hi Kishore!
It might not be as flat as you expect (file structure looks more like IDOC structure, but it's a text file):
In partner profiles (WE20) in customizing of outbound message, tab outbound options you can define a receiver port. This can not only be a system, but several different types. Hit F4, in second tab you can define a file output.
Regards,
Christian
2005 Apr 21 8:22 AM
Hi,
The prolem with this is that IDoc have a structured format (i.e. header and segments, very much a tree-like structure). Creating a flat file from such a structure is not an easy task, because this kind of structure is difficult to re-create in, say, an ASCII file. So, the "native" file format of an IDoc is a structured text file, as well. It has several lines (roughly speaking, each line corresponds to a segment).
My preferred file format for IDocs is, of course, XML. With XML you are able to map the tree-like segment structure of IDocs with great ease. You can have a look at the various XML formats under http://ifr.sap.com.
Also, you can transform XML documents easily with stylesheets and so on.
Regards, Joerg
2005 Apr 21 1:29 PM
Hi Kishore,
I dont know if you see my answer to the same ask from 04/18.
You can send the IDoc to a flat file, creating a PORT of the file type. If you send the IDoc in this way, you have the complete idoc in the strcutures text file.
If you have to create a flat file using the data into the IDoc, but not with idoc format, you can use a type ABAP port. In this port, you have to put a function module name that process the idoc and create the flat file (and put it in the application server). Use the function module OWN_FUNCTION as example to create your own FM.
Regards
PabloX