on 09-12-2006 12:22 PM
Hi,
I have to send an Idoc from SAP to a 3rd party using webservices. The request message( for web service) has 5 inputs.Idoc has to as a first input rest of the inputs are hard coded values.
Now I want the Idoc in the form of a string on the target side.I should map the Idoc with a string type.I wrote a java function and im gonna call this java function in XSLT mapping.So XSLT takes Idoc as input and pass this idoc to java function.
Could you please tell me how do i pass this para meter from XSLT?
Idoc structure is:
<MATMAS04>
<IDOC BEGIN="1">
<EDI_DC40 SEGMENT="1">
<TABNAM>EDI_DC40</TABNAM>
<MANDT>850</MANDT>
<DOCNUM>0000000000670745</DOCNUM>
<DOCREL>640</DOCREL>
TO accept the above idoc as a parameter to XSLT I wrote:
<xsl:param name="IDOC"> <<+++++++++++++++
<xsl:value-of select="//IDOC"/> <<++++++++++++
</xsl:param>
<xsl:template match="/">
..
The lines marked with "<<+++++++++++++++", are im not sure.whether to write the MATMAS04 instead of IDOC ? Im kinda confused could you please help me?.when i execute this interface mapping, im getting "Transformer configuration exception occurred when loading XSLT MappingClass.xsl (http://sonata.com/xi/tm_pro, aa76d240-22f4-11db-90a8-d301ac108104, -1)".
Hi Kiran,
From whatever you have explained, it looks like that you dont need a mapping at all (also explain what your Java function is going to do?). If thats the case, if you place the Java mapping directly in the (IM) Mapping object in IR (without any XSL mapping), the Idoc will be directly passed to the same from R/3, you need not specifically do anything.
Hope this helps
Regards
Vishnu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<xsl:template match="/"> -
> sud come in the begining
....
<xsl:value-of select="//MATMAS04/IDOC/xyx/yy/etc...."/> -
> the field you need
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shabarish,
Thanks a lot for a quick response. Actually i need all the fields of idoc, Could you please tell me ,How can i do that ? and how about param name ? I should use matmas or IDOC as param name ?
<xsl:template match="/">
<xsl:param name="IDOC">
<xsl:value-of select="//IDOC"/>
</xsl:param>
Thanks
Kiran
try ...
<xsl:for-each select="//MATMAS04">
<xsl:apply-templates select="@* | node()"/>
</xsl:for-each>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
This will copy all from your source to target.
Message was edited by: Shabarish Vijayakumar
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.