cancel
Showing results for 
Search instead for 
Did you mean: 

Reference to the component controller in the window

Former Member
0 Kudos

Hello All,

Can we get the reference of the component controller in the method of the window..

Warm Regards,

Smita

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

You must have reference of "WD_COMP_CONTROLLER" in your attribute ,and if not then create it to ref to "IG_COMPONENTCONTROLLER" in ur view.

Nirad

Former Member
0 Kudos

Yeah, the attribute wd_comp_controller refers to your component controller, in views and window.

Former Member
0 Kudos

Hi,

you can use the Attribute "WD_COMP_CONTROLLER" to acess the Component Controller Components

cheers

Former Member
0 Kudos

Vinod,

In the window we do not get a reference to the WD_COMP_CONTROLLER..

only WD_THIS and WD_CONTEXT is available..!!

Former Member
0 Kudos

hi,

No you have three attribute for the Window an done among them is "WD_COMP_CONTROLLER" . you can check this in the attributes tab of your window

cheers

Former Member
0 Kudos

I checked with the attributes tab os a window...but we have only 2 attributes as I said earlier..WD_THIS and WD_CONTEXT..!!...Please do confirm on the same..

Warm Regards,

Smita

Former Member
0 Kudos

hi,

i think the you are checking on the Component Controller's attribute tab, so what you do is double click on the windows you created and then you see the attributes tab, you will find three attributes there

cheers

Former Member
0 Kudos

I wanna write a code in the handle default method of the window wherein I need to get the message manager, which as per my knowledge we need to get it through the component controller itself..!!

Vinod can you please have a check at your end too for the window attributes tab..!!!

Former Member
0 Kudos

hi,

if you want to get the message manager you use the api in the following way

data: obj_msg type ref to if_message_manager,

lr_component_api TYPE REF TO if_wd_component.

lr_component_api = wd_comp_controller->wd_get_api( ).

obj_msg= lr_component_api->get_window_manager( ).

cheers

Former Member
0 Kudos

hi,

sorry there is mistake in the method name it should be

obj_msg= lr_component_api->get_message_manager( ).

instead of

obj_msg= lr_component_api->get_window_manager( ).

cheers

Former Member
0 Kudos

yeah Vinod..

But the basic idea is to have a refernce of wd_comp_controller in the window...which we dont have...!!!

Former Member
0 Kudos

1.Go to property tab of window.

2.Define component usage

3.go to ur window and method u wanna write code in

4.Click on method call used component

5.write component name and method WD_GET_API()

And u will get wat u required.I guess.Hope it helps.

Nirad

Former Member
0 Kudos

hi,

you need not have manually include the component controller name in the properties tab of the window.

beacuse if you embed the view in the window automatically that gets added and i think you have not embeded any view in your window

cheers

Former Member
0 Kudos

The changes (actually an enhancment) I am refering to is in the standard component...What I am expected to do is to write a piece of code to access the message handler in the handle default method of the window...this will be done in enhancement points..!!...so there are no hassels as to whether the view is embedded in the window or not..!! The view is very much embedded into the window..!!...the major concern is to get the reference of the component controller in a particular method of the Window..!!

I hope the problem is pretty clear by now..!!

Warm Regards,

Smita

Former Member
0 Kudos

HI,

Try doing in this way

data: lr_compcontroller TYPE REF TO ig_componentcontroller,

lr_component_api TYPE REF TO if_wd_component,

lr_message_manager TYPE REF TO if_wd_message_manager.

lr_compcontroller = wd_this->get_componentcontroller( ).

lr_component_api = lr_compcontroller->wd_get_api( ).

lr_message_manager = lr_component_api->get_message_manager( ).

cheers

Former Member
0 Kudos

hi,

there is one correection there

<b>use:</b> lr_compcontroller = wd_this->get_componentcontrolle_ctr( ).

<b>instead of</b>:lr_compcontroller = wd_this->get_componentcontroller( ).

Former Member
0 Kudos

Vinod..hard luck ...!!!...

This is what i get..!!!...The interface IF_POWL_TABLE has no such method to retrieve the reference for the component controller...:-(....

***********************************************************************************************

Web Dynpro Comp. / Intf. POWL_TABLE_COMP,Web Dynpro Window POWL_TABLE

Pre-Exit PST46K50FS40BKOKLYAGE0SR3P6M for HANDLEDEFAULT

Method "GET_COMPONENTCONTROLLER_CTR" is unknown or PROTECTED or

PRIVATE.

***********************************************************************************************

Web Dynpro Comp. / Intf. POWL_TABLE_COMP,Web Dynpro Window POWL_TABLE

Pre-Exit PST46K50FS40BKOKLYAGE0SR3P6M for HANDLEDEFAULT

Method "GET_COMPONENTCONTROLLER" is unknown or PROTECTED or

PRIVATE.

***********************************************************************************************

Web Dynpro Comp. / Intf. POWL_TABLE_COMP,Web Dynpro Window POWL_TABLE

Pre-Exit PST46K50FS40BKOKLYAGE0SR3P6M for HANDLEDEFAULT

Method "GET_COMPONENTCONTROLLE_CTR" is unknown or PROTECTED or

PRIVATE.