on 01-18-2012 9:58 AM
How Attributes declared in Component level can be used in All the views
For Example :
say : context type ref to if_wd_context_node.
is declared at component controller level and check box public is checked !!
How can we use this any view in same WDP Component..
For suppose : in this case
We want to get the ref of child node using above declared attribute..
How is it possible?
Say in detail
You have already WD_CONTEXT variable declared in attributes tab right...
Anyways, if you want to access any attribute of component controller->
wd_comp_controller->context-> ........... this way you can use it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you so much for replying .....
How can we declare tables,attribute,like <xxxxx> type ref to <xyz class>
at component controller level and how can we use the tables and the <xxxxx> in the all views?
Do we need to do any mapping kind of a thing like for the context we do from comp level to view level...
Please reply briefly in each cases tables and any other ....
Thanks in Advance
You can do this by doing the exact same like you did with the if_wd_context_node.
1. Define attribute in Comp Controller and set it PUBLIC.
2. Access the attribute over the reference of the comp controller, i.e. wd_this within the comp controller itself or wd_comp_controller within somewhere else in the component.
So if you have, lets say, this defined as attribute in your comp controller:
Z_MY_TABLE_REF [X] TYPE REF TO [X] PUBLIC CL_WD_TABLE.
And then you want to catch the reference into a local variable within a method or the like within a view:
DATA: lo_my_table_ref TYPE REF TO CL_WD_TABLE.
lo_my_table_ref = wd_comp_controller->z_my_table_ref.
Lekha has already said so as well, I don't really understand where the problem is
Cheers, Lukas
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.