on 03-02-2016 3:16 PM
hi,
my requirement is-
Source side - INP field is present which will have different values coming like 123 or 456 or 789 etc.
In the target side, i have OUT field which needs to concatenate values of INP. OUT should give output as 123,456,789. OUT should concatenate all values of INP and any number of values can come.
Can anyone share the UDF for it.
Hi SAP,
Use below UDF:
Execution Type: All Values Of Context
public void joinList(String[] list, ResultList result, Container container) throws StreamTransformationException{
String join = "";
for (int i = 0 ; i < list.length ; i++){
if (i!= 0)
join = join +","+ list[i];
else
join = join + list[i];
}
result.addValue(join);
}
Regards,
Praveen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.