on 10-05-2005 1:06 AM
Hi, i need to compare two value, one it comes to LeadSelection (nodePo_Items) and another comes other table (nodeTemp_GetdetailSerivce_Output), but the comparison <b>(if)</b> don't work.
ex:
int m = wdContext.nodeZbapi_Po_Getdetail_Input().nodeOutput_Po_Getdetail().nodePo_Items().getLeadSelection();
int n = wdContext.nodeTemp_GetdetailSerivce_Output().size();
for(int i = n - 1; i >= 0; --i)
{
<b>if </b>(wdContext.nodeTemp_GetdetailSerivce_Output().getTemp_GetdetailSerivce_OutputElementAt(<b>i</b>).<b>getPckg_No</b>() <b>==</b> wdContext.nodeZbapi_Po_Getdetail_Input().nodeOutput_Po_Getdetail().nodePo_Items().getPo_ItemsElementAt(<b>m</b>).<b>getPckg_No())</b>
{
wdContext.nodeTemp_GetdetailSerivce_Output().removeElement(wdContext.nodeTemp_GetdetailSerivce_Output().getElementAt(i));
}
}
<i>somebody knows that it can happen? I am comparing bad?</i>
Hi Antonio,
I think the data type of your attribute Pckg_No is other than integer (like String, Bigdecimal or like an Object). Hence you cannot do a comparison using '=='.
Instead use 'equals' method.
wdContext.nodeTemp_GetdetailSerivce_Output().getTemp_GetdetailSerivce_OutputElementAt(i).getPckg_No().equals(wdContext.nodeZbapi_Po_Getdetail_Input().nodeOutput_Po_Getdetail().nodePo_Items().getPo_ItemsElementAt(m).getPckg_No()))
I think it will work.
Regards,
Shubham
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
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.