Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to insert new line break in XSLT mapping

Hi experts,

I am doing file to mail scenario, i am sending the text file as an attachment using reciever mail adapter.

I did everything, i can able to send the mail with text file attachment, but with in the file i got multiple rows, i need to put line break in XSLT mapping.

I did use following statement but it is inserting small rectangle between the records, the records are not separating with new lines, all are in one line.


note: in real coding replace * with &

Can anyone suggest me how to insert new line in XSLT mapping.

My XSLT mapping as look like:

<?xml version='1.0'?>

<xsl:stylesheet version="1.0" xmlns:xsl=""


<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>

<xsl:variable name="break">&lt;br/&gt;</xsl:variable>

<xsl:variable name="space"> </xsl:variable>

<xsl:variable name="newline"><xsl:text></xsl:text></xsl:variable>

<xsl:template match="/">

<ns1:Mail xmlns:ns1="">

<Subject>Please Check Attached Direct Debit File</Subject>





<xsl:for-each select="MT_SapIsuToABSA_DirectDebitFile/DirectDebitRec/Body">

<xsl:value-of select="Space1"/>

<xsl:value-of select="Cust_AccNo"/>

<xsl:value-of select="Reserve_1"/>

<xsl:value-of select="Cust_Name"/>

<xsl:value-of select="Cust_Name1"/>

<xsl:value-of select="Cust_Bank_AccNo"/>

<xsl:value-of select="Space2"/>

<xsl:value-of select="Cust_Bank_BranchNo"/>

<xsl:value-of select="Reserve_2"/>

<xsl:value-of select="Space3"/>

<xsl:value-of select="Cust_AccNo_1"/>

<xsl:value-of select="Space4"/>

<xsl:value-of select="Reserve_3"/>

<xsl:value-of select="Deduction_Amnt"/>

<xsl:value-of select="Space5"/>

<xsl:value-of select="Reserve_4"/>

<xsl:value-of select="Space6"/>

<xsl:value-of select="Action_Date"/>

<xsl:value-of select="Space7"/>

<xsl:value-of select="Reserve_5"/>


note: in real coding replace * with &






Kind regards,


Former Member

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question