on 07-02-2007 9:44 PM
hey,
does any one have steps for performing flat file (.csv) to XML conversion. how is the mapping in the design performed.
kalyan.
the following blog should be helpful
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hey raj,
thanks for the concern, actually i just have an excel file which is obvoiusly a flat file(.csv) and i have to convert it from .csv to xml file and it should be sent from one ftp to other in the process. the ftp part is fine with me but i want the exact process right from IR to ID.
thanks
kalyan.
well if the scenario is CSV to XML,then here are the steps
in IR
->Create data type for sender(DT_sender) and data type for receiver(DT_receiver)
Note:if both the sender and receiver have exactly same structure,then just create one data type.
->create message types for the above data types
->create message interfaces,one will be outbound async and other will be inbound async.
->do message mapping and interface mapping
Note:if both sender and receiver have exact same structure then no need of message and interface mapping.
in ID
->create sender File communication channel,select FCC as message protocol,give the FCC .
->create receiver file communication channel.
->complete sender agreement,receiver agreeement,interface determination,receiver determination
Thanx
Ahmad
Kalyan,
Consider my example, I have input file as csv structure and want it to convert into .xml file thats it.
Input file
J,24
P,22
I want the output file like
<Emp_Details>
<F1>J</F1>
<F2>24</F2>
</Emp_Details>
<Emp_Details>
<F1>P</F1>
<F2>22</F2>
</Emp_Details>
I doesn't know whether the above matches exactly ur reqmt, but there is the option.
Step 1 : Create Scenario & Business service
http://www.flickr.com/photo_zoom.gne?id=699386732&size=o
Step 2: Create sender & receiver comm.channel
http://www.flickr.com/photo_zoom.gne?id=699386698&size=o
http://www.flickr.com/photo_zoom.gne?id=699386664&size=o
Step 3:Create all the objects in ID and cross verify below whether u've created everything.
http://www.flickr.com/photo_zoom.gne?id=699386690&size=o
Step 4: Activate and run the interface.
Your results :
http://www.flickr.com/photo_zoom.gne?id=699386686&size=o
Hope it helps!!!
Best regards,
raj.
hey raj,
i have a doubt, if we dont require IR then how is it possible to create sender agreement, receiver determination etc.. also i have another simple doubt, when we refer the file name in the sender communication channel can we put file.csv in the file name section supposing that file is the actual flat file.
thanks
kalyan.
Message was edited by:
kalyan golla
Message was edited by:
kalyan golla
hey raj,
this is my flat file which is saved as .csv
Adams,James,P,ABC Co.,29 Frankford Rd,Bloomington,IL,60525,708,3525555
Miller,Maria,B,Conrad Corp,1234 Smith St,Buffalo Grove,CA,60089,708,3334567
the final xml should look like this
<ContactFile>
<Contact>
<lastname>Adams</lastname>
<name>James</name>
<middle>P</middle>
<company>ABC Co</company>
<street>29 Frankford Rd</street>
<city>Bloomington</city>
<state>IL</state>
<zip>3322</zip>
<dept>708</dept>
<phone>3525555</phone>
</Contact>
</ContactFile>
.......
......
so my problem is to send the .csv file from one ftp to another ftp converted as xml.
so i am wondering how can we do it without IR.
thanks
kalyan.
Kalyan,
See the below steps you need to achieve the same.
If you are using mapping , then surely u need IR. But here you are juz moving the file thats it. Hence ID part is enough. Trust me, it works!!
<b>Step 1</b>: Create New Scenario - Conversion_Interface
<b>Step 2</b>: Create New Business Service - File_System
Double click on the Business Service and add dummy Outbound/Indbound Interface name & namespace.
<b>Step 3</b>: Create New communication channels
<b>Sender _CC</b>
RecordsetName : ContactFile
Recordset Strcuture : Contact,1
Contact.fieldNames :lastname,name,middle,company,street,city,state,zip,dept,phone
Contact.fieldSeparator: ,
Contact.endSeparator: 'nl'
Rest of the objects create on seeing my picture.
Best regards,
raj.
Kalyan,
<b><i>i have a doubt, if we dont require IR then how is it possible to create sender agreement, receiver determination etc..</i></b>.
See, if you want to create collobaration profiles/agreements , what do u need. Interface names & namespaces am I right?
In the Business Service u are adding dummy Oubound & Inbound Interfaces ,namespaces , is it? Using these interfaces create the objects.
I hope it helps, if not kindly reply back.
Best regards,
raj.
Kalyan,
If you want the exact steps, then follow the below Wiki.
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/flatFILETOFLATFILE&
In the above wiki don't do content conversion in the receiver file adapter.
Rest of the things are same.
Best regards,
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
>>>>does any one have steps for performing flat file (.csv) to XML conversion. how is the mapping in the design performed.
in this case no mapping needs to be involved
you just need to use content conversion in file adapter
and that's all and it will change csv to XML
Regards,
michal
-
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.