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

remove table row

Hi,

I have a table that is coming from a R/3 display_bapi. Users can change the contents of the table and send it back to R/3 via a change_bapi.

What I want to do is remove all of the rows of the table that haven't actually been changed by the user so that a smaller amount of data is being sent. (eg. if a user has a table with 1000 rows of data (because they performed a wide search query) but only changes 1, 999 other rows should be removed from the table before RFC is executed).

How would one go about this? could I loop around the LeadSelection and isMultiSelected properties? Or must I create a flag column to the table to track "if selected" or "if changed" (or create an array). Or would it be better to copy the contents to another context element and compare the contents to determine which were changed, then delete the unchanged?

And once I find a way to determine the rows to be deleted how do I detele them?

eg.

wdContext.nodeXXX.something.something.removeSomethingAt(i);

Thanks for the help! Full points will be awarded!

Cheers,

faB

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 01, 2005 at 11:40 AM

    One idea is to store all the LeadSelections (when clicked on the row)in some Storage Util like Array, and later, Save only these records.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 01, 2005 at 11:46 AM

    Hi,

    Try this.

    for(int i = 0;i<nodesize;i++)

    {

    if(wdContext.nodeTest().getElementAt(i).isChangedByClient() == true)

    {

    wdContext.nodeTest().removeElement(wdContext.nodeTest().getElementAt(i));

    }

    }

    Regards

    Bharathwaj

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 01, 2005 at 03:12 PM

    hi ,

    Just try i++ instead of ++i in the for loop.

    Regards

    Bharathwaj

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 02, 2005 at 02:40 PM

    Hi,

    Cant understand the following lines.

    The problem is that all of rows changed in this way are removed by the isChangedByClient=false check. I have tried using the generic isChanged, but then it deletes all rows, even the one "changedByClient

    Just elobarate it. Maybe we could it find a solution then.:)

    Regards

    Bharathwaj

    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.