Skip to Content
0
Former Member
Feb 23, 2008 at 08:41 AM

Need Your help in the messge UDF

11 Views

Hi All,

There is a small problem in my message mapping. Can anyone have a look at this and let me know the exact problem in this.

I just want to execute the try block and if there is any error then i have to catch this in the catch command.

I am writing a small UDF. When i am running this it is showing me the error in the mapping editor.

ERROR:::

**********************************************************************

Source code has syntax error: /usr/sap/XD1/DVEBMGS03/j2ee/cluster/server0/./temp/classpath_resolver/Map1bcce1b0e1e311dcab730003bae4e429/source/com/sap/xi/tf/_MM_NG_SR3_01_NG_E5_01_.java:3757: missing return statement } ^ 1 error

***********************************************************************

Code Writen is :

************************************************************************

MappingTrace addTrace;

addTrace = container.getTrace();

int i;

int j;

int k;

try

{

if( (a.equals("")) || (b.equals("")) || (c.equals("")))

{

return "A";

}

i = Integer.parseInt(a);

j = Integer.parseInt(b);

k = Integer.parseInt(c);

if (( i >= k ) && (k >= j))

return "B";

else

return "A";

}

catch(Exception e)

{

addTrace.addWarning("Failed to convert Last 3 charecter of to Interger");

}