Skip to Content
avatar image
Former Member

ABAP Mapping Pretty Print

Hi Everybody,

I have an issue with linefeed in ABAP Mapping.The ouput document generated by ABAP Mapping is as follow:

<?xml version="1.0" encoding="utf-8" ?<Header Node><T_H><SEND_ID value="XYZ"/>

<REC_ID value="PQR"/>

<DATE value="2007"/>

</T_H>

<O_H><L_NO value="252517"/>

<W_NO value="298"/>

<U_NO value="298"/>

</O_H>

</Header Node>

If we can see the above payload, i have the <Header Node> coming in the same line as that of the utf-8 and also the subnode <T_H> starting in the same line and its first field <SEND_ID > in the same line.The same is repeating for the second subnode <O_H>. I want to do a pretty print for this payload.I have used the method <b>set_pretty_print( )</b> in the ABAP Mapping, but there is no effect of this on the output.

To make it clear let me give the required output Xml

<?xml version="1.0" encoding="utf-8" ?

<Header Node>

<T_H>

<SEND_ID value="XYZ"/>

<REC_ID value="PQR"/>

<DATE value="2007"/>

</T_H>

<O_H>

<L_NO value="252517"/>

<W_NO value="298"/>

<U_NO value="298"/>

</O_H>

</Header Node>

Can anybody help me out on this.

Thanks & Regards,

Zabiula

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 07, 2007 at 09:47 PM

    Insert a new line character as per the ABAP rules in the generated XML. It is normally "/n" for microsoft based languages. Not sure what it is in ABAP. May be an ABAPer must be able to help you.

    VJ

    Add comment
    10|10000 characters needed characters exceeded