cancel
Showing results for 
Search instead for 
Did you mean: 

Problems in copying data from Value node to Model node

former_member1191927
Participant
0 Kudos

Hi,

I have a webdynpro table bound to a value node which gets the data from a model node (i have used WDCopyService to copy). The data is read properly from the back end, but it does not work when I send it back.

How do I copy back the values from the Value node to the Model node so that it goes back to the BAPI as input?

I have used WDCopyService - it did not work. Also I used the following code, it throws an error ("com.sap.tc.webdynpro.progmodel.context.ContextException: Node(InvoiceDetailsView.SHELL_Z_BAPI_INVOICE_VALIDATE.K_Vbseg): cannot bind or add elements because the node has no valid parent ").

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

Zep_Ms_Park_Docu_Detail itemDetail = new Zep_Ms_Park_Docu_Detail();

itemDetail.setKostl(wdContext.nodeItemDetailsValue().getItemDetailsValueElementAt(i).getKostl());

itemDetail.setPs_Psp_Pnr(wdContext.nodeItemDetailsValue().getItemDetailsValueElementAt(i).getPs_Psp_Pnr());

itemDetail.setZpages(wdContext.nodeItemDetailsValue().getItemDetailsValueElementAt(i).getZpages());

wdContext.nodeK_Vbseg().addElement(wdContext.nodeK_Vbseg().createK_VbsegElement(itemDetail));

}

Please advice. This is really urgent.

Thanks,

Hari

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hary,

WDCopyService has certain limitations. One of them is that it's impossible to copy elements between model/value nodes.

Some time ago I've developed an utility class that overcomes this limitation, please check <a href="/people/valery.silaev/blog/2006/07/12/when-wdcopyservice-is-not-enough">When WDCopyService is not enough...</a>

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

abhijeet_mukkawar
Active Contributor
0 Kudos

hi ,

check out the following link,

hope it helps,

regards,

abhijeet

monalisa_biswal
Contributor
0 Kudos

Go Through following link