Yes entering some fields based on which some other data is populated to the screen so basically sending the screen. is it a data related issue ?
Not sure if this is it but might be....
the BMS commands at the terminal screen level are small binary numbers and one like the SetBufferAddress can be garbage in an uninitialized screen field. If a large couple of characters follow it, it's off the screen and you get a prog7something lockup.
Make sure that the map output area is initialized to binary zeros before you start loading the fields. That should help.