Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

change screen directly after input

Former Member
0 Likes
881

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

1 ACCEPTED SOLUTION
Read only

prasanth_kasturi
Active Contributor
0 Likes
656

Hi,

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

add the addition user command

> parameters p_mode type c length 3 as listbox visible length 25 USER-COMMAND ucomm default 'BIN' obligatory.

this may solve your problem

regards

prasanth

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

2 REPLIES 2
Read only

prasanth_kasturi
Active Contributor
0 Likes
657

Hi,

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

add the addition user command

> parameters p_mode type c length 3 as listbox visible length 25 USER-COMMAND ucomm default 'BIN' obligatory.

this may solve your problem

regards

prasanth

Read only

0 Likes
656

Thank you very much prasanth, this worked well!

regards