Skip to Content
0
Former Member
Jul 21, 2008 at 07:18 AM

change screen directly after input

225 Views

Hey!

I have defined an input field on my selection screen as a Listbox:

parameters p_mode type c length 3 as listbox visible length 25 default 'BIN' obligatory.

Then I filled the Listbox with the two Values 'BIN' and 'ASC', they are displayed and everything works fine.

Now I have two more fields which depend on the current value of p_mode, they should only be displayed if p_mode = 'ASC' and mustn't be displayed if p_mode = 'BIN'.

For now I use the event AT SELECTION SCREEN OUTPUT, where I put this code:

" show/hide options for text mode
  loop at screen.
    if p_mode = 'ASC'.
      if screen-group1 = 'G_1'.
        screen-active = 1.
        modify screen.
      endif.

    elseif p_mode = 'BIN'
      if screen-group1 = 'G_1'.
        screen-active = 0.
        modify screen.
      endif.
    endif.
  endloop.

This is also working, but this event is only triggered if the user submits his input by pressing ENTER. As this input field is a Listbox, in my opinion there is no need to press enter to submit a input, this would be a bad user interface design. Is is somehow possible to change the visibility of the depending fields on the fly, just when the user changes the value of the listbox?

Thanks in advance,

regards