I am trying to make a dialogue screen into a reusable message screen, which resizes itself dynamically depending on how long the message is. I'm not sure whether that is even possible. This is my code:
FORM show_messagescreen.
"Size screen dynamically according to needed space
DATA out_length TYPE i.
IF gd_0201_message_output_01 > gd_0201_message_output_01.
out_length = strlen( gd_0201_message_output_01 ).
ELSE.
out_length = strlen( gd_0201_message_output_02 ).
ENDIF.
* Code to change visLength of the two output fields here.
CALL SCREEN 0201
STARTING AT 01 01
ENDING AT out_length 05.
ENDFORM.
As you can see I can resize the screen depending on how long the message is, but when the screen appears there is still a scrollbar at the bottom, because the fields are set at around 70 Characters length. Setting the fields length lower just cuts off the message if it is longer than the field. Can I circumvent this scrollbar somehow?
Please tell me if my code is wrong or dirty, I'm a beginner.