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

I have doubt in multiselection..Its urgent

Hi All,

I have a table having four fields...They are

1> DocumentNo.

2> Amount

3> Description

4> Date

I have to implement multiple selection.

And if the amount is negative then I have to display a message"Installment Plan cant b created"

And on multiselection or on single selection I will be passing the documentno to the BAPI.

I have implemented the logic..But its not working.

So as per the requirement,I need it urgently..Kindly help me with the logic and the code snippet

Regards

DK

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Oct 17, 2006 at 06:15 AM

    Hi DK,

    What is your Exact requirement? I Understood two points from your question.

    1)If Amount is not negative, you want to send it to backend?

    2)Table should support multiple support?

    Correct me, if i am wrong?

    The below code i am using to select multi row value

    ITableElement tableEle = null;

    for(int i=0;i<wdContext.nodeTable().size();i++){

    boolean aa = wdContext.nodeTable().isMultiSelected(i);

    if(aa){

    wdComponentAPI.getMessageManager().reportSuccess(" Selected "+i);

    tableEle = (ITableElement)wdContext.nodeTable().getElementAt(i+1);

    }

    amount = tableEle.getAmount();

    }

    //it gives us, which row is selected

    amount is the selected row amount. use ur logic to check negative value or whatever you want...

    Regards,

    SK

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 16, 2006 at 06:33 PM

    Post the code.

    Armin

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Which method contains this code?

      The following lines look strange:

      if (wdContext.nodeOPENITEMS_open().isMultiSelected(i) || selectedRow == i)
      {
        SetKeyValues[0].setDOC_NUMBER(wdContext.nodeOPENITEMS_open().getOPENITEMS_openElementAt(selectedRow)
            .getDOC_NO());
        wdContext.currentContextElement().setInstalStatus(true);
      }
      

      You test if the node element at index i is selected. If yes, you always set the <b>first </b>array entry to doc_no of the <b>lead </b>selected element (assuming selectedRow is the lead selected index).

      What is this good for?

      Armin

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.