cancel
Showing results for 
Search instead for 
Did you mean: 

UDF Error

Former Member
0 Kudos

Hi All,

I was trying to create user defined function for raising exception if any mapping error occur according to the blog

"Throwing Smart Exceptions in XI Graphical Mapping" by Alessandro Guarneri

i have create the jar file and imported the classes but my udf is not able to resolve the method defined in the class.

Please help me in how should i import the jar correctly?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI,

If yu want raise the exception , here two ways.

-- Throw smart exception

See the below link

/people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping

-- Runtime exception ,failure the MM and this can be handle in determination by selecting the proper radio button

to raise the runtime exceion

throw new Runtimeexception(" write msg here );

Write a UDF in MM itself . if you want to write a jar file externally and import it in MM , i hope you should write a package and import it under imported archievs and later in UDF in import column use the package name..

and use that in UDF

Regards

Chilla

<i>reward points if it is helpful..</i>

Former Member
0 Kudos

1.created the package com.xi

2. wrote the two classes. then i comiled the package.

3. created the jar file of the classes

4. zipped the package folder and imported into imported achives.

But when i zipped my package com.xi its name changed to com.

So imported archive name is 'com'

does it makes any difference..

in udf in import text box i wrote 'com.*;'

is it correct?

Former Member
0 Kudos

Hi

try change it another name and import.

After that check did used the name in import colum in UDF or not??

he i hope to raise the exception you need not to do all just write a UDF with above explination.

I am sure this will work without package and all.

Regards

Chilla

Answers (2)

Answers (2)

Former Member
0 Kudos

hi all,

thanks ... i was able to execute my function.

Former Member
0 Kudos

Hi,

Thanks.

Regards

Chilla

<i>reward points if it is helpful..</i>

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

did you activate it ?

did you import in inside the same software component ?

Regards,

michal

Former Member
0 Kudos

i imported the classes in the same software component...

Former Member
0 Kudos

hi michael/shekhar,

i need to import the package.. i think i am making some mistake in importing the jar files

could u help in how should i import?

Former Member
0 Kudos

Hi,

My request -- first rename from com tosome other name.

-- remove all previously imported archeives

- create the Jar file and import under imported archieves

- in MM use the name in import column inUDF

in UDF you have to use package.class name.

Also see the below links

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d046c490-0201-0010-84b6-9df523cb...

http://help.sap.com/bp_bpmv130/Documentation/Operation/MappingXI30.pdf

Regards

Chilla

Message was edited by:

Chandra Sekhar Chilla