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

WebDynpro Java: Copy a Row from one table to another

hi folks

i am looking for some code snippet to copy a row from a table to another table dynamically

i have Two tables such as 
           Table 1
           Table 2
           I created a Node_Selected_Row with cardinality 1 :n .

The Table1 gets populated from BAPI. so it has certain data in it.

NOW, on lead selection of a particular row in the Table 1 , the entire row elements alone should be added to Table2.

And if another row is clicked in Table1, that row should also be added to the Table 2 (so now we should have 2 rows)

Can any one provide some pointer over this.

Thanks

Kumar T

Edited by: Kumar on Nov 18, 2008 9:28 PM

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 19, 2008 at 12:35 AM

    first off, access the current context element of that specific bapi model/node. Assign that to a created element of type same as that model node (assuming both tables are model nodes). Then add it to the node that is bound with the second table.

    hope that helps.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Write a function which will be called in onLeadSelect event of the table. access the current row of table1 using wdcontext.<nodename>.current<nodename>element.gettermethods add these values into second table using settermethods of the data source node which is bind to the second table.

      Thanks.

  • author's profile photo Former Member
    Former Member
    Posted on Dec 18, 2008 at 12:28 PM

    Thanks for response

    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.