cancel
Showing results for 
Search instead for 
Did you mean: 

File-to-IDoc, but the file structure is equal to the IDoc structure

Former Member
0 Kudos

hi,

we have a scenario where the incoming message has to be picked up by FTP. The incoming message is a flat file, no delimiters, no separators, nothing, however is exactly the IDoc structure.

Since the file adapter does not know how the structure is set up, because no tags are present, it can not translate the filestructure into any format. Therefore it can not be processed further.

Is there a way for a fileadapter to convert this plain file to an IDoc format, or to call the file-to-IDocadapter up front, the same way as if you would use in SAP the fileport in IDoc processing ??

thanks!

Accepted Solutions (0)

Answers (8)

Answers (8)

Former Member
0 Kudos

People,

thanks for your quick responses, but ...

I know all of this, I'm not new in this XI stuff. But the question was if there is a possibility to do the same thing in XI as the fileport would do in SAP without making any design or conversion effort.

In other words is the same functionality still present in XI or do we loose this simple but very sufficient option! As you know the IDoc segments in the file are variable, so the structure is variable. The fileport in SAP would take care of this as well.

Let me give you 2 possible options I came up with to help you started:

1. Take the file, use XI to send it to the Integration Server, process it through the fileport, create an IDoc and send that IDoc to XI again. Continue the process to the actual receiver (SAP server). Now why can't XI do this simple conversion. The programs are all there in the ABAP stack.

2. Take the file, use XI as a simple FTP tool and send the IDoc to an directory at the receiver SAP server and process it there using the fileport. So in that case XI is nothing more than an FTP tool.

any smart suggestions?

Former Member
0 Kudos

Hi Alexander,

"I know all of this, I'm not new in this XI stuff. But the question was if there is a possibility to do the same thing in XI as the fileport would do in SAP without making any design or conversion effort."

Does the fileport accept flat file data into the SAP system?!

Regarding option1:-

"Take the file, use XI to send it to the Integration Server"

You will have to do content conversion here once again so that XI will accept the flat file into the integration engine.

Regarding option2:-

"Take the file, use XI as a simple FTP tool and send the IDoc to an directory at the receiver SAP server "

For XI to behave as an FTP tool, once again you will have to convert so that XI can pick it up:)

Regards,

Sushumna

STALANKI
Active Contributor
0 Kudos

As I understand you want to just the pick up the file without defining any structrure in the configuration.

That should be fine..Try this out..

/people/sravya.talanki2/blog/2005/08/16/configuring-generic-sender-file-cc-adapter

Former Member
0 Kudos

Hi Alexander,

XI understands ONLY XML. All messages to and from XI are always XML messages.

Now, if the file being placed by your Legacy System is not going to be an XML file, then you can use the content conversion of your sender File adapter to convert this non XML file to an XML file.

Same way, if the file that is required by your 3rd party application should not be in a XML format, you can use content conversion of the receiver adapter to convert XML to text and so on.

Basic point, all messages that reach the inegration engine of XI need to be in XML format and so you need content conversion to conevrt non xml to xml and vice versa.

To make note mapping cannot be performed with a flat file as XI understands only XML. Hence content conversion required.

Please go thru these links for step by step procedure to do the same:

/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30

/people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file

http://help.sap.com/saphelp_erp2005/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30

I hope I have answered your query.

Regards,

Abhy

Former Member
0 Kudos

Hi Alexander,

In XI terms, the structure can be called an IDoc structure only if it has XML tags:) Since, it does not have XML tags, (and here I assume that it has the field values in the same structured way as in the IDoc) you nevertheless will have to go for content conversion!

Also, please take care that the structure does not have more than 3 substructures.

Regards,

Sushumna

Former Member
0 Kudos

Hi Alexander,

You can do content conversion of your file if you know the length of the fields in ur file.

cheers,

Prashanth

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

<i>we have a scenario where the incoming message has to be picked up by FTP. The incoming message is a flat file, no delimiters, no separators, nothing, however is exactly the IDoc structure.</i>

Am not sure what you mean when you say it is of the same strcuutre as an IDOC strcuutre.. Is it an XML file?

IF a flat file, content conversion possible on the strucutre?

/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns

/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem

Regards,

Bhavesh

Former Member
0 Kudos

Hi,

If you know the length of each field the you can do content conversion using File Adapter.

Regards,

Alok.

Former Member
0 Kudos

Hi,

It has to be converted to XML format, so content conversion has to be done on your incoming flat file.

Regards.

Jithesh