Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
kai_bauer
Explorer
3,862

SAP Solution Manager 7.2 Dashboard Builder is a powerful framework for SAP Systems Management.

It helps in visualizing the Solution Manager database content, so that it becomes possible to create useful reporting dashboards.

In some cases (e.g. when creating an "SAP Security Dashboard") number-based tiles for a general system overview are necessary:

    • Total Count of all managed Systems
    • Total Count of all ABAP Systems
    • Total Count of all Java Systems
    • Total Count of other Systems
    • Number of Systems with outdated synchronization data


Unfortunately, there is no simple way to do this "out of the box".

This blogpost describes how to use a custom function module to display LMDB data in SAP Solution Manager Dashboard Builder.

 

 

Data Source

The following data from LMDB is needed:

    • SID
    • System Type
    • Last Synchronization Timestamp

These values are stored in LMDB table „LAPI_TECH_SYSTEM“:



Custom Function Module as Interface LAPI_TECH_SYSTEM -> Dashboard Builder

SAP provides:

“DSH_SAMPLE_FM_DATASET – test function module for dashboard builder”

as an example of how to deliver data to Dashboard Builder.

Using this template, it is easy to create a custom function module, e.g.:

"Z_DSH_SYSINFO_FM_DATASET - lapi_tech_system data function module for dashboard builder"

 

Step 1 (SE37):

Copy "DSH_SAMPLE_FM_DATASET" to “Z_DSH_SYSINFO_FM_DATASET”.

 

Step 2 (Tables tab):

Customize Structure "INC_DATA_S" to:


 SIDCAPTIONSYSTEMTYPESYNC_TIMESTAMPCOUNTER_STCOUNTER_EXPIRED
<SID><CAPTION><SYSTEMTYPE>YYYY.MM.DD HH:MM:SS0 | 11
    • COUNTER_ST is a key figure for filtering and counting different System Types.
    • COUNTER_EXPIRED is a key figure for filtering Systems with outdated synchronization data.

Sample Structure as in INC_DATA_S:



Customized Structure ZDSH_SYSINFO:


 

Step 3 (Source code tab):

FUNCTION z_dsh_sysinfo_fm_dataset.

*"----------------------------------------------------------------------

*"*"Local Interface:

*"  IMPORTING

*"     VALUE(I_T_SEL_OPTIONS) TYPE  DSH_RSPARAMS_TT OPTIONAL

*"  EXPORTING

*"     REFERENCE(ET_TEXTS) TYPE  DSH_SRC_TEXT_TABLE

*"  TABLES

*"      DATASET STRUCTURE  ZDSH_SYSINFO

*"----------------------------------------------------------------------



* Function module Z_DSH_SYSINFO_FM_DATASET selects data from Solution Manager table LAPI_TECH_SYSTEM (Technical Systems for DIAGLS landscape API)

* and provides it for Solution Manager Dashboard Builder.

* It helps to create number-based Tiles like:

* - Total Count of all ABAP Systems

* - Total Count of all Java Systems

* - Total Count of all other Systems

* - Number of Systems that have a synchronization timestamp older than 30 days



* See function module DSH_SAMPLE_FM_DATASET as a reference



  TABLES:lapi_tech_system. " Import table

  DATA:etab         TYPE zdsh_sysinfo, " Temporary structure for dataset export

       lv_date      TYPE datum,

       lv_date_char TYPE char14,

       lv_duration  TYPE int4,

       lv_time      TYPE uzeit,

       lv_date_ext  TYPE char10,

       lv_time_ext  TYPE char8.



  SELECT * FROM lapi_tech_system.



    MOVE lapi_tech_system-sid TO etab-sid. " SID

    MOVE lapi_tech_system-caption TO etab-caption. " Caption

    MOVE lapi_tech_system-type TO etab-systemtype. " System Type



*   Processing Last synchronization timestamp:

    MOVE lapi_tech_system-sync_timestamp TO lv_date_char.

    MOVE lv_date_char(8) TO lv_date.

    MOVE lv_date_char+8(6) TO lv_time.

    CONCATENATE lv_date_char(4) lv_date_char+4(2) lv_date_char+6(2) INTO lv_date_ext SEPARATED BY '.'.

    WRITE lv_time TO lv_time_ext.

    CONCATENATE lv_date_ext lv_time_ext INTO etab-sync_timestamp SEPARATED BY space.



*   Determine systems with synchronization timestamp older than 30 days

*   (expired systems)

    call function 'DURATION_DETERMINE'

      exporting

        unit                       = 'TAG'

*       FACTORY_CALENDAR           =

      importing

        duration                   = lv_duration

      changing

        start_date                 = lv_date

        start_time                 = lv_time

        end_date                   = sy-datum

        end_time                   = sy-uzeit

      exceptions

        factory_calendar_not_found = 1

        date_out_of_calendar_range = 2

        date_not_valid             = 3

        unit_conversion_error      = 4

        si_unit_missing            = 5

        parameters_not_valid       = 6

        others                     = 7.

    IF lv_duration < 30.

      MOVE 0 TO etab-counter_expired. " Counter KPI for Expired Systems

    ELSE.

      MOVE 1 TO etab-counter_expired.

    ENDIF.



    MOVE 1 TO etab-counter_st. " Counter KPI for System Type



    APPEND etab TO dataset.



  ENDSELECT.



ENDFUNCTION.

 

Display Data in Dashboard Builder

 

Tile: Total Count of All Systems



ParameterValue
KPI TypeCustom
NameTotal
Subhead 
DescriptionSystems
VisualizationNumber-based
Size1 X 1
Unit 
Data Source TypeFunction Module
Data Source NameZ_DSH_SYSINFO_FM_DATASET
Detail Page TemplateDrill-Down views
Rows 
ColumnsKey Figures
Filter 1Key Figures: Counter Systemtype
ThresholdsCounter Systemtype: >= 0 Show as Green

 

Tile: Systems with outdated synchronization data



ParameterValue
KPI TypeCustom
NameOutdated Data
SubheadOlder than 20 days
DescriptionSystems
VisualizationNumber-based
Size1 X 1
Unit 
Data Source TypeFunction Module
Data Source NameZ_DSH_SYSINFO_FM_DATASET
Detail Page TemplateDrill-Down views
Rows 
ColumnsKey Figures
Filter 1Key Figures: Expired System
ThresholdsExpired System: >= 0 Show as Red

 

Tile: Distribution by System Type



ParameterValue
KPI TypeCustom
NameDistribution
Subheadby System Type
Description 
VisualizationPie chart
Size2 X 2
Unit 
Data Source TypeFunction Module
Data Source NameZ_DSH_SYSINFO_FM_DATASET
Detail Page TemplateNone
RowsTechnical System Type
ColumnsKey Figures
Filter 1Key Figures: Counter Systemtype
Thresholds 

 

Tiles: Total Count of NW AS ABAP, NW AS JAVA & Other Systems



ParameterValue
KPI TypeCustom
NameNW AS ABAP [NW AS JAVA, Other]
Subhead 
DescriptionSystems
VisualizationNumber-based
Size1 X 1
Unit 
Data Source TypeFunction Module
Data Source NameZ_DSH_SYSINFO_FM_DATASET
Detail Page TemplateDrill-Down views
Rows 
ColumnsKey Figures
Filter 1Key Figures: Counter Systemtype
Filter 2 (ABAP Systems)Technical System Type: ABAP
Filter 2 (JAVA Systems)Technical System Type: JAVA
Filter 2 (Other Systems)Technical System Type: ! ABAP && ! JAVA
Thresholds 

 

Related Links:

https://help.sap.com/doc/saphelp_sm72_sp03/7.2.03/en-US/86/7e155646183a35e10000000a44538d/frameset.h... SAP Documentation: SAP Solution Manager Dashboard Builder - Using a Function Module as a Data Source

https://blogs.sap.com/2017/02/28/sap-solution-manager-7.2-dashboard-builder/ SAP Solution Manager 7.2 – Dashboard Builder

https://blogs.sap.com/2017/05/16/sap-solution-manager-7.2-dashboard-builder-configuration/ SAP Solution Manager 7.2 – Dashboard Builder configuration

https://blogs.sap.com/2017/11/14/sap-solution-manager-7.2-dashboard-builder-new-features-with-sp06/ SAP Solution Manager 7.2 Dashboard Builder – new features with SP06

5 Comments
Labels in this area