Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
corrine_guan
Employee
Employee

Purpose

In Use debugger scripts to list component/view enhancement information, We have introduced a debugger script using which we can list component enhancement information. We also described how to use the debugger script when displaying a service request. It is the same when we navigate to menus like 'Sales cycles', 'service operations', 'Inbox', 'Knowledge Search' ... from navigation bars, when going to the document details from result lists, etc.

However, when the WebUI page is loaded initially, there are some differences:

  1. Method CL_BSP_WD_COMPONENT_DESCRIPTOR-> constructor will be called  not only from method CL_BSP_WD_VIEW_MANAGER->DO_REQUEST, but also  from method CL_BSP_WD_APPL_CONTROLLER->DO_INIT. Thus we need to set breakpoints in both of these two methods.
  2. There will be two debug sessions during debugging. CRM WebUI will be loaded after both of these two debug sessions have been finished.

In this article, I will show you where to set breakpoints, how to run debugger script ZSCRIPT_ENH_LIST in less breakpoint stops.

Sample

Select a business role, it will stop in default page like 'Identify Account'.

Detailed Steps

  1. Set breakpoint in line 18 in method CL_BSP_WD_APPL_CONTROLLER->DO_INIT.

  2. Set breakpoint in line 296 in method CL_BSP_WD_VIEW_MANAGER->DO_REQUEST.

  3. From WebUI, select a business role.

  4. Now we can see two debug sessions up. In both of them, the breakpoints stop at line 18 in method CL_BSP_WD_APPL_CONTROLLER->DO_INIT.

  5. We can start from any one of them, go to 'Script' tab, select the 'ZSCRIPT_ENH_LIST'. Then click 'Start Script' button.

  6. Wait for a while, the breakpoint will stop at line 296 of method CL_BSP_WD_VIEW_MANAGER-> DO_REQUEST. Now we click 'Exit Script' button.

  7. Then we go to 'standard' tab, we can see where the breakpoint is now. Click 'F8' or 'Continue' to finish the current debug session.

  8. Now only one debug session is left.

  9. The same, go to 'Script' tab, select script 'ZSCRIPT_ENH_LIST', and click 'Start Script' button.

  10. The script stops again. Click 'Exit Script' also.

  11. If we go to 'standard' tab, we can see where the breakpoint is. Click 'F8' or 'Continue'.

  12. Page is loaded.

  13. Now go to T-code SAS, we can see two traces instead of one because we have executed the script twice since we had two debug sessions.

  14. Two traces have different content.


Others

If the script has been executed and ended, we can click 'F8' or 'continue' directly to finish all the left executions. We can save one step and don't need to navigate to 'standard' tab. For example:

  1. The script has been executed. We click 'Exit Script' button.


  2. In the next screen, we click on F8 or Continue directly.

  3. A dialog will pops up asking if we want to run the 'script' again or 'continue' the debug. We select the 2nd button 'Continue(F8)'. This operation is the same as we navigate to 'standard' tab and click 'Continue' button.