Skip to Content
author's profile photo Former Member
Former Member

To compare value node

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>

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 05, 2005 at 02:09 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.