Hi,
The context //currentservicerequest/btorderheader refers to the global data context. In business roles of profile type B IC Web Client, the global data context is filled automatically and is closely related to the activity clipboard (function profile ID CRMUI_CLIPBOARD).
For example, you can read the currentcustomer from the global data context
lr_gdc ?= cl_crm_ui_data_context_srv=>get_instance( iv_controller = me ). lr_entity ?= lr_gdc->get_entity( name = if_iccmp_global_data_cont_con=>gdc_currentcustomer ).
Hi Sigrid,
Thank you for the response!
I know it will be filled automatically in IC WebClient scenario. I will explain my issue in detail.
In Solution Manager, I have implemented EXEC_METHODCALL_PPF to send out the email notifications. In the implementation, I am using
the FM: CRM_ERMS_MAIL_COMPOSE, which will internally call the FM: CRM_ERMS_MAIL_COMPOSE_NEW. In this FM, this is the code from Line# 575.
SELECT SINGLE scenario scenario_type FROM crmc_im_scen CLIENT SPECIFIED INTO ls_cust_scenario WHERE scenario = cust_scenario. "#EC * IF ls_cust_scenario-scenario_type EQ 'SQM'. * Get current Service Request tracking text TRY. lr_bdc = cl_crm_ui_data_context_srv=>get_instance( ). lr_order_props = lr_bdc->get_entity_by_path( '//CURRENTSERVICEREQUEST/BTOrderHeader' ). "#EC NOTEXT IF lr_order_props IS BOUND. CALL METHOD LR_ORDER_PROPS->GET_PROPERTY_AS_VALUE EXPORTING IV_ATTR_NAME = 'OBJECT_ID' "#EC NOTEXT IMPORTING EV_RESULT = lv_srqid . ENDIF. CATCH cx_root. ENDTRY.<br>
Here, it is trying to fetch the active incident number (which is currently open now) from the context //CURRENTSERVICEREQUEST/BTOrderHeader. The problem is, the context node does not have the current incident number. It has the previously opened incident number. And, I observed that this context node will be updated with the active incident number after I save the incident.
Just wanted to understand, how I can get the //CURRENTSERVICEREQUEST/BTOrderHeader to have the current incident (before saving).
Thanks!
-Ricky.
Add comment