cancel
Showing results for 
Search instead for 
Did you mean: 

File-XI-IDoc Scenario

Former Member
0 Kudos

Hi all,

we try to implement a file-XI-IDoc scenario. We receive flat files that already have the structure of the IDOC. So what I did is the following:

In IR I imported the IDoc structure from the backend system. Then I created a message interface (outbound) and used the imported IDoc as message type. I also created message and interface mapping.

In ID I used sender file adapter and a receiver idoc adapter... I also followed the step-by-step solution in the HOW-TO-Guide "How to configure the IDoc Adapter.

But now I'm not sure if I have to use the option "File Content Conversion" in the file adapter? If yes, do I have to reproduce the whole IDoc structure in the content conversion parameters?

Any help is appreciated.

Thanks,

Carmen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Here's a quick rundown of what we did (prototype), and my understanding.

Also, in the marketplace, see the document:

<i>How To Convert Between IDoc XML and Flat Files in XI.30 </i>

On the XI box:

Use txn WE21 to get the IDOC with ALE port of type File.

Use txn SM59 to set up an RFC destination to the system that has the IDOC metadata (probably your receiving system).

Use IDX1 to set up the retrieval of the IDOC metadata from the receiving system. From the IDOC control record, use the SNDPRT field for the Port, use the MANDT field for the Client. Use the RFC destination you created above for the RFC destination.

In the designer, the required objects are your imported IDOC, use that for src and target on a message map, use it as the src and target for interface map.

Once XI picks up the IDOC, it uses SNDPRT (of format <i>SAP<SID></i>) and MANDT from the IDOC control record to query the Configuration Directory for a configured Adapter-Specific Identifier. This should correspond to either a sender system (if it's in your SLD) or a sender service (outside third party). In the Config Directory, open the system/service, then from the menu select <i>Service</i> -> <i>Adapter-Specific Identifiers</i>. This configuration takes the place of a Sender Agreement/Sender Comm Channel. The IDOC type determines the sender interface.

Create your IDOC Receiver comm channel. Configure the rest of the objects (RD, RA, ID).

Hope this helps.

Tim

Former Member
0 Kudos

Hi Tim,

that means in your scenario, you don't use file adapter at all, do you? Do you execute txn WE21 as a job?

Regards,

Carmen

Former Member
0 Kudos

First, see if whoever/whatever is generating the IDOC and generate it in IDOC xml. This was the case for us and it allowed us to use the File Adapter, which makes things a little simpler. If you can't get IDOC xml:

WE21 is what BASIS uses to configure the ALE File Port. The HowTo document referenced above (Convert Between IDOC XML and Flat File Structures in XI 3.0) states:

<i>Run report RSEINB00 on your Integration Engine. The report will upload the file, filter the IDoc header data, perform the conversion to IDoc XML and put the data into the pipeline of the Integration Server. ... . Once the message is put successfully into the pipeline of the Integration Server, the file is deleted.</i>

Since we were able to get the IDOC in IDOC-xml, we didn't persue this solution to its conclusion. We simply used the File Adapter. But if you can't get it in IDOC-xml, you might try a two-step process. File-Adapter to retrieve the file and put it (with a standard name) on the local XI file system (or file share XI has access to). Then schedule report RSEINB00 in XI to put the IDOC on the pipeline. The report requires the File Port created in WE21 along with the path and file name.

Please let me know if you find a better way to do this.

Good luck,

Tim

Former Member
0 Kudos

I will try to get the IDoc in IDoc xml, but I think it's not possible. But if not... I will follow your advice.

Thanks a lot for your help. Full points...

Regards,

Carmen

Answers (10)

Answers (10)

0 Kudos

hi carmen

i do have the exact problem with content conversion parameters

idoc flat file input to XI

hence file adapter, but i have issues with content conversion parameters

can u please suggest me what you did for your issue

thank you

siddu.236atgmail.com

former_member91687
Active Contributor
0 Kudos

Hi Carmen,

Check out this blog, it should help you.

/people/alessandro.guarneri/blog/2006/03/05/managing-bulky-flat-messages-with-sap-xi-tunneling-once-again--updated

Regards,

Chandra

0 Kudos

Hi Carmen,

I understand that the original iDoc is in tradicional IDOC format, not in XML-IDOC...

To transform this data into the XI IDOC Adapter XML-IDOC format, you should apply a little ABAP Mapping code.

Regards,

Antonio

Former Member
0 Kudos

HI

U create the outbound message interface by using the message type which u created for file.

Ur inbound interface is Idoc.

Then pls give the relavent details in ID after doing it so that we can get where exactly u r facing the problem

Regards,

venu

Former Member
0 Kudos

Hi,

Content conversion is required only if the incoming source file is not in xml format.

If it is not an xml file, then in the file sender adapter, you have to specify the content conversion parameters i.e, what the recordset name, recordset structure will be. You will also have to specify the field names that have to occur under the recordset stucture.

Regards,

Smitha.

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Carmen,

What do u mean by a FLAT file..??

XI understands only XML, and so all information passed to it has to be in XML format.

If your file is in XML format, then no content conversion is required in your SENDER file adapter. But if it is in ASCII format, then you need to perfrom content conversion on your Adapter.

Regards,

Bhavesh

Former Member
0 Kudos

Hi,

While doing an IDOC -> XI -> File scenario, The Points to noted are:

1. You don’t need a DT, MT or a message interface for the IDOC as it itself acts as the Message Interface.

2. You import the IDOC and use the same in your mapping.

3. In this configuration note that you don’t have a sender agreement as you don’t have a sender IDOC adapter.

If it is that you wanted to send an IDOC from XI (File to IDOC) , then in this case:

points 1 and 2 will remain, but the 3 will not. You will need a sender agreement for the file and a receiver agreement for the IDOC.

IDOC -> File scenario:

/people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters

File -> IDOC scenario:

/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping

(It concentrates on XSLT mapping but also gives an idea about the configuration part. Do go thru that, it might help you.)

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

If you have any other doubts please let us know.

Regards,

Abhy

Message was edited by: Abhy Thomas

Former Member
0 Kudos

Carmen, When you import IDOC metadata into IR and use it as an outbound message inteface, i beleive XI is going to expect an IDOC-XML structure in your file. Well, if you can open your flat file(rename it to XML), say in Internet explorer and can verify if it is a well formed XML representation of your IDOC, then you do not have to worry about content conversion. IDOC metadata downloaded into XI serves something like an XSD for your IDOC, so your input file should have an IDOC-XML.

Thanks

Saravana

Former Member
0 Kudos

>> We receive <b>flat files</b> that already have the structure of the IDOC.

XI can understand only XML files. To understand flat files (csv/fixed length) file content conversion is used in sender adapter which converts flat files to XML. Make sure the structure of IDOC is XML. If not you have to configure File adapter for file content conversion to produce a XML structure to make use in XI since IDoc is coming as a flat file in your case.

Best regards,

Felix

Shabarish_Nair
Active Contributor
0 Kudos

First of all your IDOC acts as your Message interface so you dont need to create a Message Type for the same. You can directly use the IDOC in your message mapping and interface mapping.

Refer this weblog /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping

And about the File adapter you can follow up with this links ...

/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter

/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

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

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

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

>> If yes, do I have to reproduce the whole IDoc structure in the content conversion parameters?

it depends on your scenario if you have to reproduce the whole IDOC or not.

ShaBZ