cancel
Showing results for 
Search instead for 
Did you mean: 

UDF in XSLT Mapping.

Former Member
0 Kudos

Hi,

Can I use a UDF in XSLT mapping. If yes, can anyone please guide me in the issue. When I searched the forum there is a discussion related to the attachment of Java classes to the XSLT mapping. Does this replace the use of a UDF ? Instead, can we opt for a Java Mapping. Which will be of more help? Kindly suggest your opinions with relevant explanation. Thank you very much for your time.

Krishna.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

You cannot use UDF in XSLT mapping. Instead you can create java functions and import as .jar in imported archives. Those imported java functions can be used in xslt mapping.

You need to Specify the class and function in the XSLT program as follows.

<?xml version="1.0"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ValtrimCase="java:com.ehro.eds.ValueChecker">

<xsl:param name="C_Addresstype">

<xsl:value-of select="CURRENT/ADDRESS_TYPE"/>

</xsl:param>

<ns0:type>

<xsl:if test="function-available('ValtrimCase:ChngLcase')">

<xsl:value-of select="ValtrimCase:ChngLcase($C_Addresstype)"/>

</xsl:if>

</ns0:type>

Thanks,

Former Member
0 Kudos

Hi,

Follow this link. It explains with an example:

http://help.sap.com/saphelp_nw04/helpdata/EN/55/7ef3003fc411d6b1f700508b5d5211/content.htm

XSLT Mapping with Java Enhancement

Reward points for the useful answers

Regards

Arpil

0 Kudos

Hi,

You cannot use UDF in XSLT mapping. Instead you can create java functions and import as .jar in imported archives. Those imported java functions can be used in xslt mapping.

refer:

XSLT mapping with java enhancements for more details

http://help.sap.com/saphelp_nw04/helpdata/en/0f/80243b4a66ae0ce10000000a11402f/frameset.htm

Thanks,

Jayanth