Skip to Content
Former Member
Sep 03, 2013 at 07:52 AM

get the view from the component controller



i have a understanding Problem here.

In my View BERUFUNGSVERFAHREN is a ButtonChoice Element called "LV_1_BUTTON" with 3 Action Items in it.

the goal was to set a Action Item dynmamicly

this is my Coding in my View BERUFUNGSVERFAHREN

DATA lo_view TYPE REF TO if_wd_view.
DATA lo_buttonchoice TYPE REF TO cl_wd_button_choice.
DATA lo_menuactionitem TYPE REF TO cl_wd_menu_action_item.

* Get a reference to the ButtonChoice view object
lo_view ?= wd_this->wd_get_api( ).

* lo_buttonchoice ?= lo_view->get_element( 'LV_1_BUTTON' ).
* lo_buttonchoice->SET_SELECTED_ACTION_ITEM( 'RUF_1_NEUTRAL' ).
lo_buttonchoice ?= lo_view->get_element( BUTTON_CHOICE_ID ).

This workes fine for me in my VIEW but now i want to push this coding in my Componentcontroller to use as a method. (MVC-Modell)

And there i got this Dump "Dynamischer Typkonflikt bei Zuweisung von Referenzen "

I think this is happening because of my first line

DATA lo_view TYPE REF TO if_wd_view.

if i am right, maby i need to get first the reference of the VIEW ? Because i am now in my Componentcontroller.

Can u Help me here please.?

kind regards