on 12-07-2010 8:48 AM
Hi experts,
I am beginner in Web DynPro ABAP. I have declared Attribute ELEM in 'Attributes' tab of COMPONENTCONTROLLER. I have declared ELEM type as IF_WD_CONTEXT_ELEMENT as I want to save Lead_Selection() in it. Now I want to SET value to ELEM from method of some view.
How it can be done?
hi SwapnilR
look at the below sample senario to get attribute from the component controller
Example :
create a attribute in component controller .
CC_ATTRIBUTE type STRING ( public check box shoul be checked so that the scope of attribute will be in entire component )
assign value to the attributr in component controller ( do init method )
wd_this->CC_ATTRIBUTE = ' HAI'.
Now get this value in any view
*getting component controller attribute value in view
data :COMP_CONTROLLER type string .
COMP_CONTROLLER = wd_comp_controller->CC_ATTRIBUTE . " to get HAI
Regards
chinnaiya P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You have a code Generator in webdynpro . you use it to get the reference of the leadselect element and assign this reference to your comp_controller attribute.
for example. DATA is my node name.
DATA lo_nd_data TYPE REF TO if_wd_context_node.
DATA lo_el_data TYPE REF TO if_wd_context_element.
DATA ls_data TYPE wd_this->element_data.
navigate from <CONTEXT> to <DATA> via lead selection
lo_nd_data = wd_context->get_child_node( name = wd_this->wdctx_data ).
get element via lead selection
wd_comp_controller->ELEM = lo_nd_data->get_element( ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.