Hi,
Can you please help me with the following Issue.
Issue : whenever creating a new incident in sap solution manager after entering reported by field then press enter it will give popup.
This popup values coming from ztable.
But these values displays only the business partners which are maintained in particular partner function but not for all partner functions.
Can you please help me how to display this popup irrespctive of partner function.
For this i have written logic in DO_VALIDATE_INPUT method.
Please check the below code.
METHOD do_validate_input.
CALL METHOD super->do_validate_input
EXPORTING
global_messages = global_messages.
DATA:lr_entity TYPE REF TO cl_crm_bol_entity,
lr_access TYPE REF TO if_bol_bo_property_access,
lr_ibasei TYPE REF TO if_bol_bo_property_access,
lr_header TYPE REF TO if_bol_bo_property_access,
lv_result TYPE string,
lv_ibase TYPE string,
lv_proces TYPE string,
lr_comp TYPE REF TO cl_aic_inci_bspwdcomponen_impl,
* lt_ibase TYPE TABLE OF zibase,
ls_ibase TYPE zibase,
lv_line TYPE int4.
lr_entity ?= me->typed_context->btpartnerset->collection_wrapper->get_current( ).
lr_ibasei ?= me->typed_context->btrefobjmain->collection_wrapper->get_current( ).
lr_header ?= me->typed_context->btadminh->collection_wrapper->get_current( ).
lv_ibase = lr_ibasei->get_property_as_string( 'IB_INSTANCE' ).
lv_proces = lr_header->get_property_as_string( 'PROCESS_TYPE' ).
if lv_proces eq 'ZMIN'.
IF lv_ibase EQ '0'.
CLEAR:lv_ibase.
ENDIF.
lr_access = lr_entity->get_related_entity( 'BTPartner_PFT_0007_MAIN' ).
IF lr_access IS INITIAL.
lr_access = lr_entity->create_related_entity( 'BTPartner_PFT_0007_MAIN' ).
ENDIF.
lv_result = lr_access->get_property_as_string( 'PARTNER_NO' ).
IF lv_result IS NOT INITIAL AND lv_ibase IS INITIAL.
SELECT * FROM zibase INTO TABLE lt_ibase WHERE zbp = lv_result.
DESCRIBE TABLE lt_ibase LINES lv_line.
lr_comp ?= comp_controller.
*Create attribute in view implemetation class as below.
CALL METHOD lr_comp->window_manager->create_decision_popup
EXPORTING
iv_title = 'TIttle'
iv_visible_row_count = lv_line
iv_display_table = lt_ibase
RECEIVING
rv_result = lr_popup.
CALL METHOD lr_popup->set_on_close_event
EXPORTING
iv_view = me
iv_event_name = 'VAL_SELECTED'.
lr_popup->open( ).
ENDIF.
ENDIF.
ENDMETHOD.