cancel
Showing results for 
Search instead for 
Did you mean: 

'nl' Not Working for fieldSeparator in File Content Conversion

Former Member
0 Kudos

I have a receiver communication channel where I want to create a file with each field being a new line. The xml (Message Protocol: File) output looks like this:

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

<ns0:complus_receiver_messageType xmlns:ns0="http://graybar.com/test/complus_rec

eiver"><cp><myrequest>AAFADFASFADFADSFDASFADFAAA</myrequest><myheader>DELADV</myheader></cp></ns0:complus_receiver_messageType>

When I turn on Message Protocol of File Content Conversion, and follow the SAP documentation on the parameters, the 'nl' is getting sent literally.

- I have Recordset Structure of: cp

- I have content conversion parameters of:

cp.fieldSeparator 'nl'

cp.fieldNames myrequest,myheader

cp.addHeaderLine 0

My file output looks like this:

AAFADFASFADFADSFDASFADFAAA'nl'DELADV0001

Note that the 'nl' is not processing as a new line. Ideas?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Receiver FileContent conversion params dosen't have <b>fieldNames</b>

cp.fieldNames myrequest,myheader

so why don't u remove this and try once again...

Recordset Structure of: cp

cp.addHeaderLine 0

cp.fieldSeparator 'nl'

Hope this weblog helps you...

/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

Cheers,

Siva Maranani.

Former Member
0 Kudos

same result when removing the fieldNames parameter

Former Member
0 Kudos

I figured it out. If I use '0x0A' instead of 'nl', it works as desired.

Former Member
0 Kudos

Keith,

just out of curiosity: Which JDK is your XI AF running on and which value does its "line.separator" system property have (which the File Adapter uses when writing a lin end)?

Thanks,

Thilo

MichalKrawczyk
Active Contributor
0 Kudos

Hi Keith,

can you try:

cp.fieldSeparator nl

Regards,

michal

Former Member
0 Kudos

This just sends the literal nl to the output.

AAFADFASFADFADSFDASFADFAAAnlDELADV0001

MichalKrawczyk
Active Contributor
0 Kudos

hi,

this might be a little strange suggestion but have you tried:

cp.fieldNames myrequest,myheader

cp.fieldSeparator 'nl'

Regards,

michal

Former Member
0 Kudos

same result

I was wondering if the 'nl' only applies to endSeparators but could not find that anywhere.