on 04-21-2015 7:42 AM
Hi All,
I am working on IDOC to file scenario.
My mapping is as follows:
The code for UDF is
String a = "";
for(int i=0;i<otype.length;i++)
{
if(otype[i].equals("S"))
{
a = stext[i];
result.addValue(a);
}
else
{
result.addSuppress();
}
}
The requirement is that I need to check if OTYPE is S then map the corresponding stext to Postxt field of target structure otherwise just send blank.
But with the result.addSuppress() postxt is not getting generated at all. and if I am using result.addValue("") to populate blank, then the postxt is generated with at target node when S does not exist, but in case where S exist it takes first value of output queue in which output is blank for otype O it still populates blank even in the case wher S exists.
So when correct result come Postxt node at target does not generate at all with addSuppress, otherwise with addValue("") postxt with blank generates where S does not exist but then it populates blank even when S exists.
Please help to handle these context.
Regards,
Sachi
Hi Sachi,
The code for UDF is
String a = "";
for(int i=0;i<otype.length;i++){
if(otype[i].equals("S")){
a = stext[i];
result.addValue(a);
}
else{
result.addSuppress();
}
}
Change it to
String a = "";
for(int i=0;i<otype.length;i++){
if(otype[i].equals("S")){
a = stext[i];
result.addValue(a);
}
}
There is no need for the else statement.
Regards,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sachi,
Before mapping with Postxt add node function SplitByValue(EachValue)
Thanks,
Apu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.