cancel
Showing results for 
Search instead for 
Did you mean: 

csv throw pi to mssql

Former Member
0 Kudos

Hello!

I have a task to transfer zipped csv file from local computer to MS SQL 2005 throw PI(7.11). I can't use FTP or NFS so i decide to use soap. And i'm stuck on adapter config. I visit many links, but still can't convert my csv file. Even if i use FILE2XMBWITHSTRUCTURECONVERSION or FILE2XMBWITHROWCONVERSION on PI i always have a csv, not xml.

This my source csv

one,two,three,four,

This is my adapter config

classname=com.sap.aii.messaging.adapter.ModuleFile2XMB

version=30

PWD.tokenHandler=PWtokens

mode=FILE2XMBWITHSTRUCTURECONVERSION

XI.TargetURL=http://<!%pi71server%!>:<!%pi71port%!>/XISOAPAdapter/MessageServlet?channel=:Sender:cc_s_mssql

XI.User=<!%pi71username%!>

XI.Password=<!%pi71password%!>

XI.QualityOfService=EO

XI.SenderService=Sender

XI.Interface=si_i_csv

XI.InterfaceNamespace=urn:s.ru:Learning:S

file.type=BIN

file.encoding=UTF-8

file.sourceDir=C:/Base/exchange/pi71outbound/PriceChange/Send2XI

file.sourceFilename=*.zip

file.processingMode=archiveWithTimeStamp

file.archiveDir=C:/Base/exchange/pi71outbound/PriceChange/Archive

file.retryInterval=20

file.pollInterval=5

xml.documentName=<ns:S xmls:ns="urn:s.ru:Learning:S">

xml.recordsetName=Data

xml.recordsetStructure=item,1

xml.item.fieldNames=one,two,three,four

xml.item.fieldSeparator=,

In PI i have:

http://98.r.photoshare.ru/00982/0095fb3667a81b89cf325850a8f0a3c832a2e299.jpg

What i'm missing? May be better solution for this task exist?

Thanks!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Denis,

If you just want transfer ZIP file, you can follow that :

http://scn.sap.com/people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-wit...

Regards,

Guislain

Former Member
0 Kudos

That's great, thank you. But. I have to process zipped csv file on MSSQL side. It should create new tables from it. I'm not sure that i can do it using this way.

Former Member
0 Kudos

Did you try with different test file ? I mean, Did you try to process unzip file ?

Sometimes it's due to an invalid charcters.

Former Member
0 Kudos

I understand my fault. I'm trying to convert file and only after that i'm unzipping. So i don't have converted file.

I should think how to unzip it before conversing or smth else.

Former Member
0 Kudos

can't you make it in two steps i.e one for local computer to app server and another for delivering to ms-sql...

Former Member
0 Kudos

I'm trying. But stuck on first step. My file succesfully delivered to server, but isn't converted in xml for next step - delivering to ms-sql. I understand that i forgot smthg, but can't understand what exactly.