Hi All,
I want to implement dynamic configuration in component BP_DATA according to dropdown box in BP_HEAD when creating customer master data.
Step is following:
a. implement P-get method for dropdown field in component BP_HEAD
case iv_property.
when if_bsp_wd_model_setter_getter=>fp_server_event.
rv_value = 'YOUR_EVENT'.
endcase.
I dont create YOUR_EVENT event. but do_config_determine event can still be triggered.
b. Redefine do_config_determine methof in BP_DATA
Get dropdown field value in BP_HEAD here.
DATA: lr_main TYPE REF TO cl_bp_data_mainwindow_impl.
DATA: lr_com_controller TYPE REF TO cl_bp_data_bspwdcomponent_impl .
DATA: lr_window TYPE REF TO cl_bp_data_noteswindow_impl .
DATA: lr_entity TYPE REF TO cl_crm_bol_entity.
lr_window ?= me->m_parent.
IF lr_window IS BOUND.
lr_com_controller ?= lr_window->m_parent.
IF lr_com_controller IS BOUND.
lr_entity ?= lr_com_controller->typed_context->partner->collection_wrapper->get_current( ).
ENDIF.
ENDIF.
IF lr_entity IS BOUND.
lv_value = lr_entity->get_property_as_string( iv_attr_name = 'DROPDOWN' ).
......
now do_config_determine can be triggered if I select dropdown value .
but lr_entity is initial if dont press enter key.
lr_entity is correct if press enter key.
I dont know why. I expect change configuration when dropdown item is selected.
How to get dropdown value even though without pressing enter key.
Thanks for your help!
Regards,
Dou