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

Field symbol problem

surekha_rao
Associate
Associate
0 Likes
671

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
Read only

Former Member
0 Likes
630

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
Read only

Former Member
0 Likes
630

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

might be that field unchangeable.

Read only

0 Likes
630

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

Read only

Former Member
0 Likes
631

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

Read only

surekha_rao
Associate
Associate
0 Likes
630

Hi Ram,

Thanks a lot.

Surekha.