cancel
Showing results for 
Search instead for 
Did you mean: 

MessageTransformBean endSeparator not working

arijit_mukherjee2
Participant
0 Kudos

Hello Experts,

I have the scenario ECC--> PI7.11----> MQ.

MQ need the flat file instead of XML file. I used MessageTransformBean at receiver JMS adapter.

The XML structure is like:

<records>

<header>

<Fileld1> H1</Field1>

<Field2>H2</Field2>

</header>

<detail>

<Field3>D1</Field3>

<Field4>D2</Field4>

</detail>

<detail>

<Field3>D3</Field3>

<Field4>D4</Field4>

</detail>

</records>

I want file structure like:

H1H2

D1D2

D3D4

But I am getting file with 1 line and the structure like(if I give .endSeparator='\n'):

H1H2'\n'D1D2'\n'D3D4'\n'.

I have used .endSeparator/.beginSeparator for both Header and Detail with 'nl', '\n', '\r\n','0x0a' but still the data is coming with 1 line structure but I need the structure with three lines(1 for header and 2 for detail).

Can any one help me?

Note:Rewards if helpful.

Accepted Solutions (0)

Answers (3)

Answers (3)

arijit_mukherjee2
Participant
0 Kudos

It was having problem with the Receiver System and in Rcv Sys,there was one program which does not takes any new line character..

Former Member
0 Kudos

Hello,

Did you try to use .fieldSeparator 'nl' for <records>? In your case I would also set .recordsetStructure.

Please find some examples below:

http://help.sap.com/saphelp_nw04/helpdata/en/24/4cad3baabd4737bab64d0201bc0c6c/content.htm

Regards,

Radek

stefan_grube
Active Contributor
0 Kudos

If you want a new line as end seperator, you need not declare this, as this is the default.

Remove endSeparator from your config.

arijit_mukherjee2
Participant
0 Kudos

Hi,

Even if I remove endSeparator,it is the same result. Message coming with one line. Are there any other solution?

stefan_grube
Active Contributor
0 Kudos

You could add following module after the messagetransformbean:

SAP XI Sample/ConvertCRLFfromToLF

http://help.sap.com/saphelp_nwpi71/helpdata/EN/96/f04142099eb76be10000000a155106/frameset.htm

arijit_mukherjee2
Participant
0 Kudos

Hi Stefan,

Do we write SAP XI Sample/ConvertCRLFfromToLF or SAP PI Sample/ConvertCRLFfromToLF becasue we are using PI7.11

stefan_grube
Active Contributor
0 Kudos

You write it as described in online help for PI 7.1

arijit_mukherjee2
Participant
0 Kudos

Not working

I have aleready defined recordsetStructure

Edited by: ArijitM on Jul 8, 2010 12:16 PM

Former Member
0 Kudos

Are you sure it's one line? I have a similar scenario, if I open the file in Wordpad it looks like one line but in Notepad I can see the individual lines