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: 

RADIO BUTTONS

Former Member
0 Kudos

Hi Abappers,

when i am working with radio buttons with interactive reports it is not working i have declare R1 is 'X' before case sy-ucomm it is not working .

Regards,

simba.

8 REPLIES 8

Former Member

Former Member
0 Kudos

hi Ravi....

There may be lot many scenarios working with radio buttons and interactive report.

could you please be a bit more clear with your question please.

regards

Former Member
0 Kudos

hi simba ravi,

as of what i have understood from your query...for interactive reporting...

u can check the following code from my program...

may b it helps u...

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t01.

PARAMETERS: alv_list RADIOBUTTON GROUP one DEFAULT 'X',

alv_grid RADIOBUTTON GROUP one,

clas_rep RADIOBUTTON GROUP one.

SELECTION-SCREEN END OF BLOCK b2.

END-OF-SELECTION.

IF alv_list = 'X'.

PERFORM create_fieldcatalog.

PERFORM display_data.

ELSE.

IF alv_grid = 'X'.

PERFORM create_fieldcatalog.

PERFORM display_data1.

ELSE.

IF clas_rep = 'X'.

PERFORM disp_data.

ENDIF.

ENDIF.

ENDIF.

let me know if it helps u..

with best regards

kanika

Former Member
0 Kudos

Hi,

I guess that you have not grouped all radiobuttons in one group.

in selection-screen declare all radiobuttons under one group.

and if you want to mark any radio button as selected then give it's default value as 'X'(capital).

let me give a code sample.

selection-screen begin of block b1 with franme title text-000.

p_opt1 radiobutton group rad1 default 'X'.

selection-screen skip.

p_opt2 radiobutton group rad1.

selection-screen skip.

p_opt3 radiobutton group rad1.

selection-screen skip.

selection-screen end of block b1.

You can check the value in start-of-selection event using this code

if p_opt1 = 'X'.

statements.

elseif p_opt2 = 'X'.

statements.

else

statements.

endif.

Thanks. If you find this helpful then please let me know.

Former Member
0 Kudos

Hi,

there is no need of using sy-ucomm.

in selection screen put all the radiobuttons in one group.

use the syntax like that:

SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE t.

PARAMETERS: RB1 RADIOBUTTON GROUP g1,

RB2 RADIOBUTTON GROUP g1,

RB3 RADIOBUTTON GROUP g1.

SELECTION-SCREEN END OF BLOCK b.

and then use the following pattern.

if RB1 = 'X'.

statements.

elseif RB2 = 'X'.

statements.

else

statements.

endif.

Thanks

Rajesh Kumar

Former Member
0 Kudos

Hi

[Radiobuttons|http://sapprograms.blogspot.com/2008/04/selection-screen-with-radio-buttons.html]

Regards,

Sravanthi

Former Member
0 Kudos

hi

lot of scenarieos will be there , to work with radiobuttons otherwise do one thing give sscrfields-uccom = 'X'.

and at top declare tables : sscrfields

david_carballido
Active Participant
0 Kudos

Hi ... I'm working with radiobutton of this form:

SELECTION-SCREEN BEGIN OF BLOCK blq1 WITH FRAME TITLE text-t01.
  SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: p_rad1 RADIOBUTTON GROUP gr1 USER-COMMAND uc DEFAULT 'X'.
    SELECTION-SCREEN COMMENT 5(55) text-c01 FOR FIELD p_rad1 MODIF ID 1.
  SELECTION-SCREEN END OF LINE.
  SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: p_rad2  RADIOBUTTON GROUP gr1.
    SELECTION-SCREEN COMMENT 5(55) text-c02 FOR FIELD p_rad2 MODIF ID 1.
  SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK blq1.

Whit sentence USER-COMMAND the radiobutton has event user command