‎2013 Aug 21 6:44 PM
Hi Experts!
I have a doubt but I'm not sure how to resolve this one.
I have a view Controller with some methods implemented. Within a method, at a certain point I'd like to access a method from another view Controller. Is this possible? If so, do I have to create a reference in Attributes Tab?
I tried to declare a reference with Reference Type IG_<nameofview> but gives me a warning saying it doesn't exist.
Any help would be appreciated.
Thanks,
Lauro Ribeiro
‎2013 Aug 22 7:26 AM
Hello,
Do one thing Create your node in component controller and method also in component controller and use the nodes ann method in both View.
for more use..
https://www.google.co.in/#fp=a4c17cf7a703bf9a&q=use+of+component+controller+in+webdynpro+abap
.. Chandra..
‎2013 Aug 21 9:53 PM
Hi Lauro,
The best thing you could do is implement those methods in the component's controller.
Martin
‎2013 Aug 21 10:06 PM
If you create a global class with a method you can use call service to call this method in web dynpro aplications.
See the link.
‎2013 Aug 22 7:26 AM
Hello,
Do one thing Create your node in component controller and method also in component controller and use the nodes ann method in both View.
for more use..
https://www.google.co.in/#fp=a4c17cf7a703bf9a&q=use+of+component+controller+in+webdynpro+abap
.. Chandra..
‎2013 Aug 22 12:14 PM
hi,
Create an assistance class and define your method in the assistance class.
You will get a default reference to the assistance class as WD_ASSIST in all your views.
Access your required method using this reference.
This way you can achieve the Webdynpro recommended MVC architecture also.
--
dp
Applexus technologies
‎2013 Aug 22 12:52 PM
hi lauro,
Writing method in the view controller are specific to that view you cannot access them in another view, if you want to share the method or reuse a method then put them in component controller or use assistance class for storing method at one place for reuse.
Thanks and regards,
Uppu Narayan
‎2013 Aug 22 1:06 PM
Alright guys thanks a lot for the help!
I assumed I could write the method in component controller but was concerned if that would go against the MVC architecture...
All of the suggestions worked but creating an assistance class seemed better for my case.
Cheers!