cancel
Showing results for 
Search instead for 
Did you mean: 

Writing message mapping function in Java in integration repository

Former Member
0 Kudos

Hi XI Pundits,

I am new to XI. I was working on Message mapping in intergration repository.

To map the source messages to target messages, we do graphical kind of mapping like drag and drop.

There are some functions aavilable at the bottom like concatehate, trim and etc. which we use if we need to modify the source message and map to target.

But in case we face a situation when we don't find the function which suits our requirement, I guess we need to write a new function. We can write these new function using Java only.

Can someone throw some light on this ?

<b>What do we do to invoke java editor in integartion reposity to write mapping function in java ?

Can someone give an example of snippet of code ?</b>

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Tushar,

Yes, you may go for User defined Functions in Java and that can be used in your graphical mapping,

<i>What do we do to invoke java editor in integartion reposity to write mapping function in java ?

</i>

You may use the button "create new function at bottom"

<i>Can someone give an example of snippet of code ?

</i>

You may serach in sdn for many such sample snippets, but if u tell your requirement we may help directly,

Some weblogs that may help you,

/people/michal.krawczyk2/blog/2005/02/25/simple-java-code-in-graphical-mapping--xi

/people/stefan.grube/blog/2005/12/30/test-user-defined-functions-for-the-xi-graphical-mapping-tool-in-developer-studio

/people/sap.user72/blog/2005/02/23/raising-exceptions-in-sap-xi-mapping

All the best,

Anirban.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Tushar,

the hints so far should have given you a good picture of how to write a user-defined function. Maybe a last recommendation. If your function is supposed to do a little more than just one or two simple java method calls, it may be helpful to write the actual functionality in a 'real' Java IDE, package it in a JAR file, import it under Imported Archives in this or an underlying Software Component and only invoke it from your user-defined function (specifying the correct imports), passing the necessary parameters, from the user-defined function. The Java Editor is not really very comfortable in XI...

good luck,

peter

STALANKI
Active Contributor
0 Kudos

/people/michal.krawczyk2/blog/2005/03/04/globalcontainer--in-graphical-mapping-xi

use this also.

STALANKI
Active Contributor
0 Kudos

/people/stefan.grube/blog/2005/12/30/test-user-defined-functions-for-the-xi-graphical-mapping-tool-in-developer-studio might help u.

Former Member
0 Kudos

Hi Tushar,

Go thro this help link. You will get all info about User defined function.

http://help.sap.com/saphelp_nw04/helpdata/en/22/e127f28b572243b4324879c6bf05a0/frameset.htm

To get more understanding on mapping go thro this link(PDF File)

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9202d890-0201-0010-1588-adb...

Hope this helps.

regards,

P.Venkat

Message was edited by: Venkataramanan