on 02-02-2011 1:12 PM
Dear gurus!
Component contains 2 different views and a custom controller.
First view is containing custom f4 help. Here is the V_GETTER for the corresponding node attribute:
method GET_V_TOCH.
data:
ls_map type IF_BSP_WD_VALUEHELP_F4DESCR=>GTYPE_PARAM_MAPPING,
lt_inmap type IF_BSP_WD_VALUEHELP_F4DESCR=>GTYPE_PARAM_MAPPING_TAB,
lt_outmap type IF_BSP_WD_VALUEHELP_F4DESCR=>GTYPE_PARAM_MAPPING_TAB.
ls_map-context_attr = 'TOCH'.
ls_map-f4_attr = 'KEY'.
append ls_map to: lt_inmap, lt_outmap.
create object rv_valuehelp_descriptor
TYPE
CL_BSP_WD_VALUEHELP_F4DESCR
EXPORTING
iv_help_id = '(Z_SEARCHTOCH)'
iv_help_id_kind = IF_BSP_WD_VALUEHELP_F4DESCR=>HELP_ID_KIND_COMP
iv_input_mapping = lt_inmap
iv_output_mapping = lt_outmap.
endmethod.
class Z_SEARCHTOCH provides me with the TOCH values. The similar node exists in the Custom controller. The binding is provided in CREATE_ method:
owner->do_context_node_binding(
iv_controller_type = CL_BSP_WD_CONTROLLER=>CO_TYPE_CUSTOM
iv_name = 'ZPRINT_COMP/ZMYCONTROLLER' "#EC NOTEXT
iv_target_node_name = 'TOCH'
iv_node_2_bind = TOCH ).
Also on this view I've got a button with an Action connected to it. With the action handler I want to popup a table view
with rows dependant on user choice in the f4 help.
So, I've created second view type table with corresponding context node. Here in CREATE_ method I'm trying to access custom controller's context to get the user input which should be in the TOCH attribute of the TOCH context node.
lr_cuco ?= owner->get_custom_controller( 'ZPRINT_COMP/ZMYCONTROLLER' ).
lr_node = lr_cuco->typed_context->toch->collection_wrapper->get_current( ).
string = lr_node->GET_PROPERTY_AS_STRING( IV_ATTR_NAME = 'TOCH' ).
here lr_cuco is bound, lr_node is bound too, but string contains no desired value!
What am I doing wrong?
popup is carried out like this:
call method comp_controller->window_manager->create_popup exporting
iv_interface_view_name = 'ZPRINT_COMP/POPUPWINDOW'
iv_title = 'print'
iv_usage_name = 'ZPRINT_USAGE'
receiving
rv_result = m_popup_confirm.
call method m_popup_confirm->set_on_close_event
exporting iv_view = me iv_event_name = 'POPUP_CLOSED'.
m_popup_confirm->open( ).
Sincerely, Ivan.
Hi Ivan
You need to explicity bind the context node to the popup window. Just before lr_popup->window
Steps
1. In Run time repository for Compoent Interface for Popup expose the context node that you need to bind.
2. In the code just before lr_popup->open.
Get the reference of the desired context node of popup view using lr_popup->GET_Context_node
Add the entity/collection to this reference.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
2 | |
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.