After upgrading our sandbox from CRM 40 to CRM 52 we wanted to display some custom fields created in CRM 40 in the CRM 52 web client. The area which we needed to do this was for some Business Transaction CUSTOMER_H fields that were generated by the EEWB. In order to do this we found the SAP Note 1037548, which explained this procedure. We also read note 1122248 to understand how to deal with the setup of enhancements. We will assume you have looked at the available documentation for CRM web client enhancements.
What’s Not Covered Here
- Configuring your system for component enhancements
- Creating a custom business role
- Create a custom config key
Part 1: Determine what and where to enhance
Identify the screen that needs to the new fields
For this example we are going to use the create appointment details screen.
Determine Technical Location of Screen
To do this we hit F2 in one of the fields on the screen. This gives us the key details of what we need to enhance. The dialog box below shows we need to enhance the component BT126H_APPT, view AppEditDetailsEF.
Part 2: Make fields available
Prepare component for enhancement
We now need to enhance the component to add in our CUSTOMER_H fields. We open the component up in transaction BSP_WD_CMPWB.
Once opened we choose enhance component. We will store our new component in the BSP application ZBT126H_APPT.
Prepare view for enhancement
Now the component is ready for enhancement, we need to prepare the view. We will right click on the view AppEditDetailsEF, and choose Enhance. This now allows us to enhance the context of the view so we can display our new fields.
Create new context code
In the structure of the view we will enhance the context. The context does not contain a node for BTCUSTOMERH, which is where our EEWB CUSTOMER_H fields live. We therefore need to create a new context node for BTCUSTOMERH
Once we hit create the wizard appears. We will now create the context node through this tool. We will need to enter BTCUSTOMERH as the node name. The node is a model node that corresponds to the BOL Entity BTCustomerH. The standard BOL model has a node for CUSTOMER_H that is named BTCustomerH.
We add the model attributes from CUSTOMER_H that we wish to display on the screen. This will also generate methods in the new context node, if we want to override the default display/retrieval properties for that attribute.
We can just hit continue for the steps: ADD Value Attributes and Create Links to Custom Controller for now. We Now need to created the link between CUSTOMER_H and the Business Transaction Administration Header Segment.
The higher level node we choose will be BTADMINH. The relationship will be BTHeaderCustExt. We will want to choose always create instance. If we don’t choose this option, then the CUSTOMER_H will not save/display properly.
Now the wizard is finished we review the configuration and hit complete.
After generation we will see a brand new context node in the application.
Part 3: Add fields to screen
Now that the fields are available to the view we need to add them to our screen.
Copy existing Configuration
The recommended practice is to copy the standard delivered configuration to a Z-configuration. This is achieved by hitting the copy configuration button on the configuration tab.
We use our role config key that will be assigned to our custom business role.
Now the field will be available in the list of available fields and we add it through the normal UI tool configuration process
Add new field to screen
You can see below the field has been added to the configuration. We make sure we save the configuration and now we are ready to see the new field.
We login under a user that has our custom business role assigned to our role configuration key. The new field appears in the screen below.
The migration of our EEWB CUSTOMER_H to the new webclient UI was very easy. This should provide some relief for those of us migrating from CRM 40.