cancel
Showing results for 
Search instead for 
Did you mean: 

Explanation property bind to context element

Former Member
0 Kudos

How do you bind the "Explanation" property of a UI element to a context element?

When I click on the binding option, it does not give me an option to bind to a context element.

Thanks.

Giscard

Accepted Solutions (0)

Answers (2)

Answers (2)

ramakrishnappa
Active Contributor
0 Kudos

Hi Giscard,

There is no provision to bind the property to a context attribute.

I agree with Mr. Kiran, that we can bind it to an OTR text alias or we can set a text of type string.

For setting explanation dynamically, you can use the method SET_EXPLANATION of ui element's class.

Sample code:

               data lo_input_field          type ref to cl_wd_input_field.

               data lv_exp_text             type WDY_MD_TRANSLATAB.

                 

               lo_input_field      ?= view->get_element( id = 'PERNR' ).

                 

               lv_exp_text = 'some text'.            

               lo_input_field->set_explanation( value = lv_exp_text ).

Hope this helps you.

Regards,

Rama

Former Member
0 Kudos

Thanks for the replies.

I would like to dynamically assign text to the explanation property of a radiobutton.  The thing is, the radiobutton is in a multipane.  Would you know how to dynamically get the radiobutton object if it's in a multipane?  Do the UI elements within a multipane have an index?  Will it be something like below?  How do I specify the index?

lo_radiobutton ?= view->get_element( id = 'RADIOBUTTON01' ).

Thanks.

Giscard

former_member184578
Active Contributor
0 Kudos

Hi,

The explanation property is not bindable. It's a static text. You can enter the text manually or it can be an OTR text ( if translation is required).

If you want to set text dynamically, you have to use dynamic programming in DOMODIFYVIEW method and set the explanation text.

Hope this helps u,

Regards,

Kiran