Skip to Content

MessageTransformBean endSeparator not working

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Jul 08, 2010 at 06:48 AM

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

    Remove endSeparator from your config.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 08, 2010 at 09:16 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 24, 2011 at 06:01 AM

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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.