cancel
Showing results for 
Search instead for 
Did you mean: 

Performance improvement in Web Dynpro..

Former Member
0 Kudos

Hello Gurus,

I need help regarding the performance in web dynpro, I have an application to develop in that process in single view I need to call get_static_attributes, get_attribute, bind_structure more than once within methods of the same view. Is there any way such that I can have the object of the node once and reusing the object more than once please help me out.

Regards,

Nagendra

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

You can use global variables as recommended but when you have data in context, you do not need to use global variables.

When using global variables, WD_THIS->(Global_variable_name) would be required to access. When you define the variable in component controller, use wd_comp_controller-> variable name reference. similarly WD_ASSIST-> would help for variables in assistance class. 

Methods "get_static_attributes, get_attribute, bind_structure" are methods that refer to context elements. Indirectly they are pointers. Feel free to use them. this shouldn't impact performance much. There are other areas in your design where you can also look for performance impormenet like for eg., If you using FM's to extract data in your WD application, make sure they are well optmized by which I mean, using global elements cautiosly etc., coz the entire function group is loaded in memory.

Another way I could think of , for each of the context nodes, define pointer variables of (reference) type 'IF_WD_CONTEXT_NODE' and in init method, write code to initialzie these pointers pointing to right nosed.

For example, lets say we have a node 'TEST' in context.

1. Define WD_CONTEXT_TEST attribute in global attributes with refernce type as 'IF_WD_CONTEXT_NODE'.

2. in INIT method, use the following code

  wd_this->wd_context_test = wd_context->path_get_node( path = `TEST` ).

Try this if it works. 

Former Member
0 Kudos

Hello,

Any one out there please help me

Former Member
0 Kudos

Hi Nagendra

Use methods get_static_attributes, get_attribute, bind_structure and store the values in global variables/Itab declared in assistance class or delcared in component controller.

So that you can just use that variables/Itab anywhere in your webdynpro component without using that methods again.

Thanks

KH