cancel
Showing results for 
Search instead for 
Did you mean: 

Radio Button question

Former Member
0 Kudos

First of all, I apologize for my lack of ABAP experience, so I'm sorry if I'm using the wrong terminology here at any point.

I have a model that is tied to an RFC. In that model, I have two attributes - Addr_partner and Addr_connobj. The ABAP developer that created the RFC for me said these are both of type "inidcator checkbox".

I can create a checkbox and set the "checked" property to either of these two attributes.

The problem is, I really only want one or the other selected, so I really want to use a RadioButtonGroup. But I can't figure out an easy way to do that.

The only way I have come up with is to create Simple Type, create a Value Attribute of that type, and use that in a RadioButtonGroupByKey. But then I have to write code to get the selected value into the model attributes so that I can properly execute the RFC.

I'm not sure if I'm making much sense... but I'm hoping there's a better way to do this?

Thanks,

Jennifer

Accepted Solutions (1)

Accepted Solutions (1)

abhijeet_mukkawar
Active Contributor
0 Kudos

Hi,

something about radio button:

Every unique value of IWDRadioButton defined by <b>KeyToSelect</b> property. So bind IWDRadioButton.keyToSelect to attribute Addr_partner for one radio button and Addr_connobj for other radio button. here you can set the values of them.

<b>SelectedKey</b> attribute must be shared across all radio buttons that form logical "radio button group". In your context design every radio button has unique SelectedKey, so you have one group with only one button. So create on attribute which is assigned then to both the radio buttons SelectedKey property to hold them together in one group.

here you can solve you problem by not going for the radiobuttongroupbykey, instead go for the individual radio button and follow above process for them.

hope it helps

let me know if you face any problem

regards

Former Member
0 Kudos

Perfect! That's exactly what I wanted!

Thanks Abhijeet!

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Jennifer,

Why dont u try to assign the datatype of the radibuttonGroup's context variable from the model's type. You can assign this from Dictionary->Ur Model of the project. Make Sure u r using RadioButtonGroupByKey

Regards

Fahad Hamsa

Former Member
0 Kudos

Hi Jennifer A. Jacobs ,

I have tried understanding your question, but I think this answer will help you.

You have create a Node and then number of attributes according to the number of radio buttons.

By setting the properties of the the attridutes, you can have access to the Radiobuttongroup.

This link will discuss about the Radio Button Group.

http://help.sap.com/saphelp_nw04/helpdata/en/74/450e8af57065468e88e4b86de47e4b/frameset.htm

regards

Vivek.