Hi,
This happens if your F4 value is being determined via something else. Perhaps you should check the whole of your implemetation of F4 by debugging, also put a breakpoint in on_new_focus (if it's implemented) and do_prepare_output and other methods that get triggered in the roundtrip.
It looks like the field value is dependent on something and that's overwriting whatever you are setting in your code.
This should give you a clue..
Regards,
Parul