Quantcast
Channel: SCN : Discussion List - SAP NetWeaver Technology Platform
Viewing all articles
Browse latest Browse all 1520

How to get the First and last values in queue

$
0
0

Hi,

 

We have a requirement to get the first and last values from one element for target 2 elements.

 

I wrote a udf for get the first value as below

 

public void getItem1(String[] a, ResultList output1, Container container) throws StreamTransformationException{

 

for(int i=0;i<a.length;i++)

{

if(a[i].length()>0)

{

String str1[]= a[i].split("\\,");

output1.addValue(str1[0]);

}

else

{

output1.addValue("");

}

}

 

and it is working fine.Now i want to get the last value as output,

 

Example:

 

In a element we getting some values with separate comma like 455657656,22323,76576,71236,98098,.......,67676.

 

I want to get the last value after the comma 67676 as a output.

 

Can you please help me on this.

 

Thanks in advance.


Viewing all articles
Browse latest Browse all 1520

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>