
METHOD get_value1.
* 2018-05.16 r.escher created - prefill when infrastructure business role
CALL METHOD super->get_value1
EXPORTING
attribute_path = attribute_path
iterator = iterator
RECEIVING
value = value.
CHECK value IS INITIAL.
" determine the business role, but only once
" cv_profile_name will be empty at every new search view instance
IF cv_profile_name IS INITIAL.
DATA(lv_profile) = cl_crm_ui_profile=>get_instance( ).
IF lv_profile IS BOUND.
cv_profile_name = lv_profile->get_profile( ).
ELSE.
cv_profile_name = abap_true. "dummy to jump out the next time
RETURN.
ENDIF.
ENDIF.
*
CASE cv_profile_name.
WHEN cc_business_role_infrastructur.
TRY.
IF iterator IS BOUND.
DATA(lr_current) = iterator->get_current( ).
ELSE.
lr_current = me->parameter_collection->get_current( ).
ENDIF.
value = COND #( LET att = lr_current->get_property_as_string( iv_attr_name = 'ATTR_NAME' ) IN
WHEN att = 'USER_STATUS_KEY' THEN 'YMCT:E0006' "RfC Template Status Released
WHEN att = 'DESCRIPTION_UC' THEN 'ITFS' "Naming convention
WHEN att = 'CATEGORY_ID' THEN 'ITFS (INCIDENT_CATEGOR)' "1st level catetory (<Catego Schema>)
).
CATCH cx_root.
ENDTRY.
ENDCASE.
ENDMETHOD.
METHOD ip_create_from_tmpl.
* Create Request for Change from Template
me->gv_ui_object_tmpl_type = if_ags_crm_const=>gc_ui_aic_ob_cmcr_templ.
me->view_manager->navigate(
source_rep_view = me->rep_view
outbound_plug = 'FromRFCMToRFCSTemplatePopupNavbar'
data_collection = iv_collection ).
ENDMETHOD.
METHOD ip_template_popup_navbar.
set_default_params( iv_collection ). "prepare the prefilled attributes
CALL METHOD super->ip_template_popup_navbar
EXPORTING
iv_collection = iv_collection.
ENDMETHOD.
METHOD set_default_params.
* store default params globaly
zct_default_params = VALUE #( ( attr_name = 'USER_STATUS_KEY' sign = 'I' option = 'EQ' low = 'YMCT:E0006' ) ).
ENDMETHOD.
METHOD do_prepare_output.
* 2018-06-07 r.escher created
DATA: lr_parent_window TYPE REF TO ycl_1s_aic_cmcr_mainwind0_impl,
lr_parent_viewset TYPE REF TO cl_aic_cmcr_cmviewset_impl.
TRY.
DATA(lr_parent) = me->m_parent.
CHECK lr_parent IS BOUND.
lr_parent_window ?= lr_parent.
CATCH cx_sy_move_cast_error.
"not our custom class, a viewset? Exactly one seond try
TRY.
lr_parent_viewset ?= lr_parent.
lr_parent_window ?= lr_parent_viewset->m_parent.
CATCH cx_sy_move_cast_error.
ENDTRY.
ENDTRY.
IF lr_parent_window IS BOUND AND
lr_parent_window->zct_default_params IS NOT INITIAL.
TRY.
"eh_onclear( ).
DATA(lr_qs) = me->get_current_dquery( ).
lr_qs->delete_empty_selection_params( ).
LOOP AT lr_parent_window->zct_default_params[] ASSIGNING FIELD-SYMBOL(<lf_param>).
lr_qs->add_selection_param(
iv_attr_name = <lf_param>-attr_name
iv_sign = <lf_param>-sign
iv_option = <lf_param>-option
iv_low = <lf_param>-low
iv_high = <lf_param>-high ).
ENDLOOP.
CATCH cx_root.
ENDTRY.
ENDIF.
CALL METHOD super->do_prepare_output
EXPORTING
iv_first_time = abap_false.
CLEAR lr_parent_window->zct_default_params[].
ENDMETHOD.
METHOD ip_template_popup_navbar.
CALL METHOD me->ip_template_popup
EXPORTING
iv_collection = iv_collection.
me->view_manager->navigate( source_rep_view = me->rep_view
outbound_plug = 'CreateFromTemplate'
data_collection = iv_collection ).
ENDMETHOD.
method IP_TEMPLATE_POPUP.
set_flags( iv_popup = abap_true iv_template = abap_true ).
endmethod.
method CONSTRUCTOR.
CALL METHOD SUPER->CONSTRUCTOR.
me->view_name = 'CMSRL.htm'.
include crm_object_types_con.
me->gv_otr_alias_for_template = if_ags_crm_const=>gc_otr_alias_for_cmcr.
me->gv_interface_view_name = 'AIC_CMCR_S/MainWindow'.
me->gv_search_usage_for_template = 'CUAICChangeMS'.
endmethod.
METHOD ip_create_from_template .
* me->eh_onnew_from_template( ).
* initialize it once
IF gv_template_search_popup IS INITIAL.
DATA: lv_title TYPE string.
lv_title = cl_wd_utilities=>get_otr_text_by_alias( gv_otr_alias_for_template ).
gv_template_search_popup = comp_controller->window_manager->create_popup(
iv_interface_view_name = gv_interface_view_name
iv_usage_name = gv_search_usage_for_template
iv_title = lv_title ).
ENDIF.
gv_template_search_popup->set_on_close_event( iv_view = me iv_event_name = 'TEMPLATESEL_CLOSED' ).
gv_template_search_popup->set_display_mode( if_bsp_wd_popup=>c_display_mode_surrounded ).
gv_template_search_popup->open( 'TEMPLATE_POPUP' ).
ENDMETHOD.
METHOD ip_template_popup.
* 2018-06-07 r.escher created
set_default_params( iv_collection ). "prepare the prefilled attributes
CALL METHOD super->ip_template_popup
EXPORTING
iv_collection = iv_collection.
ENDMETHOD.
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 |