cancel
Showing results for 
Search instead for 
Did you mean: 

Data Conversion In SAP XI

Former Member
0 Kudos

I need convert some data from one metric system to another when mapping, how to implement it in XI easily? do I need to implement java code or just design at integration repository?

Message was edited by: Spring Tang

Accepted Solutions (1)

Accepted Solutions (1)

STALANKI
Active Contributor
0 Kudos

Best Bid-Value Mapping instead of CSV files.

Former Member
0 Kudos

How to use the value mapping, I input some data in ID. but when drag the value mapping function to mapping, there is a context that need to be input. what is the value?

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Spring,

I think this link might help you,

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/f2/dfae3d47afd652e10000000a114084/content.htm">Value Mappping Exceution</a>

Regards,

Bhavesh

Former Member
0 Kudos

I failed to use the value mapping function, hope help from you

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Can you tell us more on what problem you are facing so that we can work on the solution.

Regards,

Bhavesh

Former Member
0 Kudos

I used the value mapping function of Conversion. when use this function, keep the default value of parameter "context" to "http://sap.com/xi/XI"

Answers (1)

Answers (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Spring,

If it is a simple metric conversion like cm to m or miles to km , or currency conversion, I think the best solution would be to write an User Defined function in your mapping and use it whereever you want.

Regards,

Bhavesh

Former Member
0 Kudos

1.I found that in each message mapping, I need redefine this function. how to let my user function global. 2. I will put some conversion rule in one csv file, and the user function will read this file to convert, but how to make that csv file configurable, for example, the location of file?, I don't want to hardcode this in user function.

Former Member
0 Kudos

Spring,

I guess you have to define it in all the message mappings and you have no alternative. In fact if you get to know any work-around / solution for this please let know. We had similar situation and what we did was use the same jar file as an imported archive in namespace. This jar file contains your actual business logic in a class and we defined another UDF which simply calls this class, advatage of this being if your business logic is 100 lines of code you dont need to put in each mapping.every mapping would use a UDF with max 1-2 lines of code.

Hope this helps.

~Amol

Former Member
0 Kudos

Hi Spring,

May be you can try this method.

1. write the conversion routines as functions in a JAVA class.

2. convert it as a JAR.

3. import it in Integration Repository.

4. now in "user defined function", you can use the methods, present in the imported JAR.

this time also u need to create user defined function for each mapping, but that "user defined function" will have only one statement, the function call from that imported JAVA class.

hope this helps. if any clarification revert back.

regards,

P.Venkat