Skip to Content
0
Jan 29, 2023 at 12:48 PM

Dynpro | Enabling button and input field after button click

293 Views Last edit Jan 29, 2023 at 02:13 PM 5 rev

I have two output/input fields and a button i want to enable when the button 'CHANGE' is clicked.

I've checked with debugger and everything seems ok there but i just can't get it to work. The button and the fields just stay inactive/disabled all the time

Here's my current code:

CASE save_ok.
WHEN 'BACK' OR 'EXIT' OR 'QUIT'.
LEAVE TO SCREEN 1200.
WHEN 'AUSWERTEN'.
WHEN 'CONFIRM'.
LOOP AT SCREEN.
CASE screen-name.
WHEN 'BTN_CHANGE'.
screen-input = 0. "to disable.
screen-active = 1. "to hide
WHEN 'BTN_CONFIRM'.
screen-input = 0. "to disable.
screen-active = 1. "to hide
" WHEN OTHERS.
ENDCASE.
MODIFY SCREEN.
ENDLOOP.
WHEN 'CHANGE'.
IF lt_row IS INITIAL.
MESSAGE 'no row selected' TYPE 'S' DISPLAY LIKE 'E'.
ELSE.
LOOP AT SCREEN.
CASE screen-name.
WHEN 'BTN_CONFIRM'.
screen-input = 1. "to disable.
screen-active = 1. "to hide
WHEN 'GN_SID'.
screen-input = 1. "to disable.
screen-active = 1. "to hide
WHEN 'GN_MID'.
screen-input = 1. "to disable.
screen-active = 1. "to hide
ENDCASE.
MODIFY SCREEN.
ENDLOOP.