I intend to bring forth the following in this weblog and the subsequent weblogs in this series as and when i proceed –
a) Customizing the Standard view.
b) Using ICWC Profiles to tell ICWC to use our customized views rather than the standard ones.
c) Identifying the correct view in which the changes are to be made.
d) Identifying the correct context class (Associated with the Page Attribute).
e) Writing the set and get methods inside the appropriate classes. (For cases when they dont already exist)
d) Debugging to make life easier in identifying the views where the changes should be made.
Our aim here would be to add one more field (say CIF Number) in the “Identify Account – More Fields” viewset. For some information, I am using CIF Number for Business partner number from an external system or a legacy system (field BPEXT in table BUT000).It is maintained as “CIF Number” in Business Partner Transaction. If the current business partner is known under a different number in an external system, you can store this number here for information purposes. That’s the use of this number.
Now to start with, we need to look into the Business Server Pages (BSP) Application CRM_IC which contains the core ICWC Application. It is not advisable to make changes directly to the standard view or the controllers of this Application.Instead what we would do is create a BSP Application (say Z_ICWC) in our own Package. Thereafter we would copy the views & corresponding controllers in which we want to make the changes, from the standard application CRM_IC. Before we start doing anything, our ICWC looks something like this-
After we are done with the changes, the new face of ICWC is going to be as under-
So to give ICWC the face as illustrated above we would need to follow the steps enumerated below – STEP – I
From the standard Application (CRM_IC) we would copy the view “BuPaMoreCustomerView.htm” and controller “BuPaMoreCustomerView.do” into our custom BSP Application Z_ICWC which we have created in our own package. (I believe copying is not a problem, & in case it is please revert to me). After this we would go ahead with activating our BSP Application which might give us a syntax error telling that one or several include files are not available in the BSP application Z_ICWC.
This is due to the fact that the relative location of the view has been changed by the copying process. To overcome this we would change the viewset as follows to include the files from the standard Application –
STEP – II
Once this is done we have our own Application in which we are ready to incorporate as many changes as we want. Now because we want to add another field in the “Identify Account – More Fields” viewset (view corresponding to which we have already copied in out custom BSP Application), we would do some changes in our copied view as follows, which is just a matter of adding some CRM_IC tags.
After identifying the correct place where we want to add the code, in the view which we have copied, we will use the following code snippet –
Let me give a brief explanation on the code above.
We needed to find the following field among the page attributes: CIF Number. In our case, this is the page attribute ‘Customer’. If you navigate (by double-clicking) to the class definition of this page attribute, which can be found on tab Page Attributes, you will notice the following methods:
- These methods were generated from XML files in the Design Time Repository and can be used for HTMLB tags like in this example of context nodes. The notation for their usage is: //Page Attribute/Property Hence, in this case: //Customer/PartnerExternal
STEP – III
Next we would need to tell ICWC to use our view instead of the standard view. For this we would need to define our own IC WebClient Runtime Framework Profiles as follows –
- Goto transaction ‘SPRO’.
- Choose Implementation Guide (IMG) activity –> Customer Relationship Management –> Interaction Center WebClient –> Customer-Specific System Modifications –> Define IC WebClient Runtime Framework Profiles.
- Make your own profile name.
- Copy the default profile in it
- Copy the code as given in the figure below (in red) in that profile
The tags tell the system to replace the standard view with the view as it is defined in our BSP application.
- Create an IC WebClient profile by copying the default profile DEFAULT as follows: i) Choose IMG activity –> Customer Relationship Management –> Interaction Center WebClient –> Define IC WebClient Profiles. ii) Enter the name of the profile created above for the framework profile name. iii) Save your entries. Assign the IC WebClient profile to your user’s or business partner’s position in organizational management and restart the IC WebClient (application CRM_IC). Activate your Custom Application and run CRM_IC. We can see “CIF Number” appearing in the view. Just cross check from the table BUT000 (field BPEXT) to see the correct value being pulled up. In my subsequent weblogs i would bring forth the ways to
- Identify the views in which we made the changes,
- Debug to achieve the same,
- Write our own SET & GET methods if they are not already present in the class definition of the page attributes,
- Idetifying those correct class definitions (& offcourse the page attributes) where these methods can be written.