cancel
Showing results for 
Search instead for 
Did you mean: 

Idoc to Flat-File Conversion (From a sap system to a non sap system.

Former Member
0 Kudos

Hi, I must convert an idoc to a flat file and then ftp the flatfile to a non sap (legacy) system. I looked at some of the other posts but could not get the interface working. I have tried abap mapping, and some xsl mapping but nothing worked. Is there maybe a decant tutorial explaining how to do this? Can I do the conversion using the content conversion paramaters? If so, how does it work?

Thanks,

Jan

Edited by: Jan de Lange on Oct 21, 2008 12:27 PM

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Check the below link for Converting any flat file to any Idoc using Java Mapping :-

Please see the below links for examples of FCC :-

http://help.sap.com/saphelp_nw2004s/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm

- FCC

- FCC

- FCC

- FCC

Regards,

Aditya.

rewards points if helpful..

Former Member
0 Kudos

In each one of these cases, the sender channel is a file adapter. I have to use a idoc adapter and then convert it to a flat file. The content conversion I got sending the file and converting it onto a txt file but the output is blank.

prasad_ulagappan2
Contributor
0 Kudos

Try to do it without content conversion on the receiver side and let us know whether u r able to get any content in the target file.

Former Member
0 Kudos

Without the content conversion it works fine but is in .xml format

Heres the output xml sample.

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<!-- Response

-->

<SAP:IDocInbound xmlns:SAP="http://sap.com/xi/XI/Message/30">

<SAP:TABNAM>EDI_DC40</SAP:TABNAM>

<SAP:MANDT>***</SAP:MANDT>

<SAP:DOCREL>***</SAP:DOCREL>

<SAP:DOCNUM>0000000000****</SAP:DOCNUM>

<SAP:DIRECT>*</SAP:DIRECT>

<SAP:IDOCTYP>WALNOT01</SAP:IDOCTYP>

<SAP:CIMTYP />

<SAP:MESTYP>WALNOT</SAP:MESTYP>

<SAP:MESCOD />

<SAP:MESFCT />

<SAP:SNDPOR>SAPECD</SAP:SNDPOR>

<SAP:SNDPRN>****</SAP:SNDPRN>

<SAP:SNDPRT>LS</SAP:SNDPRT>

<SAP:SNDPFC />

<SAP:RCVPOR>SAPXID</SAP:RCVPOR>

<SAP:RCVPRN>B006</SAP:RCVPRN>

<SAP:RCVPRT>KU</SAP:RCVPRT>

<SAP:RCVPFC />

<SAP:TEST />

<SAP:SERIAL></SAP:SERIAL>

<SAP:EXPRSS />

<SAP:STD />

<SAP:STDVRS />

<SAP:STATUS>30</SAP:STATUS>

<SAP:OUTMOD>2</SAP:OUTMOD>

<SAP:SNDSAD />

<SAP:SNDLAD />

<SAP:RCVSAD />

<SAP:RCVLAD />

<SAP:STDMES>WALNOT</SAP:STDMES>

<SAP:REFINT />

<SAP:REFGRP />

<SAP:REFMES />

<SAP:CREDAT>2008-10-21</SAP:CREDAT>

<SAP:CRETIM>14:01:24</SAP:CRETIM>

<SAP:ARCKEY />

</SAP:IDocInbound>

prasad_ulagappan2
Contributor
0 Kudos

How did u use the Content conversion parameters for this?

Former Member
0 Kudos

I have a record structure: GlobalField and 1 parameter: GlobalField.fieldSeparator and its value: #

I don't know if this would make a difference but I have the Transfer Mode as binary and under Processing Parameters, the file type also as binary.

prasad_ulagappan2
Contributor
0 Kudos

I guess, you havent done any mapping for IDOC to File structure. For this you need to complete the mapping first as per your target file format and then do the content conversion accordingly.

Former Member
0 Kudos

For my mapping Im using standard message mapping. Should it maybe be abap or xsl?

Edited by: Jan de Lange on Oct 21, 2008 2:31 PM

prasad_ulagappan2
Contributor
0 Kudos

You can use any mapping for this. But you should change the structure in mapping as per your target file format. As of now, I think you have done the direct one to one mapping with the same structure. You should create a datatype, message type, message interface for the target side too and then do the message mapping and interface mapping accordingly then do the content conversion as per your req.

Former Member
0 Kudos

Ok, so I finally solved the problem.. I tried converting an Idoc to a Flat file using the Content Conversion in the receiver adapter. My sender adapter was a idoc adapter and the receiver adapter was a file adapter with the Message Protocol set to File Content Conversion. My problem was the output file was blank everytime I tested it. The solution was in the inbound data type. All the elements was under a default structure. All I had to to is Create a MainNode complex structure and include all the fields as sub elements in the xml. And now everything works fine. Thanx for all the help.. Cheers, Jan

former_member238007
Contributor
0 Kudos

Hi..

If u need to convert from SAP standards i.e Idoc or any format u need to custmize the program for conversioning into xml and ask them to put that file in source directory then the scenario will be of xml to file ..

regards,

Kishore

prasad_ulagappan2
Contributor
0 Kudos

Have a look at this link,

http://www.riyaz.net/blog/xipi-file-content-conversion-for-complex-structures/

Content conversion is used to convert the flat file to an XML format used within File Adapter. There are so many parameters available for this to achieve this. Hope this link gives you full details.

Former Member
0 Kudos

Hi, Ive tried it with the content conversion where my sender channel is a standard idoc adapter and the receiver channel is a file ftp, for the content conversion the record structure is GlobalField and I only have 1 parameter, GlobalField.fieldSeparator. The ftp works fine with the message protocol as file but when I change is to File Content Conversion and add that 1 parameter the message status is successfull but the Ack.Status says: Acknowledgment contains some system errors. Anu idea what might be wrong?

Edited by: Jan de Lange on Oct 21, 2008 1:09 PM

Former Member
0 Kudos

Hi,

Have a look at these

Regards

Seshagiri