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: 

Parameters on selection screen visible/invisible using push buttom

kalleshraj5554
Explorer
0 Kudos
1,580

How to make input parameter in selection screen visible and invisible based on push button clicked in selection screen

7 REPLIES 7

0 Kudos
599

Hello sir

My requirement is not using radio buttons,

using push buttons, on selection screen

Please share me some blogs regarding

Thank you

0 Kudos
599

Use Google, or any other search engine, and you will find what you're looking for. Examples on selection-screen push buttons:

https://www.trailsap.com/abap-statements/?keyword=selection-screen_pushbutton

https://answers.sap.com/questions/2882571/how-to-insert-pushbutton-in-selection-screen-and-i.html


Kind regards,
Mateusz

kalleshraj5554
Explorer
0 Kudos
599

Thank you so much for ur response sir 🌷

0 Kudos
599

Use comment Button for your response, Answer option is only for content contributing towards Answer.

VXLozano
Active Contributor
0 Kudos
599

Check the help for the selection screen elements. Mainly about USER-COMMAND and MODIF ID options.

I assume the main idea is to hide/show some parameters based on some user choices. The best way I found to do it is to use radiobuttons, with the USER-COMMAND option added, and to add MODIF ID to the parameters who must be shown or hidden based in the options selected.

When the user changes/clicks over a radiobutton with the USER-COMMAND informed, the AT SELECTION-SCREEN OUTPUT event is raised.

There you can check the radiobutton value and use the usual LOOP AT SCREEN to show/hide the rest of the parameters via "if screen-group** = 'xxx'"

Look around, this place has a lots of posts about this issue. I'm writing this from memory(id), so this post is not too accurate. I'm sure you will be flown with links and copies from SAP help's pages.

Good luck!

Edition: fast code snipet, as I had to do it this week:

parameters: p_hide radiobutton group sel user-command ole,
            p_hide type matnr modif id mat.

at selection-screen output.
  loop at screen.
    if screen-group1 = 'MAT' and p_hide = 'X'.
      screen-active = '0'.
      modify screen.
    endif.
  endloop.

Sandra_Rossi
Active Contributor
0 Kudos
599

Just search the Web:

How to make input parameter in selection screen visible and invisible based on push button clicked in selection screen site:sap.com