cancel
Showing results for 
Search instead for 
Did you mean: 

Creating an imported archive - from a user-defined function

Former Member
0 Kudos

Hi

In order to make a udf - reusable - across different message mappings, we need to create a java archive of the code in the udf - from a *java program and import the archive into the relevant SWCV so that it can be used by any message mapping program within that SWCV.

Now, with the help of a sample code can somebody explain how do we make a udf reusable -

I read somewhere that the java code in the udf when compiled directly does not compile. I am wondering what are the additional XI std classes that are needed to be included in the classpath when we compile the udf code to create the *class file

If yes, where do we get those std classes from ?

Correct answers will be rewarded rightaway. Thanks for your time in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Just to add to my original note - I am specifically looking to reuse a udf that does a database lookup and is used in a message mapping.

I need to compile this udf inorder to create a jar file for importing into mapping archives.

a) To do this compilation - what are the standard XI jar files to be made as a part of build path.

b) How do I reuse this udf in another message mapping - ?

Karthik.M

Former Member
0 Kudos

karthik,

once ur create jar file it already complied one. u create jar out of complid code only. you resuse the udf anywhere by instancating the calss.

com.sap.aii.mapping.*;

Former Member
0 Kudos

Hi Karthik,

<b> a) To do this compilation - what are the standard XI jar files to be made as a part of build path. </b>

Jar files are already comiled ones , you don't need to do again. just imnport in archives.

<b>

b) How do I reuse this udf in another message mapping - ?</b>

Creatre an object for the class in archived jar in udf and call the respective udf.

hope it is clear.

Thanks,

venu.