See how you can add a customer Tracking No. field to the interaction record in Interaction Center WebClient in two steps. You can use this process to add any extra field to the interaction record to suit your business requirements.
Key Concept
Easy Enhancement Workbench (EEW) allows you to enhance the data model for your business partners through the use of extensions. You use extensions to add new fields or tables. In the extension, you select the business transaction types for which the system should add the new field. EEW generates the user interface extensions for SAPGUI and People-Centric UI.
Many call center scenarios require additional data to better track interactions with customers and to increase the quality of customer service. In this example, I added a new field that I called
Tracking No. on the header level of the business transaction and then included it on the
Status view of the interaction record. This allows the agent to assign a unique number to each interaction that the company can use to track the reported issue.
To add the new field to the view, two steps are required. First, enhance the data model using Easy Enhancement Workbench (EEW). Then add the
Tracking No. field to the Interaction Center (IC) WebClient user interface (UI). You use only standard tools for this process with very little custom coding, which reduces the impact of applying Support Packages. Also it is not necessary to have extensive ABAP or HTML knowledge.
Note
This example is based on SAP CRM 2005. There is a substantial change in how you enhance the user interface starting with SAP CRM 2006s. Therefore you’ll need to redo the UI enhancements using the new SAP CRM 2006s tools when you upgrade. However, the data model enhancement via EEW still works with SAP CRM 2006s and later.
Step 1. Enhance the Data Model in EEW
EEW guides you through the process by providing a wizard to add the new field, which then is available to the data model. The first step is to create a new project in the EEW, which you use to handle the extension to the data model. For my example, I created the project
Z_DEMO_CRM2007. (Note that the “CRM2007” portion refers to the year I created the demo and not the SAP CRM 2007 release.)
To create an extension for your project, right-click on it and select
Create Extension. In the screen that appears, enter the name, description, business object, and extension type (
Figure 1). Click on the enter icon to continue, which starts the wizard to enhance the data model for the business transaction.
Figure 1
Select the type of the extension in EEW
In the next wizard screen, provide a title for your extension and click on the
Continue button to select the business transaction types. These types control to which screens the wizard adds the new fields. For this example I chose to enhance the business transaction types
Business Activity and
Service Process (
Figure 2). Click on the
Continue button to get to the next screen.
Figure 2
Select the Business Transaction Types
In the
Define Fields screen that appears, enter the new field for the tracking number (
Figure 3). Provide a label for the field, such as
Tracking Number. For the
Data Type, you can either select a generic data type, such as
CHAR Character with a specific length (in this example 20), or you can select a specific existing data element. Click on the plus icon in the wizard to show the fields for the
Field Name on the Data Dictionary structures and the
Data element. Enter a name for your field, such as ZZ_TRACKING_NO, and click on the
Continue button.
Figure 3
Enter the new field for the Tracking Number
Tip!
I recommend that you define the data elements needed up-front and use those instead of the generic data types. Normally the field is not only used in this one view, but throughout a whole process, so using a data element helps keep the data types consistent and allows you to use the where-used list to find this data element in all the coding related to this process.
Next you need to determine if the new field is relevant for the header, item, or both. I want the new field to appear in the header, so I selected the
Head check box (
Figure 4). Click on the
Continue button to select the integration for the different scenarios, such as mobile clients, R/3, SAP NetWeaver Business Intelligence (SAP NetWeaver BI), and the extended search in the People-Centric UI (PCUI) (
Figure 5).
Figure 4
Select the Head check box
Figure 5
Define the processes for which the new field should be relevant
After you complete these settings, the system generates the required objects:
• Tables, structures, data elements
• Function modules and Business Add-In (BAdI) for SAPGUI integration
• Customizing settings for SAPGUI transactions
In this example the system adds the field to the structure
CUSTOMER_H of the data model for the CRM business transaction. When the generation is finished, you can use the new field. The data model for business transactions can now handle the new field, regardless of the UI.
Tips for Enhancing the Data Model
You can alter an extension you created in EEW by using the wizard at the same extension more than once. However, if you changed the code generated by EEW manually, running the wizard again overwrites these manual changes.
Furthermore, I strongly recommend that you ensure that no users log on to the system while you are creating the EEW enhancements. This prevents users from locking objects — in particular Data Dictionary objects — that EEW must alter. If users lock these objects, the process results in an incomplete generation and leaves many objects corrupted.
Finally, although it is possible to alter existing extensions, you should make sure that the fields you add using EEW are absolutely required and defined correctly. Changing or deleting extensions sometimes results in problems with the generation, which can only be resolved by a very experienced technical person or with guidance from SAP.
Step 2. Add the Tracking Field to the IC WebClient UI
Before starting the enhancement, you need to create a Business Server Page (BSP) application — in this example
Y_2007_IC — in ABAP Workbench (transaction
SE80). Also in the Customizing (
SPRO) you must create a new IC WebClient runtime profile —
Y_CRM2007_C in this example — as a copy of the runtime profile
DEFAULT. To do this, use transaction
CRMC_IC_RTFRAMEWORK or follow IMG menu path
Customer Relationship Management>Interaction Center WebClient>Customer-Specific System Modifications>Define IC WebClient Runtime Framework Profile.
With the enhanced data model, you can add the new field,
Tracking No., to a view of the IC WebClient, such as
IRecReason (
Figure 6). To do this, you use the BSP application
Y_2007_IC you just created with a corresponding runtime profile Y_CRM2007_C in the IC WebClient Workbench (
BSP_WD_WORKBENCH).
Figure 6
Start with the IRecReason view in the IC WebClient Workbench
First, copy the view
IRecReason from the standard BSP application
CRM_IC to your own BSP application, which also copies the controller. Select the BSP application
CRM_IC when you start the IC WebClient Workbench, and from the
Views sub-tree select the view
IRecReason. After right-clicking on the view, select
Copy to copy the view into your own BSP application (
Figure 7).
Figure 7
Copy the view IRecReason from CRM_IC to Y_2007_IC
After this, start the IC WebClient Workbench for your newly created BSP application
Y_2007_IC and runtime profile
Y_CRM2007_C. Double-click on the view
IRecReason to display the structure of the view and controller. Open the
Context of the controller, right-click on the
Context Node, and select
Create to create a new context node for the additional field.
Again, a wizard helps you create the new context node — in this example,
CUSTOMERH — and adjusts the context to handle the data transfer automatically (
Figure 8). When you add a context node that has not been part of a view, make sure you select
AlwaysCreateInstance, which generates the code required to establish the link to the new context node.
Figure 8
Enhanced view with the new context node
Note
IC WebClient is based on the Model View Controller (MVC) programming paradigm, which is a widely accepted design pattern for developing object-oriented UIs. The view handles the visual output, such as data fields, buttons, or hyperlinks. The controller handles the interaction logic. That is, the business functionality (e.g., data manipulation or view navigation) is determined based on user input. The model consists of context and context nodes that link the fields of the data model to fields on the views (the “binding”). Each field on the view has a corresponding attribute/method on a context node.
To tell the IC WebClient Runtime Framework to call your new view instead of the standard SAP view, you have to maintain the controller substitutes in your runtime profile
Y_CRM2007_C in the IMG (
Figure 9).
Figure 9
Edit the Replacement Controller
As a last step, you need to adjust the HTML code to display the field on the view (
Figure 10). To access the HTML code, simply double-click on the view layout for
IRecReason.htm in your BSP application. Note that in the previous step, the wizard created a page attribute
CUSTOMERH automatically, as a reference to the data model structure
CUSTOMER_H.
Figure 10
Edit the HTML code
For this example I added the code in Figure 10 after the drop-down menu for the result (//SubjectG/Result) to make the
Tracking No. field appear. After activating all the objects, the new field is ready for the agent to use in the IC WebClient interaction record (
Figure 11).
Figure 11
The new Tracking No. field in the Interaction Record
Christian Matz
Christian Matz is a SAP Solution Architect and CRM Solution Principal at ECENTA AG. He has over 15 years of SAP experience, completing many successful projects across different industries in the areas Marketing, Sales and Service. Having a background in consulting as well as SAP standard development, he has been providing technical and functional expertise on his projects, many times in a leadership capacity. In doing so, Christian supported many customers worldwide in building reliable SAP CRM solutions, as part of their overall SAP system landscape.
You may contact the author at
christian.matz@ecenta.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the
editor.