on 06-30-2015 11:16 AM
Hi all,
I am working on a interface in the which the logic is as follows .
In the which when the Z1P1208 segement Exists then it should get records
with the which the PLANS from E1P0001 and OBJID from the E1P00105
should get the data means the queue should be true or else the queue should be false .
But Actually what happening is the logic is not working as when the Z1P1208 segment is not coming into the PI system .
for the which i have written logic for get record is
String a = " " ;
String flag = " " ;
for(int i=0 ; i<var1.length;i++){
if(var1[i].equals("true")){
for(int j=0;j<var2.length;j++){
flag = "";
for(int k=0;k<var3. length;k++){
if(var2[j]==var3[k])
{
a="true";
result.addvalue(a);
flag= "X";
break;
}
}
}
}
}
please help me out
Regards,
vijender
Hi Vijender,
I have corrected the code. Try this out:
String a = " " ;
String flag = " " ;
for(int i=0 ; i<var1.length;i++)
{
if(var1[i].equals("true"))
{
for(int j=0;j<var2.length;j++)
{
flag = "";
for(int k=0;k<var3. length;k++)
{
if(var2[j]==var3[k])
{
a="true";
result.addValue(a);
flag= "X";
break;
}
}
}
}
else
result.addValue("false");
}
Regards
Vishnu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vijendar,
The udf screen shot you have mentioned is fine.
Can you please share the screen shot of the display queue of the test case where you are having the issue.
Also, let me know the occurrences of the below in the IDOC.
Z1P1208
PLANS from E1P0001 and
OBJID from the E1P00105
This could help us to resolve the issue quickly..
Regards
Vishnu
Hi Vijender,
Can you please let me know where exactly you are facing issue.
Since if I understand correctly, your requirement is when Z1P1208 segment exists & PLANS from E1P0001 segment is equal to OBJID from E1P00105 segment, then you need the output to TRUE or else FALSE.
So, as per this requirement, you are getting the output as TRUE when the positive test case is getting executed.
Please share the details of the issue you are encountering.
Regards
Vishnu
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
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.