on 10-16-2008 10:47 AM
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)
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Better you should have tried in the ABAP forum. any how, try this link
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb387a358411d1829f0000e829fbfe/frameset.htm
Regards, IA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Using the Assign statement in 4.6c
DATA dref TYPE REF TO data.
FIELD-SYMBOLS <l_dobj> TYPE ANY.
CREATE DATA dref LIKE g_dobj.
ASSIGN dref->* TO <l_dobj>.
<l_dobj> = g_dobj.
<l_dobj> = <l_dobj> + 1.
WRITE: / g_dobj, <l_dobj>.
Hope this helps,
Sudhir.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.