Enhancing NWP1 workload statistics

With SAP Note 1609418 which dates back to 2011, the Clinical Workstation (NWP1) was extended to provide additional application information for the workload statistics (transaction STAD). (Note that, depending on your system state, you may need to implement the correction provided in SAP Note 2193204 to enable the application logging.) While this additional information can be very useful, unfortunately it's not sufficient for a complete performance and workload overview. The reason for this is the content of the application information logged which is detailed in SAP Note 1609418:

In the 'Application Info' column,

  • when you call a view, the relevant view type and the view ID are displayed in a string (for example, 007/CSTPRI0001).

When implementing the Clinical Workstation, you usually strive to reuse variants and view definitions as much as possible to reduce the overall maintenance effort required. This means that a view definition (which is uniquely identified by its view type and view ID as shown above) may occur in any number of workplaces. Some view types have the capability to use data specified the workplace definition in addition to the selection variant, and that means that the same view definition might be used to select very different datasets with varying size and runtime requirements. The bottom line is: to accurately identify the views that are in constant use and/or might benefit from performance improvements, the view key is not sufficient - you need the workplace ID as well.

Contacting SAP Support, I was told that at the moment, no changes or improvements are planned in this area of the application. Since the additional information is logged by a central function module named ISH_WP_ASTAT_WRITE, a relatively simple enhancement of that function module is sufficient to store the additional information.

FUNCTION ish_wp_astat_write.                     "note 1609418  
ENHANCEMENT 1 ZZZ_ISH_WP_ASTAT_WRITE.     
  DATA: l_wplace_id_1 TYPE nwplaceid,  
        l_wplace_id_2 TYPE nwplaceid,  
        l_wplace_id   TYPE nwplaceid,  
        l_view_id_1   TYPE nviewid,  
        l_view_id_2   TYPE nviewid,  
        l_view_type_1 TYPE nviewtype,  
        l_view_type_2 TYPE nviewtype,  
        l_app_info    type CHAR50.  
  IF i_openkey = 'NWP1_CALL_VIEW'.  
    " determine the workplace ID  
    CALL FUNCTION 'ISH_WP_ACTIVE_VIEWS_TRANSFER'  
      IMPORTING  
        e_wplace_id  = l_wplace_id_1  
        e_view_id    = l_view_id_1  
        e_view_type  = l_view_type_1  
        e_wplace_id2 = l_wplace_id_2  
        e_view_id2   = l_view_id_2  
        e_view_type2 = l_view_type_2.  
    IF i_view_type = l_view_type_1 AND i_view_id = l_view_id_1.  
      l_wplace_id = l_wplace_id_1.  
    ELSEIF i_view_type = l_view_type_2 AND i_view_id = l_view_id_2.  
      l_wplace_id = l_wplace_id_2.  
    ENDIF.  
    IF l_wplace_id IS NOT INITIAL.  
      CONCATENATE l_wplace_id i_view_type i_view_id INTO l_app_info SEPARATED BY '/'.  
      "           ^^^^^^^^^^^ new  
      CALL FUNCTION 'PF_ASTAT_OPEN'  
        EXPORTING  
          openkey = i_openkey  
          appinfo = l_app_info.  
      CALL FUNCTION 'PF_ASTAT_CLOSE'  
        EXPORTING  
          openkey = i_openkey.  
      RETURN. " --> leave function module to suppress default processing  
    ENDIF.  
  ENDIF.  
ENDENHANCEMENT.  

With this enhancement, the system now logs the workplace ID as well (for example, 'CSTPRI001234/007/CSTPRI0001').

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer