on 09-12-2017 4:21 PM
Dear experts,
We are currently moving from PI 7.3 to PO 7.5.
We have a few XSLT maps that are using Java functions.
The Java functions are in a custom Java class. For example we call date functions in order to format date values:
<xsl:stylesheet
xmlns:date="com.edi.eai.xslthelper.date.DateTransform"
...>
<DATUM>
<xsl:value-of select="date:getCurrentDate('yyyyMMdd')"/>
</DATUM>
</xsl:stylesheet>
My question now is: we want to avoid using our custom Java class on PO 7.5, we would like to get rid of it. Are there SAP standard Java classes that we could use to implement such enhancements from XSLT maps?
Thank you for your help.
Best regards,
Peter
If it is about XSLT and date formatting use it like below , we are using it in PI like below.
Declare this namespace :
xmlns:java="http://xml.apache.org/xslt/java"
and define these variable in xslt,
<xsl:variable name="currentDateTime" select="java:java.util.Date.new()"/> <xsl:variable name="messageDateTime" select="java:format(java:java.text.SimpleDateFormat.new('yyyy-MM-dd HH:mm:ss.SSSSSSS'), $currentDateTime)"/>You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Anurag Gupta,
Thank you, that works.
Best regards, Peter
I am glad that it worked 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just out of curiosity : Did you come up with a solution?
I was thinking along the lines of using stuff from the PI / PO Javadoc
But I am not sure if you be able to call stuff from the standard J2EE Server
Cheers
Jens
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.