on 02-15-2008 8:32 AM
Hi Folks,
please, i need a step by step Solution for calling Value Mapping with XSLT Mapping Program.
best regards Michael
I know this is old, but can you share where you found the ValueMappingAccessor class?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Friends four your answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashok ,
thanks for your answer, i think that's a good way.
But from where i get the Class ValueMapping Accessor?
Sorry, but i am a beginer with XSLT and JAVA.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Michael,
In XSLT mapping, your Source message structure and the XSL mapping are important. The Target message structure is not, and can be defined with a dummy structure.
The Source structure can be defined with data types, message types; or can be loaded using .XSD.
XSL mapping can written if you know XSL, or use Altova MapForce to produce. MapForce tool may not be conformed to SAP standard. Check it by run Test in Interface Mapping.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check belo links they may help u out.
XSLT Mapping
/people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping
/people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
Value mapping
/people/community.user/blog/2007/01/08/valuemapping-using-the-graphical-mapping-tool
Regards,
Phani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
XSLT call Value Mapping
Maintain the value mapping using the option available in the Integration directory. The following values should be entered for maintaining the value mapping. In the XSLT Mapping use the Java function Valuemappingaccessor to read the values from the table.
Class ValueMappingAccessor
This class is used read the Value mapping stored in the Integration server (Java Cache). Class has a method getValueMapping. The Class is imported into the SWC Eyyy_xxxx under namespace http://xxx.ash.com/COMMON/Common
Method public static String getValueMapping(String srcContext, String dstContext, String srcAgency, String srcSchema, String dstAgency, String dstSchema, String key, Map inputParam, String throwException)
Paramters Description
srcContext Source context in the Integration server (Java Cache) under which, the value is stored.
For example, if the source values are stored using standard Value mapping table in the ID, then use source context as http://sap.com/xi/XI
dstContext Destination context in the Integration server (Java Cache) under which the value is stored
For example, if the source values are stored using standard Value mapping table in the ID, then Target context as http://sap.com/xi/XI
srcAgency Source Agency, a unique identifying value, value to be used is not yet decided.
srcSchema Source Schema, For example this can be source field name
key Source field value, that is required to determine the target, In the figure 1 shown below, We need to send IN to get India
dstAgency Destination Agency, a unique identifying value, value to be used is not yet decided
dstSchema Destination Schema, For example this can be target field name
inputParam Mapping transformation constants, to write the trace into the header of the message
throwException An indicator to throw an exception, if the value is not found in the cache. If the parameter is set to true or TRUE, an exception is raised & message fails in the mapping step of the Pipe line.
Returns the value, that is stored in the Value mapping context for the given parameters
If the value mapping is maintained using Integration Directory value mapping, then we need to call the value mapping function as follows
If it has to be called using XSLT Mapping., then the sample code shows how to use the java class the java class ValueMappingAccessor.
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://www.ashok.com/idoctofile/employee" xmlns:ValueMap="java:com.xxx.yyy.ValueMappingAccessor">
<xsl:param name="CountryCode">
<xsl:value-of select="ns0:MT_EMPDETAILS/Country"/>
</xsl:param>
<xsl:param name="inputparam"/>
<xsl:template match="/">
<ns0:MT_EMPADDRESS xmlns:ns0="http://www.ashok.com/idoctofile/employee">
<EmployeeNo>
<xsl:value-of select="ns0:MT_EMPDETAILS/EmployeeNo"/>
</EmployeeNo>
<FirstName>
<xsl:value-of select="ns0:MT_EMPDETAILS/FirstName"/>
</FirstName>
<LastName>
<xsl:value-of select="ns0:MT_EMPDETAILS/LastName"/>
</LastName>
<Address1>
<xsl:value-of select="ns0:MT_EMPDETAILS/AddressLine1"/>
</Address1>
<Address2>
<xsl:value-of select="ns0:MT_EMPDETAILS/AddressLine2"/>
</Address2>
<City>
<xsl:value-of select="ns0:MT_EMPDETAILS/City"/>
</City>
<State>
<xsl:value-of select="ns0:MT_EMPDETAILS/State"/>
</State>
<Country>
<xsl:if test="function-available('ValueMap:getValueMapping')">
<xsl:value-of select="ValueMap:getValueMapping('http://sap.com/XI/xi', 'http://sap.com/XI/xi', 'Canonical','Country', 'KCRS', 'Country', $CountryCode, $inputparam, 'TRUE')"/>
</xsl:if>
</Country>
<ZipCode>
<xsl:value-of select="ns0:MT_EMPDETAILS/Zipcode"/>
</ZipCode>
</ns0:MT_EMPADDRESS>
</xsl:template>
</xsl:stylesheet>
If the values are maintained using Value mapping replication technique
Edited by: Ashok Reddy Thatigutla on Feb 15, 2008 9:43 AM
Edited by: Ashok Reddy Thatigutla on Feb 15, 2008 9:44 AM
Edited by: Ashok Reddy Thatigutla on Feb 15, 2008 10:06 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Refer the below two links for better understanding.
Thnx
Chirag
Hi,
U can go through this blog
/people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Please go through below links
SAP Network Blog: Design time Value-mappings in XSLT
/people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
Generic XSLT Mapping for SAP XI,
SAP Network Blog: xpath functions in xslt mapping
/people/prasadbabu.nemalikanti3/blog/2006/03/30/xpath-functions-in-xslt-mapping
How To Perform Value Mapping - A Walkthrough
Thanks
Swarup
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.