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

duplicate table rows

Hi Friends,

I have a table in my web dynpro application.

At the click of a button , a functional module is executed and table is filled with output node data.

Now the problem is, the records in the table gets duplicated when the button is clicked again after the first execution. For example, on the 1st click, 2 records are displayed, on 2nd click, those two records get duplicated in the table.

I have tried invalidating output node and also tried removing the elements from output node but still facing the issue.

Please help!!!!

Regards,

Vidit

Edited by: Vidit on Sep 22, 2008 9:47 AM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 22, 2008 at 09:25 AM

    Hi Vidit,

    Inside the Action binded to the button first invalidate the node which is used as datasource for the table.

    The records are getting duplicated because it is not invalidated.

    Regards,

    Swati

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 22, 2008 at 07:52 AM

    Hi Vidit,

    Have you tested the RFC 1st?

    May be it is the RFC which is returning duplicate records.

    Or else, invalidating output node should work from Webdybpro front.

    -Ashutosh

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Murtuza,

      I doing just the same.

      One thing may be worth mentioning is that i have checked the node size on each button click and , I can see that its remain same (2 records) for all clicks. therefore ,invalidation of node is working.

      But surprisingly rows in the table keeps on duplicating. hows that possible ? is there any problem of cache with table control ?

      Regards,

      Vidit

  • author's profile photo Former Member
    Former Member
    Posted on Sep 22, 2008 at 09:32 AM

    Hi Vidit,

    At the click of a button , a functional module is executed and table is filled with output node data.

    After functional module is executed clear the node in which you are sending the input data.

    e.g. For model nodes this works.

    try {
    wdContext.current<yourBAPI>_InputElement().modelObject().get<yourinputnode>().clear();
    	}
    	catch (Exception e1) {
    	}

    e.g. For value nodes, simply invalidate() works.

    wdContext.node<node>().invalidate();

    Regards,

    Siva

    Edited by: Siva Rama Krushna on Sep 23, 2008 6:26 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 22, 2008 at 09:40 AM

    Thanks swati !

    You solved my problem.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 23, 2008 at 10:03 AM

    The problem was with rfc cache and not with model node refresh. So i m closing this thread.

    Thanks for all your help !

    Regards,

    Vidit

    Edited by: Vidit on Sep 23, 2008 12:03 PM

    Edited by: Vidit on Sep 23, 2008 3:27 PM

    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.