on 08-07-2015 7:14 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Iñaki Vila,
thanks for your quick reply.
currently my project is using sap pi 7.0.
with the using above logic i am getting the error. and in the mapping RemoveDuplicates is the UDF.
Kindly sugguest me to resolve the issue.
thank you so much inadvance.
Best regards,
Hari.
Hi Hari,
First of all on the THEN input you are EXT_LOC.. without the same context that the begging of the mapping and seems that the output is wrong because is getting always the same value.
In your source XML i can't see any duplicate, at least in your example and may be the UDF removeDuplicates was not necessary.
Regards.
Hi Iñaki Vila,
Kindly look into below one.
here my requirement is need to ignore null values as well duplicate values.
Kindly suggest me any UDF or any alternate way to resolve the issue .
Thanks in advance.
best regards,
Hari.
Hi Hari krishna,
Please, to have a good behavior and to help more SCN members on the future, close the thread according this
Regards.
Hi Hari,
some suggestion:
input --> passIfHasValue(UDF1) --> output1 --> removeSuppress(UDF2) --> output2
UDF1 to act as filter to remove empty/null value, and pass value from source to target:
for (int i = 0; i < contextValues.length; i++){
String value = contextValues[i];
if (value != null && value.trim().length() > 0){
result.addValue(value);
}
else{
result.addSuppress();
}
}
UDF2. If you don't want suppress at later stage, feed to another UDF removeSuppress
for (int i = 0; i < contextValues.length; i++) {
String value = contextValues[i];
if (!ResultList.SUPPRESS.equalsIgnoreCase(value)){
result.addValue(value);
}
}
Regards,
Yee Loon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.