Skip to Content
0
Apr 12, 2012 at 10:58 PM

UDF java syntax error illegal start of expression

196 Views

Hi,

I found this post with solution for UDF for converting source node to target single node array http://scn.sap.com/message/9129375#9129375

I am new to Java and have not been able to determine the cause and resolution for this error. Can anybody suggest a solution?

The code is:

public void calculate1(String[] var1, ResultList result, Container container) throws StreamTransformationException{

StringBuffer sb = new StringBuffer();

for(int i = 0; i<var1.length;i++){
sb.append(var1 <i>);
}
result.addValue(sb.toString());

}

When i run a check on it I get the following error messages:

"Function calculate1, Line 4:

illegal start of expression

sb.append(var1 <i>);

^

Function calculate1, Line 4:

')' expected

sb.append(var1 <i>);

^

2 errors"

regards

Julian