Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Receiver File Adapter: Problem with NewLine Content Conversion Parameter

Hello Everybody

On our SAP-XI (SAP NetWeaver 2004s, sp14) I have the scenario to send a price catalogue (IDoc PRICECATALOGUE.PRICECATALOGUE02) from SAP R/3 as csv PRICAT file to a file share.

In the receiver communication channel I have defined

Message Protocol = File Content Conversion

using the following RecordSet:

RecordSet = HeaderRow,MainBody

One header row is followed by one or more main body rows. The csv PRICAT message format demands that there is an empty row (i.e. one carriage return) between header and main body and another carriage return after the last main body row:

<Header Row>
carriage return
<MainBody 1>
<MainBody 2>
carriage return

As content conversion parameters I tried to use NewLine ('nl') to create the carriage returns in the file:

HeaderRow.fieldSeparator = ,
HeaderRow.endSeparator = 'nl'     " new line
MainBody.fieldSeparator = ,
MainBody.endSeparator = 'nl'

Using the settings I have been able to created the carriage return at the end of the file but not the one between header and main body.

As workaround I have used the following approach:

" Add the following XSLT mapping between header and body:

                    <xsl:value-of select=" '' "/>

RecordSet and parameters have been changed accordingly:

RecordSet = HeaderRow,SeparatorLine,MainBody

HeaderRow.fieldSeparator = ,
HeaderRow.endSeparator = 'nl'   
SeparatorLine.fieldFixedLength = 0,0   " sic!  
MainBody.fieldSeparator = ,
MainBody.endSeparator = 'nl'

Has anybody an idea why I failed to receive the first carriage return and has somebody a more elegant solution?

Kind Regards


Not what you were looking for? View more on this topic or Ask a question