cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

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.
0 Likes
View Entire Topic
RaymondGiuseppi
Active Contributor
0 Likes
  • The loop at screen to enable/disable input or button field should be coded in PBO (before output, AT SELECTION-SCREEN OUTPUT in selection screen)
  • The process of function key, button pressed should be coded in PAI (after input, AT SELECTION-SCREEN in selections screen)

If your program switch between display and change mode, then handle a global variable (or class attributes) to memorize the display mode. Set it in the PAI when display or change icon are pressed. Use this variable in a LOOP AT SCREEN in the PBO.