cancel
Showing results for 
Search instead for 
Did you mean: 

FIle *.XML to *.CSV

Former Member
0 Kudos

Hallo,

I send a *.xml file to XI and then to BW. The File-Structure is:

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

<ns:PlaintMaintenanceMessagetype xmlns:ns="http://doehler.com/sapxi/krausdemosender">

<Datasource>6ATESTDEMOYVES</Datasource>

<Data>

<item>

<EpuipmentID>1234</EpuipmentID>

<FunctionalLocation>Limo</FunctionalLocation>

<Data>20060105</Data>

<Time>122030</Time>

</item>

</Data>

</ns:PlaintMaintenanceMessagetype>

that is ok.

My question is how can I transform the structure of the *.xml in a structure of *.csv where I can send to xi and then to BW.

Can anybody help me?

thanks yves

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

Hi Kraus,

I guess you have a scenario in XI already developed, which accepts xml input and the processing is based on this.

Now the sender system has changed their output format and are sending you data in csv format.So you do not wish to touch your developed XI thing and want that you still pass xml input to XI since changing it for accepting csv format would involve lot of time/effort.

We had something like this and we had opted for XSLT stylesheets for the conversion(though it was not the same as above).Java is also a good option.

Regards,

Sulakshana

STALANKI
Active Contributor
0 Kudos

why u want csv-xml before sap xi?

STALANKI
Active Contributor
0 Kudos

Allesandro is right.If it is input file then you have to use file cc and follow the blogs refered by them which will helpful to convert csv into xml.

Former Member
0 Kudos

Hi,

This will solve i guess, Let me check if i got the scenario correct CSV --> XML BY SAP XI am i correct?

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

Input(csv): Given in weblog.

Follow Content conversion of File adapter as every one has mentioned.

Output(xml): As shown in the blog.

Does this help you?

Regards,

Anirban.

Former Member
0 Kudos

The szenario ist csv --> xml without sap xi then xml to sap xi!!

Former Member
0 Kudos

Hi,

I guess then you have to use a 3rd party tool like stylus studio (http://www.stylusstudio.com) etc to convert csv to xml, then xml -- > SAP XI.

http://www.stylusstudio.com/csv_to_xml.html

former_member184154
Active Contributor
0 Kudos

Yeah, you can do csv to xml conversion with whatever you want: Java, C, C++, Delphi, VB, notepad...

But for what strange reason you should do this task externally when you have adapters in XI to do this specific job?!?!?

Former Member
0 Kudos

hi,

where can I find these Content Conversion parameters?

How can i send csv to sap xi, what must i change to send xml to sap xi. What are the varieties from both possibilities?

thanks yves

Former Member
0 Kudos

Hi,

For content conversion and for sending csv to xi see

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

Regards,

Anirban.

Former Member
0 Kudos

hi,

but i can not find these content conversion Parameters!

yves

Former Member
0 Kudos

Hi,

Its in the first screen shot,(Its an example for you) even if it does not help please send the csv .

Anirban.

Former Member
0 Kudos

Hi,

I send the file with the J2SE-Adaper Engine, this not the same?

yves

Former Member
0 Kudos

Hi,

Select the message protocol as File content conversion and not as File.

the you will be able to see the table control.

regards,

Sulakshana

former_member91687
Active Contributor
0 Kudos

Hi Kraus,

This link should help you out:

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

Regards,

Chandra

STALANKI
Active Contributor
0 Kudos

you can create the XSD in the data type editor and then use it.Is there any specific need to convert to xml to csv?I fail to understand why you require to do that?

former_member184154
Active Contributor
0 Kudos

Again, the requirement is not clear. You have do deal with xml format to do a reasonable mapping in XI. Then you'll probably want to convert to csv...

Just try to describe the <b>business need</b>.

Former Member
0 Kudos

Hallo,

i have a big file *.csv from a system. I want to bring it to sap xi, with a file adpter. Then i need the structure what sap xi understanding.

My question how I can bring this structure:

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

<ns:PlaintMaintenanceMessagetype xmlns:ns="http://doehler.com/sapxi/krausdemosender">

<Datasource>6ATESTDEMOYVES</Datasource>

<Data>

<item>

<EpuipmentID>1234</EpuipmentID>

<FunctionalLocation>Limo</FunctionalLocation>

<Data>20060105</Data>

<Time>122030</Time>

</item>

</Data>

</ns:PlaintMaintenanceMessagetype>

diplayed in *.csv !!

yves

former_member184154
Active Contributor
0 Kudos

<b>But CSV is your input or your output???</b>

If it's input, use file content conversion for sender file adapter to bring csv to xml, map in xi, and then if you need to output again on csv use again file content conversion for receiver file adapter.

Former Member
0 Kudos

Hi,

Use File Content Conversion in the outbound(sender) file adapter.This(Adapter Engine) will convert the csv structure into desired xml structure depending on the configuration parameters u give.

Regards,

Sudharshan

Former Member
0 Kudos

Hi,

I think this weblog will solve the issue, please use file content conversion for xml> FCC(xi)>CSV as you want.

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

Regards,

Anirban.

former_member184154
Active Contributor
0 Kudos

Use file content conversion for Receiver File Adapter, look <a href="http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm">here</a> for details.

But I think you can find more interesting way to go to BW with XI. Check out sdn: search "XI BW" and find a lot of stuff.

Regards,

Alex

Former Member
0 Kudos

Hi,

that not the question, i will transform the *.xml file befor I send it to SAP XI! I will not transform it with SAP XI!

thanks yves

former_member184154
Active Contributor
0 Kudos

??

Sorry I don't understand the purpose.

Can you clarify, pls?

Former Member
0 Kudos

hi,

my problem is to bring the structure:

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

<ns:PlaintMaintenanceMessagetype xmlns:ns="http://doehler.com/sapxi/krausdemosender">

<Datasource>6ATESTDEMOYVES</Datasource>

<Data>

<item>

<EpuipmentID>1234</EpuipmentID>

<FunctionalLocation>Limo</FunctionalLocation>

<Data>20060105</Data>

<Time>122030</Time>

</item>

</Data>

</ns:PlaintMaintenanceMessagetype>

in the structure of a *.csv with editor or something else!

Here is my problem, what are the structure of the *.csv, that the xi mapping understanding the file.

yves