Application Development 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: 

Field symbol has not been assigned

Former Member
0 Kudos

Hi gurus,

I am executing one query I have designed, however, when in SQ01 I get the message "Field symbol has not been assigned".

I have reviewed other posts with the same problem but the issue is still there.

Could you please guide to get a solution? Please check the image attached.

Thanks,

Kind regards,

17 REPLIES 17

former_member220028
Active Contributor
0 Kudos

you forgot sy-subrc check after assign component

0 Kudos

Could you please put the check with more details?

Thanks a lot,

Regards,

0 Kudos

Hi John Smith,

looks like your structure <fs_lin> has no field named Z_RESULT. sy-subrc after assign statement should be 4 and that leads to the error that <fs_val> is not assigned.

regards

Stefan Seeburger

0 Kudos

Hi Stefan,

Thanks for your reply again. I have variable Z_RESULT defined in the InfoSet.

Please check image attached.

Kind regards,

0 Kudos

Hi John,

but are you sure that <fs_lin> is assigned correctly? Check the components of structure <fs_lin> in debugger to see its available components.

Regards,

Klaus

former_member195402
Active Contributor
0 Kudos

Hi John,

what's the type of l_fieldnm? If it is a character type, then its content will be checked for a component name. If it's a numeric type, it will be checked for a component position.

If the component name is not matching or the component number does not exist, the ASSIGN will not be successful, which will cause your issue.

Regards,

Klaus

0 Kudos

Hi Klaus,

the field name is defined as l_fieldnm(10) type c meanwhile the Z_RESULT is character of long 60.

Any idea?

Kind regards,

0 Kudos

Hi John,

Is 'Z_RESULT' a valid component name of the structure <fs_lin>?

Regards,

Klaus

0 Kudos

Hi Klaus,

I defined field Z_RESULT in the details of the Infoset. Please check image attached.

Kind regards,

former_member182877
Participant
0 Kudos

Hi John,

1. Please have Sy-subrc check after 'Assign component' statement

2. Please pass some value for 'Z_RESULT' and then check

Cheers,

Kripa Rangachari.

0 Kudos

Hi Kripa,

Thanks for your message. I have tried what you recommeded and the error now is that the field is completely empty.

ronaldo_aparecido
Contributor
0 Kudos

Hi John

Could you use if <your field simbol> is assigned before use the field symbol.

if you want to know why didnt is assigned you need check if hava data and the field symbol types is compatible..  ( type any....anytable.....)

Hope helepd you.

0 Kudos

Hi Ronaldo,

The types are character for the field symbol and the data (field Z_RESULT), what else can be happening?

Thanks a lot,

Kind regards,

former_member220028
Active Contributor
0 Kudos

did you check for simple things like the code your executing is your actual code? close/open your programm to load recent changes.

LG

Stefan Seeburger

0 Kudos

also please add the screenshot what that structure <FS_LIN> looks like in your debugger !!

0 Kudos

Hi John,

Try this abap code

assign component (l_fieldnm) of structure <fs_lin> to <fs_val>.

<fs_val> = 'Hola'.

Regards

jrg_wulf
Active Contributor
0 Kudos

Hi John,

you have been directed to the most probable reason of your Problem twice now.

Both, Klaus and Stefan have pointed you towards it.

The crucial thing is, whether  <fs_lin> is assigned AND what the assigned structure looks like.

None of your snippets or screenshots shed any light on this.

Where do you actually assign <fs_lin> and to what.

If <fs_lin> is not assigned correctly, your assignment of any of its components is bound to fail.

The same holds true, if <fs_lin> is assigned, but the referred structure does not contain a component named 'Z_RESULT'.

Since you haven't shared that crucial bit of your code, you're on your own there, until you do.

Best regards - Jörg