on 07-11-2007 12:07 PM
Hi,
Could somebody tell me if i can embed a static function (ABAP) in an XSLT.
Thanks in advance
Rachana
Hi,
Thanks a lot and this should help me. But I'm not that well-versed in XSLT.
Hence,
I'm getting an xml namespace not defined error now.
my XSLT looks like this
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:strip-space elements="*"/>
<xsl:output indent="no"/>
<xsl:template match="TaskType">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<TASKTYPEDESIGN>
<SBTM_CR_TT_DESIGN>
<ORIGINAL_LANG>
<xsl:value-of select="../@origLang"/>
</ORIGINAL_LANG>
<sap:call-external class="CL_SBTM_XML_CONVERSION" method="GET_SYLANGU">
<sap:callvalue param="EXTERNAL" select="../@language"/>
<sap:callvariable param="INTERNAL" name="SY_LANG"/>
</sap:call-external>
</SBTM_CR_TT_DESIGN>
</TASKTYPEDESIGN>
</asx:values>
</asx:abap>
</xsl:template>
I tried to fit in that code there...but i guess this is not the way.
please help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
check this online help on calling function modules / methods of class from XSLT program
http://help.sap.com/saphelp_nw04/helpdata/en/76/084e3ce0f9fe3fe10000000a114084/frameset.htm
code snippet (taken from above link) for calling a method
[code]<sap:call-external class="CL_FLIGHT_INFO" method="GET_DETAIL">
<sap:callvalue param="AIRLID" select="string($carr/@code)"/>
<sap:callvalue param="CONNID" select="string(@code)"/>
<sap:callvalue param="FLDATE" select="string(departure/date)"/>
<sap:callvariable param="FLIME" name="duration"/>
<sap:callvariable param="DIST" name="distance" type="number"/>
<sap:callvariable param="UNIT" name="unit"/>
<sap:callvariable param="PLTYPE" name="planetype"/>
<sap:callvariable param="SEATSM" name="seatsmax"/>
</sap:call-external>
[/code]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You mean, you want to call the FM which is R/3 from Program(calls the XSLT) which is in CRM?
If you want to call the FM(From R/3) to CRM(Program which calls the XSLT. Not inside the XSLT),
Create the RFC function module, put the FM which does the date calculation. Then call the RFC FM from CRM with RFC DESTINATION.
CALL FUNCTION 'ZCAL_DATE' DESTINATION....
<b>Reward points</b>
REGARDS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I read somewhere that I can call an R/3 Static function or may be a functional method within an XSLT.Is that possible?
I'm trying to read a language field (which comes as "EN" or "DE" in an XML) into a SPRAS field which is only single character. Is there anyway for em to directly get this done ?
Regards
Rachana
User | Count |
---|---|
8 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.