on 03-21-2006 9:01 AM
Hi All,
I created a internal table in a view say ABC_VIEW using a context node say ABC_NODE. This is did using following statement:
it_abc type table of if_abc_view=>element_abc_node.
Now I would like to pass this as a exporting parameter to a method in component controller. Kindly suggest how i can achieve this. I tried the following:
it_abc exporting element_abc_node.
But this does not work.
Kindly reply soon.
Regards,
Anoop
Message was edited by: Anoop Singh Saini
Hi Anoop,
Web Dynpro generates an internal table (and structure) for each context node in a controller's context. Such a definition is local to the controller where the node is defined, since a different controller could have a node of the same name with different attributes. Nonetheless, it is possible to transfer the data of a node to another controller by:
(a) Using a DDIC structure for a context node. The generated structure and the DDIC structure are the same then. The generated internal table is a standard table. If you define one in DDIC or somewhere else, you can use it for typing the parameter.
(b) Transfer the pointer to the node! You can still access it from any other place.
Best regards,
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
Thanks for suggestion but in my case i have already written the two methods of which one is in view and other in component controller so i thought incase we could make a direct communication link then it would have been good .. i knew this DDIC thing but was hesitent in creating a structure i guess i now will have to use this approach only ..
Thanks again.
Regards,
Anoop
Hi Thomas,
Just curious to know how you can pass pointer to that node. So can you please post the solution or the steps that i should take to achieve my objective using the second approach, "(b) Transfer the pointer to the node! You can still access it from any other place.", suggested by you.
Regards,
Anoop
Message was edited by: Anoop Singh Saini
Hi Anoop,
Just get the pointer to the node via one of the usual methods, like GET_CHILD_NODE of wdContext or any other way you like. Then create a parameter of your method foo type it as "type ref to IF_WD_CONTEXT_NODE". The sample coding below will pass a pointer of child node "bar" of wdContext to the method.
data lr_node type ref to if_wd_context_node.
lr_node = wd_context->get_child_node( 'BAR' ).
foo( lr_node ).
Best regards,
Thomas
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
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.