Skip to Content
0

Is it mandatory to import xml or xsd for csv to xml convertor

Jul 18, 2017 at 07:01 AM

75

avatar image

I am using scenario sftp to odata. In sftp i have to pick csv file but in mapping it shows error because mapping didn't understand csv, so i use csv to xml convertor. So is it mandatory to add xml/xsd in convertor path. Is there any alternative to accept csv file or i have to make xml/xsd file everytime for csv file.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Sriprasad Shivaram Bhat Jul 18, 2017 at 07:21 AM
0

Hello Siddharth,

Message Mapping accepts input data only in XML format.If you want to do transformation using message mapping it is mandatory to convert the CSV to XML.

You can leverage CSV to XML Converter to achieve the same and its mandatory to pass schema [ XSD ]of output message you want in converter.

Regards,

Sriprasad Shivaram Bhat

Show 3 Share
10 |10000 characters needed characters left characters exceeded

To add, Mapping also supports EDMX in addition to XSD.

Regards,

Gayathri

1

Thanks,

i am using scenario where sftp will pick csv file everyday and send to odata side.
1. In csv to xml converter, we have to upload xml/xsd file on everyday basis or its just a one time activity?

2. Also in converter we have to upload just structure xsd created in SAP PI datatype no values or it contains value too?

0

Hi Sidharth,

1. In your modeling you need to include the conversion step if your runtime input message format is CSV, so that the conversion happens for every message.

2. You have to provide the XML schema.

Regards,

Gayathri

0
Sidharth Mehta Jul 19, 2017 at 05:19 AM
0

Thanks!!..
if we are using sftp to odata scenario, picking csv from sftp, mapping not required and in odata we want payload in json, so we have to add csv to xml convertor and xml to json convertor before odata adaptor or just sftp adaptor and odata adaptor and in odata payload format select json without using convertors.

Show 5 Share
10 |10000 characters needed characters left characters exceeded

Yes Siddharth.

First you have to convert from CSV to XML and then XML to JSON before passing it to receiver channel.

Or else if you have very good hands on with JAVA Script or Groovy you can have Script step and write the required script.

Regards,

Sriprasad Shivaram Bhat

1

Thanks,

i am using scenario where sftp will pick csv file everyday and send to odata side.
1. In csv to xml converter, we have to upload xml/xsd file on everyday basis or its just a one time activity? 2. Also in converter we have to upload just structure xsd created in SAP PI datatype no values or it contains value too?

0

Hello Siddharth,

Its one time and very similar to how we use to create DataType and Message Type ( we just bypass those 2 objects and starts with Schema directly ).

https://archive.sap.com/discussions/thread/3840352

Regards,

Sriprasad Shivaram Bhat

0
Sriprasad Shivaram Bhat

HI Sriprasad,

I got your point, and your points in this url clear my doubts.
but one last thing i want to clear from you that,
same csv file is pass from sftp everyday, format structure will remains the same, but only value will change, so in csv to xml converter, target path xsd field in it i have to create xsd/xml file everyday for csv or its just one time activity?

0

Hello Siddharth,

Its just one time activity.

Regards,

Sriprasad Shivaram Bhat

0