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: 

How to create a dialog screen with dynamic radio buttons

eric_jiang
Explorer
0 Kudos

Hello experts,

I have an ABAP report and in runtime my program needs to calculate information and then pop up a selection dialog to user in which there are maybe 2 - 4 radio buttons provided for user's selection based on the calculation result. I have no idea how to create such generic UI dialog or whether there are any standard SAP functions provided for this case? Can anyone give any suggestions or guides about this? Thanks.

Best regards,

Eric

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Create a screen with 4 radio buttons and during PBO of the screen, check your conditions and if you need 2 radio button, mark the other two as invisble.

6 REPLIES 6

Former Member
0 Kudos

Hi,

You can try by creating new dialog screen which will hold the radio buttons and call this subscreen based on the calculated results.

Thanks,

Lakshmi

Former Member
0 Kudos

Create a screen with 4 radio buttons and during PBO of the screen, check your conditions and if you need 2 radio button, mark the other two as invisble.

0 Kudos

Hi Shambu VS,

Thanks for replying. In my case, the radio button label should also be dynamic which depends on the conditions (e.g. sometimes they may be radio 1: system A; radio2: system B; sometimes may be radio1: Client A; radio 2: Client B), is it possible to do that? And can you provide any key example code or tutorial URL? Thanks.

0 Kudos

Hi Eric,

You can change the Radio button text dynamically.

Check this link.

http://scn.sap.com/thread/115450

0 Kudos

Hi Shambu,

The link you provided seems just to show how to change the text in selection-screen block. But how to change it in a PBO when using pop up screen? Thanks.

Former Member
0 Kudos

Hi,

Create a screen of type Modal dialog box. Call this screen from your program.

Create maximum radio buttons which you can display based on your calculation.

In PBO of this screen, use loop at screen to display the radiobuttons based on your calculation. Hide the rest of the radiobuttons.