on 09-19-2007 9:20 AM
Hi
I'm new to Webdynpro.
We have a tool which is developed using Webdynpro ABAP. My task is to improve the performance of this tool.
I see that a lot of code is getting repeated in all the VIEWS. Is it possible to group this similar code into one method and call it wherever needed across all the VIEWS?
My doubt is there is lot of coding done inside the VIEW methods using wd_this and wd_context etc....can i copy this code into a different method (and a different class) as wd_this and wd_context are relevant only in the views in which they are used?
Regards,
Ravikanth
Hi
Not all the attributes are shared between the view context controller and the component controller...hence creating a common method in component controller might not be possible.
Nithya : Is it ok to proceed with Assistance class in this scenario? Is it enough if i just replace the wd_this and wd_context with wd_assist?
Regards,
Ravikanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you guys,
Points have been rewarded.
Regards,
Ravikanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ravi,
ya you can easily reuse code by component controller
you copy this code to component controller method and call this method... You should follow MVC paradigm .. that means attributes and context nodes you should first make in component controller and share them in views wherever required.. now you should write methods in component controller and call this method from views..
Regards
Anuj Goyal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Group the common code into a method and place it in your component controller. It can be accessed from all the views using wd_comp_controller->metohd_name.
Or a better thing would be to use an assistance class and have your method there. This can be accessed using the object wd_assist, that will be visible across the component.
Regards
Nithya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.