cancel
Showing results for 
Search instead for 
Did you mean: 

Read .csv file to XI and convert to IDOC

Former Member
0 Kudos

Hi XI Gurus,

We have a requirement at work where we need to import .csv files to XI ehich then XI converts it to xml and posts an IDOC to SAP. I have tried creating this in XI with File Adapter with File Content Conversion.

I gave all the things required for File Content Conversion but still my .csv file is not being picked up and read by XI. Iam not sure why this is happening but can anayone please help me with this.

Also please do let me know if anyone has a tutorial related to this scenario.

Thanks,

Mayuresh.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Just to add to experts advice... Make sure your Sender Agreement exists/correctly configured.

Former Member
0 Kudos

Hi,

Check the status of your communication channel in RWB.

Go to Component Monitoring-Adapter Engine- Communication Channel

Check if there is any error for file content conversion.

Regards,

Pragati

Former Member
0 Kudos

Hi,

As mentioned i went to Runtime Workbench --> Component Monitoring --> Adapter Engine and it says that there are some errors. When i click on Communication Channel Monitoring the page is not displaying. Can you please suggest me what could be the errors in my communication channel?

Your suggestions will be highly appreciated....

Regards,

Mayuresh

Former Member
0 Kudos

>>Can you please suggest me what could be the errors in my communication channel?

It is practically not possible for any of us to "guess" what could be the errors.

You need to check the Communication channel Monitoring to "know" what the errors are.

Former Member
0 Kudos

Hi Mayur,

I guess File doesnt have the access permission . It actually depends on the user (and the access he has)who has placed this file in the source directory . Please check whether this file is getting picked if a different user places the file .

Regards

Vinay P.

Former Member
0 Kudos

Hi All,

I tried checking the error via Run Time Workbench (RWB) and going to Communication Channel Monitoring. It shows that there are some errors in the Communication Channel but when i go inside it does not open an error window for me containing the error details.

Just wanted to explain my file structure and the settings i have done in the 'File Content Conversion' of the 'File Adapter' so that you guys can tell me where i am wrong:

Message Type: VENDOR_MT

VENDOR_MT

VendorNumber

LastName

SearchTerm

Currency

Address

Street

City

Zip

Country

I am using IDOC receiver at the other end (CREMAS.CREMAS03).

CSV File Structure: (Sample)

34567, Reed, Jon, AUD, Smith Street, Melbourne, 3066, AU

The settings that i have used in the File Adapter (Content Conversion tab) are:

RecordSet Structure: VendorNumber, LastName, SearchTerm, Currency, Street, City, Zip, Country

RecordSet Sequence: Ascending

ignoreRecordSetName: true

Vendor_MT.fieldNames: VendorNumber, LastName, SearchTerm, Currency

Vendor_MT.keyFieldValue: 01

Vendor_MT.fieldSeperator: ','

Vendor_MT.endSeperator: nl

Address.fieldNames: Street, City, Zip, Country

Address.keyFieldValue: 02

Address.fieldSeperator: ','

Address.endSeperator: nl

Please do let me know if the communicatioon channel settings i have made are correct. Also let me know if i am missing some major setting.

Thanks,

Mayuresh.

Former Member
0 Kudos

Just to add to my above post i tried changing the loacation of the file where i have access permission but still XI is not able to read my csv file.

Thanks,

Mayuresh.

former_member200962
Active Contributor
0 Kudos
RecordSet Structure: VendorNumber, LastName, SearchTerm, Currency, Street, City, Zip, Country

Address seems to be containing Street, City, Zip, Country.....so should you not specify Address in the above Structure and then Address.fieldNames will have the four nodes.

Just verify your FCC against some blog.

Former Member
0 Kudos

Hi Mayuresh,

The Recordset Structure determines only sequence and sub structure names...but not the structure elements.

According to your structure,

Recordset Structure: Address,1

Follow the link, [http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm]

If this doesn't work, try with, Recordset Structure: VendorNumber,LastName,SearchTerm,Currency,Address.

And according to the csv sample file, there was no Key field that determines the VENDOR_MT and Address Values, as you have mentioned in the Content Conversion Parameters of sender file adapter.

Try this,

VENDOR_MT.fieldName: VendorNumber, LastName, SearchTerm,Currency, Address

VENDOR_MT.fieldSeparator: ,

Address.fieldNames: Stree,City,Zip,Country

Address.fieldSeparator: ,

Address.endSeparator: 'nl'

VENDOR_MT.endSeparator: 'nl'

Please correct if wrong.

Regards,

Prasanna.

Edited by: Prasanna kumari Doddi on Jul 30, 2010 7:07 AM

Former Member
0 Kudos

Hi all,

I tried doing as Prasanna mentioned but still XI is not able to read the csv file. Now i managed to go to RWB and Communication Channel Monitoring and i am getting the following error message:

Conversion initialization failed: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Format error in 'xml.recordset' argument: incomplete structure (name,number) pair

I have already pasted my csv file content and format in the above post it is saying the error is in the 'RecordSet Structure' but i am not able to rectify it.

Can anyone please help me with this.

Thanks in advance.....

Mayuresh.

Former Member
0 Kudos

FCC is case sensitive, so make sure you have not done any typo mistake.

Update:- You did a typo mistake here ignoreRecordSetName: true

You have to use ignoreRecordsetName: true (make S in lower case )

Edited by: Sarvesh Singh on Jul 30, 2010 2:48 PM

Former Member
0 Kudos

Check the .csv file permission .

Does it have read-write-execute permission ? Otherwise XI Couldn't pick up the file.

former_member192295
Active Contributor
0 Kudos

Hi,

I think seems some problem with FCC parameters in communication channel. Check Runtime Workbench component monitoring, this window we can see complete error description.

stefan_grube
Active Contributor
0 Kudos

go to runtime workbench -> Component Monitoring

Click on Adapter Engine and here in detail view open "communication channel monitoring"

check for errors here.

former_member200962
Active Contributor
0 Kudos
I gave all the things required for File Content Conversion but still my .csv file is not being picked up and read by XI.

1) Is proper Directory and FileName configured in the channel?

2) Does the user have rights to read (and delete) the file from the source directory?