cancel
Showing results for 
Search instead for 
Did you mean: 

create a new line in the xml-header structure.

Former Member
0 Kudos

Hi,

Can any one tell me how to create a new line in the xml-header structure.

I am doing a IDOC-XI-HTTP scenario.

Actually my mapping create this file:

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

<ORDERS05>

<IDOC BEGIN="1">

<EDI_DC40 SEGMENT="1"> </b>

…….

The result must look like this.

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

<ORDERS05>

<IDOC BEGIN="1">

<EDI_DC40 SEGMENT="1"> </b>

…….

Thanks and Regards,

Eren

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Eren,

your req can not be done by graphical msg mapping.......

you need to make a custom J2EE adapter module for inserting a blank line....then yu will deploy it in XI and then in file adapter you will call this J2EE adpter module..Then your this req will be met.

Thanks,

Rajeev Gupta

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>you need to make a custom J2EE adapter module for inserting a blank

and where do you put this adapter module in case of IDOC and HTTP adapter?

it has to be done in a mapping I believe

Regards,

michal

Former Member
0 Kudos

Michal,

cant we have a XSD with blank line it and import and use it.

bhavesh_kantilal
Active Contributor
0 Kudos

Nope it wont work.You XSD might contain a blank space, but internally it will not create a blank space.

I am just wondering why a blank line is needed though? Can you throw more light on why a blank line between the XMl declaration and root node is needed?

Regards

Bhavesh

Former Member
0 Kudos

ok thank you bhavesh

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

thanks for you quick answer.

I found a xsl script.

It works fine.

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

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml" indent="yes"/>

<xsl:template match="*">

<xsl:param name="depth">0</xsl:param>

<!-- New line with indenting. -->

<xsl:if test="$depth > 0">

<xsl:text> </xsl:text>

</xsl:if>

<xsl:text>&#xA;</xsl:text>

<xsl:element name="{name(.)}">

<xsl:for-each select="@*">

<xsl:attribute name="{name(.)}"><xsl:value-of select="."/></xsl:attribute>

</xsl:for-each>

<xsl:apply-templates>

<xsl:with-param name="depth" select="$depth + 1"/>

</xsl:apply-templates>

</xsl:element>

</xsl:template>

</xsl:stylesheet>

Best regards

Eren

Former Member
0 Kudos

HI,

as explained above , it may not be possible. or try to create the enhanced data type to add one field , mapp with empty constant ..

try

Chilla

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

you cannot do that with message mapping (if that was your question)

you will need to use some other sort of mapping

(abap, XSLT, java) to do that

Regards,

michal