on 10-09-2009 12:27 PM
HI all,
I want to know how to call a component controller attribute from inside a View's method?
any sampe coding..?
Regards,
Shanthi
if u have declared a attribute in ur component controller , thn u can acess it in ur view using
wd_comp_controller->gv_variable
where name of ur context attribute in comp controller is gv_variable
u cn do it thru code wizard as well
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, you can use the wizard. Just call any method from the component controller. The wizard will create you the code including the line how you will get a reference to the component controller, which is the point here.
After you have the reference to the component controller, let's say lo_component_controller, you can access its attributes like this:
lo_component_controller->your_attribute
Then of course delete the unnecessary lines of code.
Regards,
Karri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can use
lv_var is in comp controller attributes tab.
wd_comp_controller->lv_var
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Older Support Package levels didn't have the built-in attribute for WD_COMP_CONTROLLER. You had to use the following code to access the component controller:
DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).
Actually some of the code wizards still generate this even now that we have WD_COMP_CONTROLLER built in.
User | Count |
---|---|
86 | |
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.