Application Development and Automation 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: 
Read only

Radio Buttons

Former Member
0 Likes
1,705

Hi Friends

My requirment is to write text after the radio button how to do that.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,684

try this


selection-screen begin of line.
parameters : r1 radiobutton group rb1.

selection-screen comment 3(10) text-001 for field r1.
parameters : r2 radiobutton group rb1.
selection-screen comment 18(10) text-002 for field r2.

selection-screen end of line.

regards

shiba dutta

Hi Friends

My requirment is to write text after the radio button how to do that.

8 REPLIES 8
Read only

Former Member
0 Likes
1,684

REPORT EVENT_DEMO.

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.

PARAMETERS: R1 RADIOBUTTON GROUP RAD1 DEFAULT 'X',

R2 RADIOBUTTON GROUP RAD1,

R3 RADIOBUTTON GROUP RAD1.

SELECTION-SCREEN END OF BLOCK B1.

SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME.

PARAMETERS: R4 RADIOBUTTON GROUP RAD2 DEFAULT 'X',

R5 RADIOBUTTON GROUP RAD2,

R6 RADIOBUTTON GROUP RAD2.

SELECTION-SCREEN END OF BLOCK B2.

AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD1.

IF R1 = 'X'.

write W040 .

ENDIF.

AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD2.

IF R4 = 'X'.

write well

ENDIF.

Message was edited by:

Karthikeyan Pandurangan

Read only

Former Member
0 Likes
1,684

Hi,

please check out the porgram below it might be helpful to you

PROGRAM demo_dynpro_check_radio .

DATA: radio1(1) TYPE c, radio2(1) TYPE c, radio3(1) TYPE c,

field1(10) TYPE c, field2(10) TYPE c, field3(10) TYPE c,

box TYPE c.

DATA: ok_code TYPE sy-ucomm,

save_ok TYPE sy-ucomm.

CALL SCREEN 100.

MODULE user_command_0100 INPUT.

save_ok = ok_code.

CLEAR ok_code.

CASE save_ok.

WHEN 'RADIO'.

IF radio1 = 'X'.

field1 = 'Selected!'.

CLEAR: field2, field3.

ELSEIF radio2 = 'X'.

field2 = 'Selected!'.

CLEAR: field1, field3.

ELSEIF radio3 = 'X'.

field3 = 'Selected!'.

CLEAR: field1, field2.

ENDIF.

WHEN 'CANCEL'.

LEAVE PROGRAM.

ENDCASE.

ENDMODULE.

***********please reward points if the information is helpful to you************

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
1,684

Hi,

Use selection-screen comment to give your text.

And make sure you are using it after the PARAMTERS: statement if you want the text after the radio button.

Also it would be god if you put this entire code in

Example

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS kurs type c RADIOBUTTON GROUP xxx MODIF ID aa.

SELECTION-SCREEN COMMENT 12(20) 'Label' FOR FIELD kurs.

SELECTION-SCREEN END OF LINE.

I recommend you to do a F1 on the SELECTIOn-SCREEN statement to get more info.

Regards,

Sesh

Read only

Former Member
0 Likes
1,684

Hi,

usually we get the text after the radio button only see this

PARAMETERS:male RADIOBUTTON GROUP rad,

female RADIOBUTTON GROUP rad.

rgds,

bharat.

Read only

Former Member
0 Likes
1,685

try this


selection-screen begin of line.
parameters : r1 radiobutton group rb1.

selection-screen comment 3(10) text-001 for field r1.
parameters : r2 radiobutton group rb1.
selection-screen comment 18(10) text-002 for field r2.

selection-screen end of line.

regards

shiba dutta

Read only

Former Member
0 Likes
1,684

HI,

<b>selection-screen begin of line.

SELECTION-SCREEN COMMENT 1(10) TEXT-001 FOR FIELD P1.

parameters: p1 radiobutton group gr1.

selection-screen end of line.</b>

<b>SELECTION-SCREEN COMMENT 1(10) TEXT-002 FOR FIELD P2.

parameters: p2 radiobutton group gr1.</b>

copy and paster the above code and see. you will find the difference and know how to comments text in selection screen.

rewards if useful,

regards,

nazeer

Message was edited by:

nazeer shaik

Read only

Former Member
0 Likes
1,684

SELECTION-SCREEN BEGIN OF BLOCK sel WITH FRAME TITLE txt.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(33) text-001 FOR FIELD r1.

PARAMETERS: r1 RADIOBUTTON GROUP rg1.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(33) text-001 FOR FIELD r2.

PARAMETERS: r2 RADIOBUTTON GROUP rg1.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN END OF BLOCK sel.

Reward if usefull.

Khalid

Read only

Former Member
0 Likes
1,684

Hi,

Try like this:

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: RD1 RADIOBUTTON GROUP RG1,

TXT1 TYPE C.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: RD2 RADIOBUTTON GROUP RG1,

TXT2 TYPE C.

SELECTION-SCREEN END OF LINE.

Regards,

Bhaskar