Technical Articles
How to realize a Solution Manager LMDB System Overview in Dashboard Builder
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:
SID | CAPTION | SYSTEMTYPE | SYNC_TIMESTAMP | COUNTER_ST | COUNTER_EXPIRED |
<SID> | <CAPTION> | <SYSTEMTYPE> | YYYY.MM.DD HH:MM:SS | 0 | 1 | 1 |
- 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
Parameter | Value |
KPI Type | Custom |
Name | Total |
Subhead | |
Description | Systems |
Visualization | Number-based |
Size | 1 X 1 |
Unit | |
Data Source Type | Function Module |
Data Source Name | Z_DSH_SYSINFO_FM_DATASET |
Detail Page Template | Drill-Down views |
Rows | |
Columns | Key Figures |
Filter 1 | Key Figures: Counter Systemtype |
Thresholds | Counter Systemtype: >= 0 Show as Green |
Tile: Systems with outdated synchronization data
Parameter | Value |
KPI Type | Custom |
Name | Outdated Data |
Subhead | Older than 20 days |
Description | Systems |
Visualization | Number-based |
Size | 1 X 1 |
Unit | |
Data Source Type | Function Module |
Data Source Name | Z_DSH_SYSINFO_FM_DATASET |
Detail Page Template | Drill-Down views |
Rows | |
Columns | Key Figures |
Filter 1 | Key Figures: Expired System |
Thresholds | Expired System: >= 0 Show as Red |
Tile: Distribution by System Type
Parameter | Value |
KPI Type | Custom |
Name | Distribution |
Subhead | by System Type |
Description | |
Visualization | Pie chart |
Size | 2 X 2 |
Unit | |
Data Source Type | Function Module |
Data Source Name | Z_DSH_SYSINFO_FM_DATASET |
Detail Page Template | None |
Rows | Technical System Type |
Columns | Key Figures |
Filter 1 | Key Figures: Counter Systemtype |
Thresholds |
Tiles: Total Count of NW AS ABAP, NW AS JAVA & Other Systems
Parameter | Value |
KPI Type | Custom |
Name | NW AS ABAP [NW AS JAVA, Other] |
Subhead | |
Description | Systems |
Visualization | Number-based |
Size | 1 X 1 |
Unit | |
Data Source Type | Function Module |
Data Source Name | Z_DSH_SYSINFO_FM_DATASET |
Detail Page Template | Drill-Down views |
Rows | |
Columns | Key Figures |
Filter 1 | Key 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.htm 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
Hello Kai,
Good blog!
Do you have any idea how to get metrics for DB monitoring in Dashboard Builder tiles with the help of function module? The out of the box KPIs are really restricted in the type of metrics available for the DB monitoring(dimensions), and in the ways to choose what to see(filters). For instance utilization is available in MBs and does not available in %.
Also, it would be great to have all the detailed Basis checks available in several tiles in one dashboard to see all the locked objects, hanged jobs, not enough work processes etc. Please give me a hint if you know how to do it;)
Regards,
Dmytro
Hello Kai,
Thanks for this blog.
You show Tile & Data in the Dashboard Builder.
But next step is how to use and share these tiles in the Solman launchpad ( ie work center) ?
Regards.
Stéphane M.
Hello Stéphane,
you can do this using the Solution Manager Launchpad Designer. (Link: SAP Fiori Launchpad - Using the Launchpad Designer)
The simplest would be an "App Launcher - Static" tile that points to the Dashboard as Target Type "URL".
Regards
Kai
Hi Kai,
Is it possible to add Data Provider Z to the Dashboard Builder in order to obtain new dashboards with the integrated information?
Regards,
Nazarena