CRM and CX Blogs by SAP
Stay up-to-date on the latest developments and product news about intelligent customer experience and CRM technologies through blog posts from SAP experts.
Showing results for 
Search instead for 
Did you mean: 
0 Kudos

When we display a transaction in CRM WebUI, there is a CRM 'Print Page' function. For example, open an interaction record detail screen from webui, click the print icon(or Ctrl+P):

a new window will be opened with the printed information:


When the 'Print Page' icon is clicked, JavaScript codes in BSP Application BSPWD_BASICS->print.htm is executed. For some requirement, I recently enhanced the print.htm page. Due to the specific position in framework, it is not possible to enhance view BSPWD_BASICS/print simply as we do for other components and views. In this article, I will note down how I enhanced it and make system call the enhanced print.htm page. It is an Ehp3 system where I made the test.


System Logics:

  1. under BSPWD_BASICS is specified in WorkAreaHostContent.htm file under BSPWD_BASICS->Page Fragments->WorkAreaHostContent.htm.

  2. WorkAreaHostContent.htm is specified in BSPWD_BASICS/WorkAreaHostViewSet.htm.

  3. BSPWD_BASICS/WorkAreaHostViewSet is embedded in CRM_UI_FRAME.

Steps for enhancement:

  1. Execute BSP_WD_CMPWB, enhance BSPWD_BASICS. I named enhanced bsp application ZBWD_BASICSGW.

  2. Enhance 'Print' view.

  3. Even though it shows error, just click 'Ok' button to ignore it.

  4. It will also show information 'View BSPWD_BASICS/print is not defined in the runtime repository that was loaded'.

  5. But the enhanced print view is now under my bsp application ZBWD_BASICSGW.

  6. Now enhance BSPWD_CMPWB/WorkAreaHostViewSet.

  7. Name controller class ZLBSPWD_BASICS_WA_HOSTVS when required.

  8. Give name to context attribute type ZLBSPWD_CONTEXT.

  9. Don't forget to change method and active it.

  10. Now copy WorkAreaHostContent.htm.

  11. Input the bsp application name you created just now. Please notice, give a new page name.

  12. This ZWorkAreaHostContent.htm will appear under ZBWD_BASICSGW. Edit this file, change the codes as highlighted: BSPWD_BASICS is replaced by your own new Z bsp application. Here it is ZBWD_BASICSGW. After the change, save and active.

  13. In order to bring the ZWorkAreaHostContent.htm in, now we should edit the enhanced BSPWD_BASICS/WorkAreaHostViewSet.htm file. Double click on WorkAreaHostViewSet.htm.

  14. Change, save and active.

  15. In order to make the framework call the above enhanced views, we need to enhance CRM_UI_FRAME also.

  16. There is no 'Enhance' function for BSPWD_BASICS/WorkAreaHostViewSet under CRM_UI_FRAME. We need to use another way to bring the enhanced view in. Please see the next step.

  17. Execute T-code SM34, maintain view BSPWDVC_CMP_EXT. Select CRM_UI_FRAME for enhancement set ZENH_GW_NEW, double click 'Controller Substitutes'.

  18. Add an entry manually.

  19. Now we come back to CRM_UI_FRAME, the enhanced view is visible.

  20. Now set breakpoint in print.htm file under ZBWD_BASICSGW.

  21. Open CRM webui, display a transaction, click 'Print'.

  22. We can see the print.htm file under customer bsp application ZBWD_BASICSGW is executed. Now we can add our own codes in the print.htm file: