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 problem

surekha_rao
Participant
0 Kudos

Hi Experts,

Am getting a dump in my code where the field symbol is used. It says "A new value is to be assigned to the field "<FS>", although this field is

entirely or partly protected against changes.".

And the line where its pointing is :

<fs> = lv_rental_amount * ps_item-zzinterim_period / 30.

But am not understanding what exactly is the problem.

Could you pls help me out with this.

Thanks in advance,

Cheers'

Surekha.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

lv_period = num.

write lv_period to lv_fname no-zero.

shift lv_fname left deleting leading space.

concatenate 'ZLS' lv_fname into lv_fname.

assign component lv_fname of structure ps_item to <fs>.

<fs> = lv_rental_amount * ps_item-zzinterim_period / 30.

<b>if <fs> is unassigned.

ps_item-interim_amount = 0. (or some value)

else.

ps_item-interim_amount = ps_item-interim_amount + <fs>.

endif.</b>

try changes in bold

4 REPLIES 4

Former Member
0 Kudos

check to which field u have assigned the FS to ??

might be that field unchangeable.

0 Kudos

Hi,

This is some part of my code where it dumps:

lv_period = num.

write lv_period to lv_fname no-zero.

shift lv_fname left deleting leading space.

concatenate 'ZLS' lv_fname into lv_fname.

assign component lv_fname of structure ps_item to <fs>.

<fs> = lv_rental_amount * ps_item-zzinterim_period / 30.

ps_item-interim_amount = ps_item-interim_amount + <fs>.

Thanks,

Surekha

Former Member
0 Kudos

lv_period = num.

write lv_period to lv_fname no-zero.

shift lv_fname left deleting leading space.

concatenate 'ZLS' lv_fname into lv_fname.

assign component lv_fname of structure ps_item to <fs>.

<fs> = lv_rental_amount * ps_item-zzinterim_period / 30.

<b>if <fs> is unassigned.

ps_item-interim_amount = 0. (or some value)

else.

ps_item-interim_amount = ps_item-interim_amount + <fs>.

endif.</b>

try changes in bold

surekha_rao
Participant
0 Kudos

Hi Ram,

Thanks a lot.

Surekha.