Created by Jerry Wang on Feb 17, 2014
In loyalty management we can handle with membership complaints by assigning members with a given points. After customer account is identified in interaction center and end button is clicked, it is expected a mail would be sent to the customer notifying him the incoming points to be assigned for his complaint.
To achieve this the first step is how to get the identified customer account in end button execution environment.
The following code could be used to get the currently confirmed account information:
DATA:
lr_cucobp TYPE REF TO cl_crmcmp_b_cucobupa_impl,
lr_cucoproc TYPE REF TO cl_iccmp_cucoprocess_impl,
lv_bdc TYPE REF TO if_crm_ui_data_context,
lv_entity TYPE REF TO cl_crm_bol_entity,
lr_process_control TYPE REF TO if_iccmp_cucoprocess.
lr_process_control ?= cl_crm_aui_service=>get_process_controller( ).
CHECK lr_process_control IS NOT INITIAL.
lr_cucoproc ?= lr_process_control.
CHECK lr_cucoproc IS NOT INITIAL.
lr_cucobp ?= lr_cucoproc->get_custom_controller( if_iccmp_global_controller_con=>cucobp ).
lv_bdc = cl_crm_ui_data_context_srv=>get_instance( lr_cucobp ).
CHECK lv_bdc IS NOT INITIAL.
lv_entity ?= lv_bdc->get_entity( name = cl_crm_ic_bp_constants=>gc_gdc_currentcustomer ).