Skip to Content

Xslty mapping

Hi all,

can we increment a variable in the xsl mapping program each time it is executed?

Regards,

Archana

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jun 02, 2006 at 08:53 AM

    Hi Archana,

    Every Interface run in XI is going to be independent of the other. So you cannot have any such global variable unfortunately.

    So, one option would be to have an entry in an ABAP table, and then use an RFC make an RFC call to increment the table value and so on.

    Regards,

    Bhavesh

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 02, 2006 at 08:54 AM

    Hi Archana,

    yes you can do that. With a recursiv template, for example: [code]

    <xsl:template match="/">

    <xsl:call-template name="zaehler">

    <xsl:with-param name="i" select="1"/>

    <xsl:with-param name="imax" select="5"/>

    </xsl:call-template>

    </xsl:template>

    <xsl:template name="zaehler">

    <xsl:param name="i"/>

    <xsl:param name="imax"/>

    <xsl:value-of select="$i"/><br />

    <xsl:if test="$i &lt; $imax">

    <xsl:call-template name="zaehler">

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

    <xsl:with-param name="imax" select="$imax"/>

    </xsl:call-template>

    </xsl:if>

    </xsl:template>[/code]

    Regards,

    Udo

    Add comment
    10|10000 characters needed characters exceeded