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: 

Help Needed in At selection screen output

Former Member
0 Kudos

Hi Experts,

I need your help in AT SELECTION SCREEN OUTPUT event. My issue is i have 4 radio button and with each radio button couple of parameters that need to be filled in selection screen of report. My requirement is that sometimes user enters details in second radio button parameters but forgot to change the radio button to second one so kindly suggest a solution so that radio button gets selected as per user input in parameter like if user clicks on certain parameter to enter value then automatically corresponding radio button gets selected.

Thanks in advance for all your help.

8 REPLIES 8

former_member183073
Active Participant
0 Kudos

For At Selection-Screen Output to be executed you need to have an event triggered by user manually like Pressing "Enter" Button.

1. Why don't you disable(make read Only) all the parameters initially and allow the user to select the radio button and on select of a particular RB enable only the Parameters Required. If the user selects another RB enable only the Parameters related to that RB.

2. The Logic as you asked:

     validate the fields entered by the user in AT SELECTION-SCREEN OUTPUT and select the required RB based on your requirement.

     Here problem can be when the user executes the report directly without Pressing Enter in this case AT SELECTION-SCREEN OUTPUT will not execute. it executes before the selection screen is displayed that would be when you return to the selection screen after execution of the report.

former_member217316
Contributor
0 Kudos

Hi Nitin

I would suggest you to go with radio button selection first before entering the parameters. I mean, depending on the radio button selected, display the fields associated with it.

See my attached screenshots. Let me know if you want its code.


Former Member
0 Kudos

you need to extend the radio button parameter with syntax for

user-command

in your at selection event you then check sy-ucomm and then act accordingly


0 Kudos

example from a checkbox in one of my progs..but you can do same approach with radio butts

parameters p_test as checkbox default abap_on user-command test.

at selection-screen.

    if sy-ucomm = 'TEST'.
      perform birth_mnth_chck.
    endif.

0 Kudos

Hi Steve

I need to check radio button on basis of user clicking on parameter to enter values like as soon as user click on any parameter then subsequent radio button should be checked on. could you please elaborate a little more on your code.

Thanks for your help....

0 Kudos


the only way you could do it with user command - which is a good way to do this type of requirement - is to define the parameter as a listbox...

i.e.

parameters p_bdate type zzdobmonth as listbox visible length 10 user-command test.

then do your event coding

raymond_giuseppi
Active Contributor
0 Kudos

You could hide/disable the parameters not useful for current selected radiobutton, so user will click on correct radiobutton. You request is the opposite of the usual rules ?

Nevertheless, in SAPGUI you can only trigger a PAI/PBO cycle when a  function key is triggered by user action : so only on, checkboxes, radiobutton, button, menu, dropdown lists and specific user actions like double-click. (Actually you could also trigger PAI with tool like CL_GUI_TIMER, but it's not worth it to complicate your program.


Regards,

Raymond

0 Kudos

You request is the opposite of the usual rules ? - that was what I thought   but he did stipulate in a further reply to me that it was parameter field dictating the button choice....but I agree that normally you would expect a radio button behaviour to dictate what select options or parameters may then be available...