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

Dump while accessing smartform

Former Member
0 Likes
1,144

Hi Everyone ,

I am getting a dump 'Field symbol has not yet been assigned' while accessing a smartform. When i debug the smartforms ,though i have used the assign statement it is not assigning the value to the field symbol.Please refer to the snapshot.
I have assigned the field symbol at line 842 and it is throwing error at line 845 as described earlier.

BR.

1 ACCEPTED SOLUTION
Read only

former_member191569
Active Participant
0 Likes
1,011

Hello Giri,

in the line 841 you are calculating a string that holds the name of the field:

CONCATENATE 'LV_' <fs_laytext>-text_id '_ID' INTO lv_field.

Then, in line 842, you assign the field with this name (the name calculated in lv_field variable) of the loop structure to the field symbol.

This assignment may be wrong if the structure you are looping at does not include any field with the name that holds "lv_field" variable value.

For example, if lv_field = 'LV_MYFIELD_ID' and your looping structure does not include any field with this name, the assigment in line 842 will be erroneous and the assignment will fail; this will cause a fatal error then in line 845 because <fs_field> is not assigned to any data object and the statement cannot write any value referenced by this alias.

If you can debug, check assigments at line 842, or think about the values you are getting in line 842 that maybe does not exist as fields in the structure. Also, as the other colleagues have said, check "sy-subrc" after line 842 to check if the assignment have been correct; if not, do not try to put any value to field symbol <fs_field> (as in line 845).

Hope it helps,

David

5 REPLIES 5
Read only

ronaldo_aparecido
Contributor
0 Likes
1,011

HI GIRI

Show the declarations os field symbols.

Please.

Thanks.

Read only

0 Likes
1,011

Hi Ronaldo ,

field-symbols: ,

<fs_laytext> type ykwsd_laytext,

<fs_laylabels> type ykwsd_laylabel,

<fs_laylabelp> type ykwsd_laylabel,

<fs_field>,

<fs_fields>,

<fs_fieldl>,

<fs_struct>.

data: lv_field type string,

lv_fieldl type string,

lv_struct type string,

lv_layout type ykwsd_layout.

BR.

Read only

Former Member
0 Likes
1,011

Hi,

I can see from the screenshot of your debugger that SY-SUBRC is set to 4. This means that the instruction to assign fieldsymbol <fs_struct> failed. You should check the content of the variable lv_struct and see if it is what you waited to have in it.

Martin

Read only

Former Member
0 Likes
1,011

Always check your sy-subrc.

for example:

ASSIGN ... TO <fs>.

IF sy-subrc = 0.

     ...

ENDIF.

Read only

former_member191569
Active Participant
0 Likes
1,012

Hello Giri,

in the line 841 you are calculating a string that holds the name of the field:

CONCATENATE 'LV_' <fs_laytext>-text_id '_ID' INTO lv_field.

Then, in line 842, you assign the field with this name (the name calculated in lv_field variable) of the loop structure to the field symbol.

This assignment may be wrong if the structure you are looping at does not include any field with the name that holds "lv_field" variable value.

For example, if lv_field = 'LV_MYFIELD_ID' and your looping structure does not include any field with this name, the assigment in line 842 will be erroneous and the assignment will fail; this will cause a fatal error then in line 845 because <fs_field> is not assigned to any data object and the statement cannot write any value referenced by this alias.

If you can debug, check assigments at line 842, or think about the values you are getting in line 842 that maybe does not exist as fields in the structure. Also, as the other colleagues have said, check "sy-subrc" after line 842 to check if the assignment have been correct; if not, do not try to put any value to field symbol <fs_field> (as in line 845).

Hope it helps,

David