cancel
Showing results for 
Search instead for 
Did you mean: 

Add OnSelect event to an standard field in web dynpro

0 Kudos

Hi all,

I need to implement onselect event for an standard field in web dynpro. I have enhanced the web dynpro but I'm not able to change anything in the standard fields.

What I want to do, to be precise, is to fire the event OnSelect for filed EDUCATION_TYPE in view VW_EDUCATION_DETAILS, component HRRCF_C_EDUCATION_UI.

Please help.

Thanks in advance.

MARTA

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Thanks again. I 'l bear in mind to solve my issue and I think it will work. I'll tell you the result.

But now priorities have changed for me. I need to hide an standard field that is of type radio-button depending on some other values. Could you please help me in this new issue?

Former Member
0 Kudos

Hi Jose,

If you want to hide fields use Personalization.

Please go through this...

Cheers,

Kris.

0 Kudos

Thank you for your reply Kris.

But we want to make a radio-button group invisible using WDDOMODIFYVIEW or WDDOINIT method in the view.

I want to bind the radio-button group visible property to an attribute and then set this attribute value depending on other nodes. I think if can bind the radio-button to the attribute, this is a way to put invisible the radio-button group.

Help please!

MARTA

former_member450736
Active Participant
0 Kudos

Hi,

As you said you can bind visible property to some attribute and make it hidden or visible based on whatever condition..

choose wddoinit only it is one time as this method executes once in lifetime of view controller, or choose wddomodifyview if you want to change it every time view is rendered or probably i guess your condition will be based on some action like clicking of button in that case go for respective action handlers or for that matter you can also use wddobeforeaction or wddoafteraction whichever suits well for action realted conditions.

0 Kudos

Hi,

my problem is how to bind a layout element to a context attribute. The Radio-button group I want to hide is an element in the layout. I think that method bind_element from IF_WD_CONTEXT_NODE interface is only for nodes and attributes declared in the context. Isn't it?

Thank you in advance.

MARTA

0 Kudos

Hi all!!

Finally I found how to solve my issue. In the method WDDOMODIFYVIEW I wrote this code to hide the radiobutton group PROFILE_RELEASE:

DATA: lo_elem_view TYPE REF TO if_wd_view_element,

lo_radiobutton TYPE REF TO CL_WD_RADIOBUTTON_GROUP_BY_KEY.

lo_elem_view = view->get_element( ID = 'PROFILE_RELEASE' ). "Get element in view

lo_radiobutton ?= lo_elem_view. "Cast

lo_radiobutton->set_visible( value = '01' ). "Set invisible.

Thanks everyone for your help.

Regards.

MARTA

0 Kudos

Thanks for the reply. I need more help. Could you please provide some example code for the method WDDOMODIFYVIEW.

former_member450736
Active Participant
0 Kudos
data:     lo_dd TYPE REF TO cl_wd_dropdown_by_key.

  lo_dd ?= view->get_element( 'DROPDOWN_KY' ).
  IF lo_dd IS BOUND.
    lo_dd->set_on_select(  'SELECT' ).
  ENDIF.

here DROPDOWN_KY is drop down by key UI's id ( you can find in the layout )

and you have to define the action ( select ) in the action tab, then you will have actionhandler for that, so you write your code there!!

former_member450736
Active Participant
0 Kudos

it is not possible in enhancement mode, what you have to do is in hook method

wddomodifyview get the reference of drop down and use method set_on_select to register the event handler and then do whatever you want!!!