cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic radio button in web dynpro abao

Former Member
0 Kudos

Hi expert,

I want to dynamic radio button by web dynpro abap .

Kindly give me a soulation ASAP.

Thanks and regard's

Vikash

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

method wddomodifyview .

if first_time eq abap_true.

data: LR_CONTAINER type ref to CL_WD_UIELEMENT_CONTAINER,

LR_RADIOBUTTON1 type ref to CL_WD_RADIOBUTTON,

LR_RADIOBUTTON2 type ref to CL_WD_RADIOBUTTON,

LR_FLOW_DATA type ref to CL_WD_FLOW_DATA.

" bind text property will give TEXT that appears next to Radio Button

CALL METHOD cl_wd_radiobutton=>new_radiobutton

EXPORTING

bind_selected_key = '01'

BIND_TEXT = 'saurav'

receiving

control = LR_RADIOBUTTON1.

" bind text property will give TEXT that appears next to Radio Button

CALL METHOD cl_wd_radiobutton=>new_radiobutton

EXPORTING

bind_selected_key = '02'

BIND_TEXT = 'mago'

receiving

control = LR_RADIOBUTTON2.

LR_FLOW_DATA = CL_WD_FLOW_DATA=>NEW_FLOW_DATA( element = LR_RADIOBUTTON1 ).

LR_FLOW_DATA = CL_WD_FLOW_DATA=>NEW_FLOW_DATA( element = LR_RADIOBUTTON2 ).

LR_CONTAINER ?= view->GET_ELEMENT( 'ROOTUIELEMENTCONTAINER' ).

LR_CONTAINER->ADD_CHILD( LR_RADIOBUTTON1 ).

LR_CONTAINER->ADD_CHILD( LR_RADIOBUTTON2 ).

endif.

endmethod.

Thanx.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

Please use radio button group class

Best Regards

Ravi Golla

arjun_thakur
Active Contributor
0 Kudos

Hi Vikash,

Refer these blogs on dynamic programming:

/people/thomas.szcs/blog/2005/12/28/dynamic-programming-in-web-dynpro-abap--introduction-and-part-i-understanding-ui-elements

/people/thomas.szcs/blog/2006/01/03/dynamic-programming-in-web-dynpro-abap--part-ii-handling-viewelements

/people/thomas.szcs/blog/2006/02/22/dynamic-programming-in-web-dynpro-abap--part-iii-aggregations-and-ddic-binding-of-viewelements

alos have a look at the code provided by Prashant in this thread:

I hope it helps.

Regards

Arjun