Skip to Content
avatar image
Former Member

Unwanted characters in csv file after content conversion SFTP Receiver

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

rptf6.png (3.5 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Aug 30, 2017 at 07:15 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 29, 2017 at 05:17 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

      rdp3u.png (3.0 kB)