Quantcast
Channel: SCN : All Content - Web Dynpro ABAP
Viewing all articles
Browse latest Browse all 3667

get the view from the component controller

$
0
0

Hi,

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 ).
        lo_buttonchoice->SET_SELECTED_ACTION_ITEM( ACTION_ITEM_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

tk


Viewing all articles
Browse latest Browse all 3667

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>