cancel
Showing results for 
Search instead for 
Did you mean: 

Any method to copy the data from internal table to Another Internal table

Former Member
0 Kudos

Hi All,

I am now to Webdynpro ABAP .

Could you please let me know any methods for copying Contents of Table ITAB to Table JTAB .

Regards,

Rohit.

Accepted Solutions (0)

Answers (3)

Answers (3)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Your question doesn't seem to be Web Dynpro ABAP related. If you really just want to move values between two internal tables, then this would be a question for the ABAP General Forum. If there is something more Web Dynpro specific about your question (as suggested, do you actually mean context nodes), then please be specific in asking your question.

sreemsft
Contributor
0 Kudos

Hi Rohit,

ITAB2 = ITAB1. " to just copy the table data

Are you looking about how to copy the context node data into another context node?

I have two context nodes.. type cardinality 0..n.. NODE1, NODE2 and I want to pass node1 data to NODE2

DATA : ITEMS_NODE TYPE REF TO IF_WD_CONTEXT_NODE,
         ITAB1 TYPE IF_MAIN=>ELEMENTS_NODE1,
         ITAB2 TYPE IF_MAIN=>ELEMENTS_NODE2,

  ITEMS_NODE = WD_CONTEXT->GET_CHILD_NODE( NAME = 'NODE1' ).
  ITEMS_NODE->GET_STATIC_ATTRIBUTES_TABLE( IMPORTING TABLE = ITAB1 ).

  ITAB2[] = ITAB1[]. " if it does not work, use loop the table 1 and move corresponding fields to table 2
		
  ITEMS_NODE = WD_CONTEXT->GET_CHILD_NODE( NAME = 'NODE2' ).
  ITEMS_NODE->BIND_TABLE( ITAB2 ).

Thanks,

Sreekanth

Former Member
0 Kudos

Hi,

You can write

jtab = itab.

or

MOVE itab TO jtab.

Thanks

Feroz

Edited by: Feroz Khan Pathan on Jul 29, 2009 8:28 AM