‎2007 May 01 11:33 PM
I'm moving values from itab declared like DATA. Then moving the values to another field-symnobl data. Now after doing some change to the second table, I want to move the values to the first table. Anybody has any idea how to do it?
DATA: itab TYPE REF TO data.
GET REFERENCE OF me->query_result INTO itab.
itab = me->query_result.
FIELD-SYMBOLS: <itab1> TYPE table.
ASSIGN itab->* TO <itab1>.
Here after making change to <itab1>, I want to swap the value to itab.
Any ideas?
Thanks,
RM
‎2007 May 02 5:43 AM
I think you are pretty confused regarding use of TYPE REF TO variable.
GET REFERENCE OF me->query_result INTO itab.
*itab = me->query_result. "Wrong construct can't do like this
FIELD-SYMBOLS: <itab1> TYPE STANDARD TABLE.
ASSIGN itab->* TO <itab1>.
"After ASSIGN <itab1> refers to the same internal table. Whatever changes you do to <itab1> would be reflected in me->query_result also.
‎2007 May 02 5:43 AM
I think you are pretty confused regarding use of TYPE REF TO variable.
GET REFERENCE OF me->query_result INTO itab.
*itab = me->query_result. "Wrong construct can't do like this
FIELD-SYMBOLS: <itab1> TYPE STANDARD TABLE.
ASSIGN itab->* TO <itab1>.
"After ASSIGN <itab1> refers to the same internal table. Whatever changes you do to <itab1> would be reflected in me->query_result also.
‎2007 May 02 7:09 AM
Hi,
ASSIGN itab->* TO <itab1>.
Since you are assigning itab to itab1, itab1 refers to the same memory area of itab and hence any changes made to itab1 would reflect in itab .
Regards,
Raghavendra
‎2007 May 02 6:39 PM