cancel
Showing results for 
Search instead for 
Did you mean: 

Unwanted characters in csv file after content conversion SFTP Receiver

0 Kudos

Hello everyone,

i have the following Payload in a SFTP Receiver Communication Channel,

it's an XML to CSV Scenario:

________________________________________________________________

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

-<ns2:MT_StockTransfer xmlns:ns2="http://abcd.com/Z_abcd/StockTransfer">

<ID>732160904732160901732160900</ID>

<filename>shop_732160904_732160901_732160900_20170829131443</filename>
-<StockTransfer>

<SupplierGLN>732160904</SupplierGLN>

<FromLocationGLN>732160901</FromLocationGLN>

<ToLocationGLN>732160900</ToLocationGLN>

<PostingDate>20170829</PostingDate>

<ArticleNo>7325861092944</ArticleNo>

<Quantity>2</Quantity>

</StockTransfer>

</ns2:MT_StockTransfer>

___________________________________________________________________

I used the following Recordset Structure:

ID,filename,StockTransfer

and the following names / values

StockTransfer.addHeaderLine = 0

StockTransfer.endSeparator = 'nl'

StockTransfer.fieldSeparator = ;

filename.absoluteRowWidth = 0

filename.fieldFixedLengths = 0

filename.fixedLengthTooShortHandling = Cut

filename.endSeparator = ‘0‘

ID.fieldFixedLengths = 0

ID.fixedLengthTooShortHandling = Cut

ID.endSeparator = ‘0‘

____________________________________________________________________

The result is:

How can i remove the double '0' at the front of the output?

If i didn´t enter the ID.endSeparator and the filename.endSeparator two line breaks will appear.

Can somebody help ?

Thanks in advance.

Daniel

weberpat
Contributor
0 Kudos

How do you want your output to look like?

0 Kudos

Hi Patrick,

like this:

weberpat
Contributor

Thanks for clarifying. Then you'll want to remove the first two elements by following Evgeniy's suggestion or not creating them in your mapping in the first place (in case you even have a mapping in your scenario).

Regards,

Patrick

Accepted Solutions (1)

Accepted Solutions (1)

former_member190293
Active Contributor
0 Kudos

Hi Daniel!

In this case you could try to remove unwanted elements from message using RemovePayloadValueBean:

https://help.sap.com/saphelp_nw73ehp1/helpdata/en/45/da2239feb22e98e10000000a155369/frameset.htm

Regards, Evgeniy.

0 Kudos

Thanks a lot Evgeniy, this works fine for me.

Regards, Daniel.

Answers (1)

Answers (1)

former_member190293
Active Contributor

Hi Daniel!

If I understand your requirement right, you need to output just "StockTransfer" element's contents?

If so, what happens, if you define only that element in Recordset structure?

Regards, Evgeniy.

0 Kudos

Hi Evgeniy,

> If I understand your requirement right, you need to output just "StockTransfer" element's contents?

Yes, that's right.

> If so, what happens, if you define only that element in Recordset structure?

I tried, but if they are not part of the Recordset structure two line breaks appear on the top of the output.