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.

    1 bk in CL_BSP_WD_APPL_CONTROLLER.PNG
  2. Set breakpoint in line 296 in method CL_BSP_WD_VIEW_MANAGER->DO_REQUEST.

    2 bk in CL_BSP_WD_VIEW_MANAGER.PNG

  3. From WebUI, select a business role.

    3 select a business role.PNG

  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.

    4 two debug sessions up.PNG

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

    5 select script and click start.PNG

  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.

    6 bk will stop at 296 of do_request.PNG

  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.

    7 standard tab.PNG

  8. Now only one debug session is left.

    8 only one debug session now.PNG

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

    9-1 start script again.PNG

  10. The script stops again. Click ‘Exit Script’ also.

    9-2 script stops.PNG

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

    9-3 go back to standard, we can see where the bk is.PNG

  12. Page is loaded.

    9-4 page is loaded.PNG

  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.

    9-5 SAS trace lists.PNG

  14. Two traces have different content.
    9-6 trace 1.PNG

    9-7 trace 2.PNG

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.

    0-1 the script has been executed.PNG

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

    0-2 after click exit script button.PNG

  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.

    0-3 a dialog pops up.PNG

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply