FUNCTION zcrm_reprice_bt. *"---------------------------------------------------------------------- *"*"Local Interface: *" IMPORTING *" VALUE(IV_GUID) TYPE CRMT_OBJECT_GUID OPTIONAL *"---------------------------------------------------------------------- zcl_crm_attributes=>gv_skip_check_before_save = abap_true. DATA: lv_result TYPE REF TO if_bol_entity_col, gr_btheaderpridoc TYPE REF TO cl_crm_bol_entity, gr_condhsetrel TYPE REF TO cl_crm_bol_entity, gr_condset TYPE REF TO cl_crm_bol_entity. CHECK iv_guid IS NOT INITIAL. * set the parameters for the method call REFRESH:gt_crmt_name_value_pair. CLEAR:gs_crmt_name_value_pair. gs_crmt_name_value_pair-name = 'RETAIN_MANUAL_CONDITIONS'. gs_crmt_name_value_pair-value = abap_true. APPEND gs_crmt_name_value_pair TO gt_crmt_name_value_pair. gr_bol_core ?= cl_crm_bol_core=>get_instance( ). gr_bol_core->start_up( ). gr_bol_core->load_component( iv_component_name = 'BT' ). gr_bol_core->load_component( iv_component_name = 'PRC' ). gr_btorder = gr_bol_core->get_root_entity( iv_object_name = 'BTOrder' iv_object_guid = iv_guid ). CHECK gr_btorder IS BOUND. gr_btorder->lock( ). gr_btorder->switch_to_change_mode( ). gr_btorderheader ?= gr_btorder->get_related_entity( 'BTOrderHeader' ). IF gr_btorderheader IS BOUND. gr_btorderheader->switch_to_change_mode( ). gr_btheaderpridoc ?= gr_btorderheader->get_related_entity( 'BTHeaderPridoc' ). IF gr_btheaderpridoc IS BOUND. gr_btheaderpridoc->switch_to_change_mode( ). gr_condhsetrel ?= gr_btheaderpridoc->get_related_entity( 'CondHSetRel' ). ENDIF. TRY. gr_condhsetrel->switch_to_change_mode( ). CALL METHOD gr_condhsetrel->execute EXPORTING iv_method_name = 'Update' "#EC NOTEXT it_param = gt_crmt_name_value_pair RECEIVING rv_result = lv_result. CATCH: cx_crm_genil_model_error cx_crm_bol_meth_exec_failed. RETURN. ENDTRY. ENDIF. CALL FUNCTION 'ZCRM_SET_BOL_CORE' EXPORTING iv_save = abap_true. CALL FUNCTION 'ZCRM_DEQUEUE_E_CRM_ORDER' EXPORTING iv_guid = iv_guid. ENDFUNCTION.