Skip to Content

Debugging a PC-UI Application can, like any other custom application, sometimes be a time consuming, agonizing task. I have spent several hours executing this task with sometimes mixed results. During the execution of these tasks I have come across several tools and/or applications that can definitely ease the debugging task by providing more detailed information. This web log describes the tools available to us and how to activate these services.

Determine Model Access Class (MAC)

Like any other debugging task the trick is to determine the correct place to place your breakpoint(s). The placement of a correct breakpoint can reduce your debugging effort considerably. This brings me to the first tool available to us: determination of the correct model access class (transaction: CRMC_BSP_ANALYZE). When executing this transaction you are requested to enter your PC-UI application and optionally its view. In the example below I selected the application opportunities (CRMD_BUS2000111).

image

After the results of this tool are being presented we can determine quite some information. For instance the application’s search request (SREQ) event uses the field group OPP_ADVANCED_SEARCH to present the information. The corresponding screen structure is CRMT_BSP_OPP_SEARCH and the logic is being evaluated in the access class CL_CRM_BSP_AM_HEADFM_1O. Besides having identified where we can make certain screen modification we also identified the MAC so we can focus our debugging task(s) to here.

PC-UI Trace

In the example above I pressed the ‘Go’-button and the search results are already presented in the search results (SRES) area. For the purpose of this web log we would like to identify which event is triggered upon pressing this button. This brings me to the second tool in our debugging toolbox: the PC-UI Trace. However before we can see any trace results, we need to activate this tool for our userID. To do we must execute the following steps: 1) Maintain User Profile (transaction: SU3), 2) Select tab ‘Parameters’, and 3) Add the following parameters: Parameter ID = CRM_BSP_TRACELEVEL and Parameter Value = 2222. After having saved these settings, we execute the PC-UI Application again and you will notice a second browser session is invoked, containing the trace results.

image

The screenshot above contains a small part of the trace results after having pressed the ‘Go’-button but added as selection parameter: description = ‘Test*’. As you can see in the result list the following information can be identified: within the MAC CL_CRM_BSP_AM_HEADFM_1O, the method QUERY is invoked using screen structure CRMT_BSP_OPP_SEARCH to pass the selection criteria.

As a second example on how to read this trace log I would like to determine where the screen pop-up is populated after having pressed the ‘Create’-button. As presented in the results below, in order to fill the screen pop-up the method FILL_DROPDOWN_LISTBOX is initiated from within the included interface IF_CRM_BSP_MODEL_ACCESS_IL in MAC CL_CRM_BSP_AM_HEADFM_1O. After having executed this method we can determine that only one drop-down value was identified: BP Cust. Acquisition.

image

PC-UI Debugger

We have identified the correct MAC, the corresponding method so now we can really start debugging our application, the third tool. Before we can start debugging we need to activate the debugger for our PC-UI applications as well. In order to do so take the following steps: 1) Initiate the Object Navigator (transaction: SE80), 2) Select Settings, 3) Tab ‘ABAP Editor’ and sub tab ‘Debugging’, and 4) Check the Actv. checkbox.

After we have activated the debugger, we can position the debugger at such a place we know where the ‘Go’-button performs its actual selection. Executing transaction SE80 we select class and enter CL_CRM_BSP_AM_HEADFM_1O, the MAC identified with the first tool. Using the trace we identified the method QUERY as being initiated upon pressing the button, so open this method accordingly. Within the code of this method hit the debugging button (Ctrl+Shift+F12) and select ‘External Breakpoint’ in the pop-up that appears. Having set the breakpoint let’s execute the PC-UI Application again and hit the ‘Go’-button. If you have followed these steps correctly a new session in your GUI should have been initiated, enabling you to debug your application from this point onwards.

image

To report this post you need to login first.

4 Comments

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

  1. Former Member
    Hello Tiest,

    I was wondering whether you knew a way to achieve the analyze=x behaviour on CRM 5.0. So far I have not yet been able to activate this, and always digging through the IMG for the MAC sure is tedious…

    Regards
    Thomas

    (0) 
    1. Hi Thomas,
      The analyze=X behaviour works for CRM 5.0 as well. If you are able to see the details like model access class then it is probably due to the state manager in CRM 5,0. Kindly run the transaction CRMC_BSP_STATE_ERASE and delete all the stated under your user Id. You will then be able to see analyze = X.

      Regards,
      Hemanth

      (0) 
  2. Former Member
    Hello Tiest :
    What are the versions of an application exactly ? For example for application crmd_bus2000116, I can execute version 0000 or version 0001. Does this mean that if I want to modify what I see when I execute version 0001 then I have to work in the customizing tool with version 0001 ? Sometimes the names of the field groups differ between versions.
    Also, when I execute a preview from customizing tool , I have no option of choosing a version.
    Can you exand on this concept.
    I am writing this to you because I thought that your explanation about debugging in PCUI was excellent.
    Thank you in advance,
    Irene Matrajt
    (0) 

Leave a Reply