cancel
Showing results for 
Search instead for 
Did you mean: 

Re-using of value translations in mappings

Former Member
0 Kudos

Suppose that for a number of different interfaces/mappings the same translation has to be done.

e.g. BUKRS A1 -> 0001

BUKRS A2 -> 0002

BUKRS B1 -> 0100

Is there some way to define the translation logic on a central place in stead of in every mapping where this translation has to be performed? The reason is easy maintenance when the translation has to change or extended.

Kind regards,

Léon.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks for all the answers; I'm sure I can work it out now.

Kind regards,

Léon.

Former Member
0 Kudos
Former Member
0 Kudos

Ashish,

Could you please be a little bit more specific? I can't find a solution on the link you suggest.

Kind regards,

Léon.

Former Member
0 Kudos

You can code the logic in java program and import this into your software component version.

Then during mapping while creating user defined functions you can use this program. In case there is any change then you will have to just modify the java program.

Former Member
0 Kudos

Hi,

Here is a useful forum post on making the java functions global:

Basically, create a small user-defined function for mapping this with 'if' statements. To quote more from it:

"Then you have 2 options:

- put your jar to the boot class path of the J2EE server

- put this jar to every namespace where you going to use this function.

In the Message Mapping you'll need to create a wrapper for your function and that's a manual process for each mapping."

There is another option. If you are familiar with value mapping, you should be able to use it. Here is the help:

http://help.sap.com/saphelp_nw04/helpdata/en/13/ba20dd7beb14438bc7b04b5b6ca300/frameset.htm

Hope this helps,

Bhanu

Former Member
0 Kudos

hi,

In addition to reply by Bhanu above, you can use mapping templates once you have imported your user defined function in a jar file. This would avoid recreating same mapping each time & central java code would help reduce changes required incase mapping values change.

Hope this helps.

sachin kotalwar.

Former Member
0 Kudos

Hi Léon,

I would suggest to write your own mapping program, accessing the XML document using XSLT oder Java (SAX, DOM).

Cheers,

Heiko

Former Member
0 Kudos

Heiko,

I don't believe this solves my problem because the same translation has to be done for different interfaces en thus different mappings...

Kind regards,

Léon.