cancel
Showing results for 
Search instead for 
Did you mean: 

How can we call the method of used controller?

Former Member
0 Kudos

Hi All,

i created two WDA Applications.( like YWDA1,YWDA2 ) . i am using the component WDA2 in WDA 1.and displaying the one view of WDA2 as popup window in WDA1 on action of one of the input element in the view of WDA1 by using the method l_window_manager->create_window_for_cmp_usage

.

I have a button on the view of WDA2 which has appear in the popup window...how can i call the method which has binded to that button....and where should i code that...and i need to assign selected value in the popup window to input elemetn of view WDA1

Please help me to resolve this....

Regards,

Ravi

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member262988
Active Contributor
0 Kudos

Hi,

Try with create_window instead of create_window_for_cmp_usage

if the button is in the layout of the view, write the code in the button handler

else if the button which you see is the default button of the popup, subscribe the button first, create an action for it and write the respective code for it in the action handler..

Thanks,

Shailaja Ainala.

abhimanyu_lagishetti7
Active Contributor
0 Kudos

You can not directly call view's event handler from other component.

create a method in component controller of the second component and in the button click call the component controller method. ( also make the method as interface so that you can call it from other components )

Now, you can call the interfacecontroller's method

DATA: l_ref_INTERFACECONTROLLER TYPE REF TO ZIWCI__VSTX_REBATE_REQ_WD .

l_ref_INTERFACECONTROLLER = wd_This->wd_CpIfc_<comp usage name>( ).

l_ref_INTERFACECONTROLLER->Save_Rr(

STATUS = '01' " Zvstxrrstatus

).

save_rr is the method of second component controller

Former Member
0 Kudos

Hi Abhi,

Thanks for replying, yes i am able to call the method of other component.But where should i code this .i mean in which method i need to code this.....

Regards,

Ravi

Former Member
0 Kudos

Hi Abhi,

it is working fine no issue....But how can assign the Selected value in the popup window to one of the input element of Main View..

Regards,

Ravi

arjun_thakur
Active Contributor
0 Kudos

Hi Ravi,

The value which are a selecting in pop up window i.e. WDA2, get it in an interface node and map that node with WDA1 and then use the value of that node by simply reading it with the help of code wizard.

Regards

Arjun

Former Member
0 Kudos

hi Arjun,

i follwed the same as u mentioned above......just i map the Interface node to context of view WDA1 ...it is not throwing any error while activating....But While testing it is getting dump and stating that The lead selection has not been set. USE

What could be the problem...How can i resolve that...

Regards,

Ravi