Application Development 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: 

Dynamic selection screen

0 Kudos

Hello Gurus,

I'm looking for a way to create a dynamic selection screen.

I have a checkbox in my selection screen and I want to modify the name of an other field if my selection screen if the check is inital.

Thanks in advance for your help

For exemple

 IF p_flag IS  INITIAL.
    s_date FOR ERDK-BUDAT .
  ELSE.
    s_date FOR ERCH-BEGABRPE.
  ENDIF.
3 REPLIES 3

Sandra_Rossi
Active Contributor

Maybe it's more simple to use 2 different SELECT-OPTIONS and display only one of them via LOOP AT SCREEN and MODIFY SCREEN, during the AT SELECTION-SCREEN OUTPUT event.

raymond_giuseppi
Active Contributor

Do you actually only want to change the descriptive text of the parameter so it could be easily done with a SELECTION-SCREEN COMMENT FOR FIELD s_date statement (wrap the SELECT-OPTIONS or PARAMETERS and the COMMENT statement between BEGIN/END OF LINE) and change the text value in the PBO AT SELECTION-SCREEN OUTPUT.

If you also want to change F4 and F1 behavior, you can handle it in ON {HELP-REQUEST|VALUE-REQUEST} FOR s_date.

NB: sandra.rossi's solution would be easier, less code, define 2 select-options and hide one within the OUTPUT event, you can copy values from the second range into the first and vice-versa so you always use the same range in the following code.

ennowulff
Active Contributor

Use one of those function modules on section "AT SELECTION-SCREEN OUTPUT":

  • SELECTION_TEXTS_MODIFY
  • SELECTION_TEXTS_MODIFY_DTEL