Assigning a Dynamic Variable
Dear Gurus
I want to ask about next code section. On ECC 6, the next statement is working out fine, but somehow, it's giving a short dump in 4.6c, because the second line(ASSIGN statement) is giving out SY-SUBRC = 4. and l_value is trying to access <fvalu> which is not assigned properly(or so they say in the dump).
wa_Data-ebeln = '1000000000'.
g_String = 'WA_DATA-EBELN'.
ASSIGN (g_string) TO <fvalu>.
l_value = <fvalu>.
Can anybody help to tell me what's wrong with the code? I am trying to get the value of WA_DATA-EBELN based on the field string 'WA_DATA-EBELN'. I am expecting l_value's value to be 1000000000. Is there any other way to do this kind of thing? (4.6c environment)
Gopi Narendra replied
Hey...Andre ...
* CONCATENATE 'PS_WAREA-' g_string INTO g_string. * ASSIGN (g_string) TO <fvalu>. " Andres code ASSIGN COMPONENT g_string OF STRUCTURE ps_warea TO <fvalu>.
Hey Andre, problem got solved...
Regards
Gopi