cancel
Showing results for 
Search instead for 
Did you mean: 

Format of File - XI File Adapter

Former Member
0 Kudos

Hi,

I have configured an inbound interface to receive a file and as such configured a file adapter communication channel. Does the file need to be in an XML structure or can it be in a tab delimited or CSV format? If it needs to be in XML format is there any built in functionality to convert from tab delimited or CSV into XML format before XI picks it up?

Thanks, Warren

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Raj,

I just got to that blog but having troubles understanding what needs to go into the Content Conversion section. I've entered the following in the Content Conversion Parameters:

Document Name: FILEINPUT

Recordset Name: Record

Recordset Structure: ?

What I'm unsure of is what exactly needs to be entered into record set. Is it just:

Row.fieldNames - field name1, field name 2

Row.fieldSeparater - '0x09'.

Regarsds, Warren

justin_santhanam
Active Contributor
0 Kudos

Warren,

Let's consider ur structure looks like

<MT_Input>

<Rows>

<Field1/>

<Field2/>

<Field3/>

<Field4/>

<Field5/>

</Rows>

</MT_Input>

Follow the below parameters.

Document Name : MT_Input (Give ur message type name)

Document namespace : (Give ur Message type namespace)

Recordset Name : Records (Give any arbitrary name, we are going to ignore it in the below parameters)

Recordset Structue Rows,*

Recordser per message *

Parameters

Name Value

ignoreRecordsetName true

Rows.fieldNames Field1,Field2,Field3,Field4,Field5

Rows.fieldSeparator '0x09'

Rows.endSeparator 'nl'

Also , please refer http://help.sap.com/saphelp_nw70/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm

raj.

Answers (5)

Answers (5)

Former Member
0 Kudos

Raj,

I'm using this file to populate BAPI_EXCHANGERATE_CREATE. When I view the processed XML messages it shows "Processed" but when I verify it on the R/3 end it hasn't created the exchange rate. Now is there a way I debug this because it's obvious the BAPI is not posting? I am sure all the mandatory data is being passed to the BAPI as I tested this inside R/3 before creating the interface in PI. I went into the communication channel for the RFC receiver adapter and checked on the "Commit Handling for Single BAPI Calls" but doesn't seem to make a difference.

Regards, Warren

Former Member
0 Kudos

Raj,

Thanks for your explanation - it worked fine but I didn't quite understand all the various pieces of information that I had to enter. Do you have any documentation explaining this? The SAP Help is more of a reference than a working example.

Thanks, Warren

justin_santhanam
Active Contributor
0 Kudos

Warren,

Take ur scenario itself as an example. Now shoot ur questions we will discuss and will try to give the best I can.

raj.

Former Member
0 Kudos

Hi Raj,

I just saw the option in the Communication Channel to specify Content Coversion. The file will look like the following:

M<tab>01012007<tab>USD<tab>AUD<tab>1.40

M<tab>01012007<tab>USD<tab>GBP<tab>1.40

and so on....

Pretty simple structure.

Regards Warren

justin_santhanam
Active Contributor
0 Kudos

Warren,

The solution is pretty simple. According to ur structure create Datatype with five fields something like below

Records -- 0..Unbounded

--Field1

--Field2

--Field3

--Field4

--Field5

Then in the sender adapter apply the conversion parameters. Please refer the links provided above. Since u've tab space u can follow the below blog on how to specify TAB parameters

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

If u've any doubts, plz reply back.

raj.

Former Member
0 Kudos

Hi Raj,

The scenario is File->BAPI. So XI will pick up the file (flat) and map the source to the target fields in the BAPI structure. So I'm wondering if XI will allow me to use a flat file?

Regards, Warren

justin_santhanam
Active Contributor
0 Kudos

Warren,

Of course u can. You have to use content conversion in sender file adapter which converts the csv to xml file. Then the usual stuff mapping to BAPI structure.

If you could tell us how ur csv file looks like then we can suggest the solution.

raj.

Former Member
0 Kudos

Hi Warren,

Yes, XI allows to pick a flat file from the source.

then you can map the source structure with the target fileds.

Regards,

MK

Former Member
0 Kudos

Hi,

As suggested you need to go for file content conversion if ur file is CSV format.

Can you please go through the below web log and do the configuration in File adapter.

FCC

Ref:

Sender -

/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1

Key value:

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

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

/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter -/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

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

Thnx

Chirag

justin_santhanam
Active Contributor
0 Kudos

Warren,

Are u getting the same csv file from the source and wish to move to other location? Or you are getting XML as source and wish to convert csv file?

If the source and target are csv then there is no problem no need for any conversion, u can send it directly.

If the source is xml and the receiver is csv then u need to do content conversion in receiver adapter.

For second case, plz wait lot of links will be provided by our forum mates...

raj.