on 09-10-2012 11:00 AM
Hello All,
I have a Main view in which i have a method ONACTIONGET_DATA.
How can I call this method from another view (VIEW1) in the same Webdynpro component.
I tried to understand the link below,But didnt able to call this method, Pls help.
Hello.
Create a new method in the component controller that shares those two views, and call it on method ONACTIONGET_DATA of Main view and at VIEW1 too.
Another option is to create the method in the Assistance Class of the Web Dynpro Component, and call it using the attribute WD_ASSIST of both views.
Regards,
Pablo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Venkat,
Create method in component controller. You can call that method in any view.
call method using WD_COMP_CONTROLLER->"u r Method Name".
Thanks,
Raju
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Ramanuja,
First go to Property of view1 there you have to click on used controller ( add view controller2 of the same component )
Now go to any method of View1, here using Code wizard you can call method of view2
Please let me know if you have any problem .
Thanks
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Abhishek,
Thanks for the reply
As you suggested i went to my view VIEW1 -( in this view i want to access MAIN views method)
in the properties tab of the VIEW1 i have clicked on create controller usage button and selected
MAIN view/controller.
Now I went to the method of VIEW1 and in code wizard, I have selected method call in current controller
radio buttion and through F4 selected main view, then i got the object reference of main view as below
DATA LO_WND_MAIN TYPE REF TO IG_WND_MAIN.
LO_WND_MAIN = WD_THIS->GET_WND_MAIN_CTR( ).
But now if i say
CALL METHOD LO_WND_MAIN->ONACTIONGET_DATA( ). it says this method is unknown...
am i doing something wrong?
Hello,
At properties tab you have added the controller usage of the window controller where your MAIN view is embebed, not the view controller. I think that adding the controller of a view to another view is impossible. So you should try what i wrote on my previous answer, create a method in the component controller with the code of the method ONACTIONGET_DATA, and call it in both views.
Component Controller is added by default in properties tab of the view.
Regards,
Pablo.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.