Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ASSIGN

Former Member
0 Likes
642

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

4 REPLIES 4
Read only

Former Member
0 Likes
604

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.

Read only

Former Member
0 Likes
604

You should be using the main program of ZXM06U43 and not ZXM06U43.

Read only

Former Member
0 Likes
604

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.

Read only

Former Member
0 Likes
604

Hi,

Try changing the assign statement like this:

ASSIGN ( ZXM06U43)CEKKO to <cekko>.

Thanks,

Keerthi.