cancel
Showing results for 
Search instead for 
Did you mean: 

COPY one node data to another node

Sharathmg
Active Contributor
0 Kudos

Hello All,

as part of req, I would have to temp save the context node data in a temporary node and later use it if necessary.

Is there a alternative to WDCOPYSERVICE method of WD JAVA into WD ABAP.

By simply assigning the node references they seem to be getting copied, but the temp node seems to be getting refreshed and is null.

So, what is the way to copy one node elements to another node, in single statement?

Thank you.

Regards,

Sharath

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

The context should really only be used for data that is needed in the UI directly. If you are keeping a temporary copy of some data you should instead extract its contents back into ABAP internal table or structure and store it as an attribute of the controller instead of in the context. The context comes with some considerable overhead in storage.

Sharathmg
Active Contributor
0 Kudos

Dear Jung,

Thank you for your reply.

The issue is there is a single datasource node for a particular table. When user wants to view the quantity, teh node is filled with qty and when he wants to view value, value data is loaded to same node. The requirement is to retain the value entered by user when in quantity mode to avoid loss of data due to switching to value view.

The internal tables are all declared internally. Should be go for global declaration?

Regards,

Sharath

Former Member
0 Kudos

Hello Sharath,

Yes, having global internal tables would be the best way. Store the data in two different internal tables as attributes of component controller and then bind the appropriate internal table to the node as required.

Hope this helps!

Regards,

Srilatha

Answers (1)

Answers (1)

Sharathmg
Active Contributor
0 Kudos

As instructed, Now I avoid using the context node to store the temporary data.

Thank you.