cancel
Showing results for 
Search instead for 
Did you mean: 

Radio Button Default in a Radio button Group

Former Member
0 Kudos

Is there a way to specify a particular radio button as the default among the two or more radio buttons which have been grouped together by 'Radio Button Group --> Define' on a Screen. At the moment it defaults to the first radio button on the screen.

An example would be a choice of three radio buttons 'YES', 'NO' and 'MAYBE'. At the moment it defaults to 'YES' because it is placed first on the screen. I would like it to default to 'MAYBE'.

I guess I can always setup the default in the PBO. But I'd like it do it on the screen. Any thoughts?

Many Thanks in Advance.

Sanjay

Accepted Solutions (1)

Accepted Solutions (1)

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Use <b>default</b>.

parameters : rb1 radiobutton group g1,

rb2 radiobutton group g1 default 'X'.

If your problem is solved,kindly reward points for useful answers and close the thread.

Message was edited by: Jayanthi Jayaraman

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

If you are using a dynpro, then you will need to set it in the PBO.

P_RAD1 = space.

P_RAD2 = space.

P_RAD3 = 'X'.

If you are using a selection-screen, then Jayanthi's suggestion will do the trick.

Regards,

Rich Heilman

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks to all who replied.

The PBO option suggested by Rich looks like the only option at the moment but I was thinking of finding a way of specifying it in the Element Attributes via the Element List(F7) etc. in the screen painter.

Thanks once again.

Sanjay

athavanraja
Active Contributor
0 Kudos

Hi Sanjay,

Since you are only 3 posts old in ABAP forum, may i request you to have a look at the following link (weblog) on how to say THANKS the SDN way?

/people/mark.finnern/blog/2004/08/10/spread-the-love

Regards

Raja

Former Member
0 Kudos

Hi Raja,

To be honest I am at a loss to understand you.

Are your remarks a result of my 'writing' thanks in the message? Or do you want me to reward 10 points to a post which has not solved my problem?

Inspite of the limited time I have been on this forum coupled with the limited understanding of things I have in general, I did reward the posts with being 'a very helpful answer' or 'a helpful answer' but I am sorry I cannot say a post has 'solved my problem' when it has not.

And thanks for the link. I do believe in spreading the love. Please let me know if you are not able to see the yellow and green stars against some of the posts above. Kindly also let me know if I am wrong in thinking that my problem has not been solved.

Regards

Sanjay

athavanraja
Active Contributor
0 Kudos

Hi Sanjay,

First of all i am sorry if you are hurt by my intervention.

I just read your last post saying thanks, didnt find the stars marked with points. Now i can see the points. also i read the start of the thread and found that your intended soltuion has not been achieved by the answers.

Regards

Raja

Former Member
0 Kudos

Hi,

Try this one

SELECTION-SCREEN BEGIN OF BLOCK b_layout WITH FRAME TITLE text-b06.

PARAMETERS: rb_hier RADIOBUTTON GROUP 003,

rb_sku RADIOBUTTON GROUP 003,

rb_plant RADIOBUTTON GROUP 003,

rb_norej RADIOBUTTON GROUP 003,

rb_rej RADIOBUTTON GROUP 003.

SELECTION-SCREEN END OF BLOCK b_layout.

In there are three radio buttons u can select according to ur choise but default will be first, if u want to make any other things default

rb_sku RADIOBUTTON GROUP 003 default 'X'.

Also if u want to do any manupulation on the radio button u can select as

If rb_sku = 'X'.

Perform...

Endif.

Thanks & Regards,

Jduith.