on 02-23-2008 8:41 AM
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");
}
Hi JAY,
There is lack of returnm statement please add in your catch:
return "0";
/wg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks,
I have really done a simple mistake..
Thanks Buddy
JAY
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.