cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Advance java function in graphical mapping in XI 2.0?

Former Member
0 Kudos

Hi,

currently I am using a simple java function to make an RFC call to R3 system.

I want to avoid making connection for each lookup. Instead I want to make a single connection for whole message queue and get the corresponding values in some array or container object.

please suggest a solution.

I think this is possible using Advance java function, but I am not able to find any example on using Advance java function at help.sap.com.

thaks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Andrzej_Filusz
Contributor
0 Kudos

Hi!!!

I'm not sure if I understood you well.

Do you want to preload some data into your structures in the memory and keep them there so you don't need to make a new connection during processing the whole message or every message?

In my opinion you can cache some data during processing a message, but it's impossible to cache some data between processing messages.

If you write your java mapping or you use graphical mapping (even with user-defined function), then you have a java class. The problem is that XI 2.0 reloads this class during processing every message, so even if you load some data from your data source into your structures in the memory, this data will be lost after reloading your mapping class.

Regards,

Andrzej Filusz

Former Member
0 Kudos

Hi Andrzej,

Thanks for your inputs.I think you are right.

Regards,

Rahul Kumar.

Former Member
0 Kudos

Hi Andrej,

I would like to write a java function in XI for converting <OrderDate>2005-04-07T20:11:18</OrderDate> to

<OrderDate>2005-04-07</OrderDate>. Do i need to use simple function or advanced function in message mapping time? Please reply with code.

Thanks in advance,

Deno

stefan_grube
Active Contributor
0 Kudos

You need no user defined function here, as you can use the function "substring" which belongs to the group "Text".

If you want to code it by your own, define a simple function with one argument. The code is just one line:

return a.substring(0,10);

Regards

Stefan

Former Member
0 Kudos

Thanks Stefan. Its working fine

Deno