11-16-2007 12:07 AM
Hi experts,
I want to change the value of an variable like:
DATA: VAR01 type ref to LVC_DISTXT.
But when i try, occurs dump OBJECTS_MOVE_NOT_SUPPORTED.
how can i assign a char value like 'ABC' in var01? LVC_DISTXT is a char(255)
Thanx
11-16-2007 12:09 AM
11-16-2007 12:17 AM
I have a flied-symbol, which contains the variable that i want to change... Mi code looks like this...
DATA: l_text1 TYPE REF TO LVC_DISTXT.
FIELD-SYMBOLS: <fs1> TYPE ANY.
ls_var = 'E_EVENT_DATA->M_DATA'.
ASSIGN (ls_var) TO <fs1>.
M_DATA is type ref to LVC_DISTXT ( is a char255)
then...
when i try to change the value of l_text1, like a simple char, i get a dump :S
11-16-2007 12:36 AM
11-16-2007 1:05 AM
The type ref statement is used for declare instances of a class. LVC_DISTXT seems to be a data element, so it's incorrect to make a 'type ref' to this. In your code, the 'type ref' could be pointed to E_EVENT_DATA, and the attribute m_data should be 'type lvc_distxt'.
Declare l_text1 type lvc_distxt, so you can move between two consistent variables.
11-16-2007 2:59 PM
Thx guys, i solve my problem...
ls_var = 'E_EVENT_DATA->M_DATA'.
my error was not put ->* to point the data, like this:
ls_var = 'E_EVENT_DATA->M_DATA->*'.