I have seen various questions related to the Easy Enhancement Workbench (EEW), SAPs tool enabling you to add custom fields to standard transactions without having to modify SAP code. In a nutshell, the way this works is that SAP allows you to generate custom objects in predefined containers that are linked to the various transactions.
In this example we will extend the Lead transaction (CRMD_BUS2000108). Our fictive customer has a business requirement to be able to classify their various leads in more detail. To meet this requirement we will add three custom fields: (1) Territory – char10, (2) Territory Sub Group – char10, and (3) Target Date date8. Our final deliverable should look something like this.
Creation of the actual extension
Initiate transaction EEWB which will bring you the actual Easy Enhancement Workbench. First step is to create a project that will hold the actual extension. During the creation of the project you also define a workbench as well as customizing request. These ensuring all objects required for our extension are transported together.
Note: In my experience I have come across multiple occasions that system administrators have a policy in place that requires a separate client for development and customizing. Before starting any EEW tasks ensure they are aware of this requirement so they can take the appropriate actions.
After the creation of your project we need create an extension(s). The extension contains the information regarding the business object to be modified and the type of the extension. Since our example is modeled around the lead transaction we select business object Lead and extension type Extend Lead . To guide us during the enhancement of the data model for object Business Transaction, a wizard appears. Follow it’s directions and add the custom fields accordingly.
Note: In order to extend CRMs generic business transactions, e.g. orders and opportunities, select object Business Transaction and type Add New Fields. For business partner extensions select object BUPA, type Add New Fields.
After successful generation of the extension, you can view all custom objects that have been generated by selecting the newly created task. Based on the fields we added to the business transaction categories, the CRM system was able to generate the required repository objects and table entries. The picture below shows the result of the generation.
Extension of the PC-UI Application
Now we have extended our Lead transaction we need to make them available in the corresponding PC-UI Application (CRMD_BUS2000108). For this example we will add a new tab to the application, named Custom Fields, which will contain the additional fields. This new tab will be located in the details area of the application.
Firstly we should determine to which screen structure the EEW has added our custom fields. Easiest way to determine this is to review the object list that was generated in the EEW. In this list should find a table entry starting with ZEEW, in our case ZEEW_CUSTOMER_H02. Next we must determine the screen structure of the detail area: CRMT_BSP_LEA_OVERVIEW. When you analyze this structure you will see that the EEW has added our newly generated structure as a separate include.
Now we will create a new field group containing our newly created fields, link it to the screen structure and generate the corresponding layout. Execute transaction CRMC_BLUEPRINT_C and select Application Element -> Field Group. For this example we create field group ZLEADTERRITORY_DETAILS. Next we must add the EEW fields to this newly created field group. After having added your fields, the result should look similar like the picture below. Last step is to generate the layout.
In a similar fashion create a second field group ZLEADTERRITORY. This field group should reference the previously created field group and as group type select Screengroup. Also this field group must be generated accordingly.
Next step is to create an event enabling us to add a new tab in the existing application without having it to change. Follow the following IMG Path: Application Element -> Event and create a new event called ZLEADTERR. This newly created event is only Lay-out Relevant and add a text, e.g. Custom Fields.
The newly created event and field group must be made available in the PC-UI application we are trying to extend. Select Application/Layout -> Define Application Layout, enter as work area CRMD_BUS2000108 and create a new entry. The content of this new entry should resemble the example below.
Since we have created a new tab event, ZLEADTERR, we also must make sure it becomes available in the correct tab group. Since this tab group is delivered by SAP, we need to use transaction CRMC_BLUEPRINT to complete this task. Follow IMG: Application Element -> Group Tab Page -> Group Tab Page and select LEA_TGRP. Add a new entry, with unique sequence and our previous created event. With this you have added your EEW extension to the existing PC-UI Application and the result should be similar to the example I showed in the beginning of this blog.
As you can see it is very easy to add custom fields to existing transactions using the Easy Enhanced Workbench. Also this example showed how to add these newly created to an existing PC-UI Application by adding a new tab. In a similar way we could also have added these fields to an existing tab by extending the existing field group, assigned to the tab.