Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Accessing container element in the User Defined Function

Hi All,

I am accessing a container element in the user defined function.

But it is not working. Actually i want to split a message(1800 records) into a batch of 200.

But it goes in a infinite loop.

Please can you tell me where i am wrong.

Smita

The code is :

public void SplitMsg(String[] a,ResultList result,Container container){

Object container1;

String counter;

int i,j=0;

container1 = container.getParameter("value");

if( container1 == null){

counter = "0";

}

else {

counter = container.toString();

j = Integer.valueOf(counter).intValue();

}

for ( i = j ; i <= j + 199 ; i++){

if ( i >= a.length){

container.setParameter("value","9999999");

break;

}

result.addValue(a<i>);

}

j += 200;

counter = Integer.toString(j);

container.setParameter("value", counter);

}

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question