CRM and CX Blogs by Members
Find insights on SAP customer relationship management and customer experience products in blog posts from community members. Post your own perspective today!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Introduction

The GDC is a set of objects stored in the Global Memory of your session. For instance, the CURRENTCUSTOMER is occupied when the business partner in the IC Webclient is confirmed.

GDC is a virtual, central data storage area in the Interaction Center (IC) WebClient.

The GDC stores data that may be used by different views. It does not store random data such as hit list results. It can contain references to Business Object Layer (BOL) objects or to Business Object Repository (BOR) objects, provided that they are wrapped by a special BOL object. Programmers must predefine the objects they want to use in the context of the GDC. In their programs, they can only store or retrieve objects that are defined.

Functions such as scripting can use the GDC to copy data from the current interaction into various processes. The GDC can also be used during navigation to transfer the name of the source view and the selected object to the target view of a navigational link.

The lifetime of the GDC is linked to the interaction: The system refreshes the GDC after each interaction at end contact.

Example

An agent confirms a customer name. The confirmed customer is stored in the GDC, and its attributes can be retrieved by scripts.

When the script was written, the text reads:

Good afternoon, [Customer Name], can I ask you a few questions?

When the agent runs the script, the system substitutes values from the GDC. The script appears on the agent's screen as follows:

Good afternoon, Mr. Harvey Smith, can I ask you a few questions?

How to do?

  1.   To use this GDC, we have to get the GDC object, which is type of IF_CRM_UI_DATA_CONTEXT.
  2.   We can get this Object ref By calling GET_INSTANCE( ) of CL_CRM_UI_DATA_CONTEXT_SRV by passing Controller class as importing parameter( It’s not mandatory ).
  3. After getting GDC object, You can set or get data/entity by calling setter and getter methods of IF_CRM_UI_DATA_CONTEXT.

 
 

Steps to follow

The objects in the GDC are defined in the IMG:

Customer Relationship Management --> UI Framework --> Technical Role Definition --> Define Global Data Context Parameters

Here ,you can maintain your custom attribute also.


Set the data to the GDC attribute(XXXXXXX = GDC Parameter declared in SPRO)

data: lr_gdc type ref to if_crm_ui_data_context,

        lr_entity type ref to CL_CRM_BOL_ENTITY.

lr_gdc ?= cl_crm_ui_data_context_srv=>get_instance( ).

  1. TRY.

****Get the entity********

*Your logic to get entity

**************************

       lr_entity ?= <entity from the your logic>.
CATCH CX_SY_MOVE_CAST_ERROR.
ENDTRY.


lr_gdc->set_entity( name = 'XXXXXXX' value = lr_entity ).

Get the data to the GDC attribute(XXXXXXX = GDC Parameter declared in SPRO)

data: lr_gdc type ref to if_crm_ui_data_context,

        lr_entity type ref to CL_CRM_BOL_ENTITY.

lr_gdc ?= cl_crm_ui_data_context_srv=>get_instance( ).


lr_gdc->get_entity( exporting name = 'XXXXXXX'

  importing value = lr_entity ).

1 Comment