on 03-13-2014 5:05 PM
Hi Experts,
I have a requirement where i need to access context node used by component usage .
In particular i have Bt***h_srvo Component where customer_h is used by component usage.
how to access this context node of customer_h in SRVO Component ????
Is it Possible to add attribute dynamically as check-box to customer_h in Srvo Component
without inheriting Customer_h component ???
Thanks and Regards
Alok
Hi, I managed to access the context node of a component usage in one of my projects with the code below.
Unsure if this is the best way of doing it, but it seems to work.
data lr_window type ref to cl_bsp_wd_controller.
data lr_comp_controller type ref to <<COMPONENT CONTROLLER CLASS FROM YOUR COMPONENT USAGE>.
"--- Get the interfaced window from your component usage...
lr_window ?= me->get_subcontroller_by_viewname( iv_viewname = 'CU_YOUR_COMPONENT_USAGE.USED_COMPONENT/MainWindow' ).
check lr_window is bound.
"--- Get component controller from component usage
lr_comp_controller ?= lr_window->m_parent.
"--- Check component usage context node size...
check lr_comp_controller->typed_context->parent->collection_wrapper->size( ) > 0.
"--- Get something out of the context node...
data(lv_id) = me->typed_context->your_context_node->collection_wrapper->get_current( )->get_property_as_string( iv_attr_name= 'ID' )
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.