‎2008 Jul 09 2:27 PM
hi experts
i have this assign statement:
FIELD-SYMBOLS <cekko> TYPE cekko.
ASSIGN ('( ZXM06U43)CEKKO') to <cekko>.
<cekko>-usrn1 = 30.
in the third row i get runtime error GETWA_NOT_ASSIGNED
Short text:
Field symbol has not yet been assigned.
i dont understand what's wrong
thanks
amit
‎2008 Jul 09 2:32 PM
This is a very dirty construction to read data from memory in places where you don't have access to this data: for instance a user exit but this data is not passed as parameter.
I would recommend to NEVER use this as any change in the calling program (e.g. next SAP release) could lead to a short dump.
The error you get here indicates that structure CEKKO in program ZXM06U43 is not available, hence the assignment to the field-symbol fails.
Regards,
John.
‎2008 Jul 09 2:34 PM
You should be using the main program of ZXM06U43 and not ZXM06U43.
‎2008 Jul 09 2:41 PM
I understand from the declaration and assign statement that you are assigning the structure and not the internal table . In which case can you explain what do you mean by third row.
if ZXM06U43 is an include, donot use the include program . Use the SAP Main program
Also check for sy-subrc after the assign statement.
FIELD-SYMBOLS <cekko> TYPE cekko.
ASSIGN ('( SAP******)CEKKO') to <cekko>.
<cekko>-usrn1 = 30
Here is the sample code for an internal table assignment from the buffer
data: i_cekko like cekko occurs 0.
FIELD-SYMBOLS <CEEKO> like i_cekko.
ASSIGN ('( SAP*****)CEKKO[]') to <CEEKO>.
if sy-subrc = 0.
loop at <CEEKO> INTO WA.
Process the field value and modify the table <CEEKO>.
ENDIF.
‎2008 Jul 09 2:53 PM
Hi,
Try changing the assign statement like this:
ASSIGN ( ZXM06U43)CEKKO to <cekko>.
Thanks,
Keerthi.