In Dashboard Builder, a tile is a part of a dashboard. It usually visualizes one KPI in one chart. There are various technical options for supplying the tile with data, which are described in Creating and Editing Tiles.
This procedure contains the information you need to create a BAdI implementation to supply data to a dashboard tile. SAP provides the enhancement spot IF_DSH_DS_BADI_DATA
in the package AI_DSH_BUILDER
, under which you can create your own BAdI implementations.
To develop a BAdI implementation as a data source for Dashboard Builder, this must fulfill the following specifications:
Example
SAP provides a sample implementation that fulfills these conditions and that you can copy as a template - the name of the implementation is DSH_DS_BADI_DATA_DEMO
, the value of the filter USAGE
is DSH_DEMO
.
Use the BAdI definition DSH_DS_BADI_DATA
mentioned above for your BAdI implementations; do not create your own BAdI definitions.
Implement the two methods GET_METADATA
and GET_FLAT_DATA
.
The method GET_METADATA
determines the metadata of the result fields - both the characteristics and the key figures. The sequence of the fields requires the characteristics (30 maximum) to be before the key figures (5 maximum).
The export parameter METADATA
has the table reference type AGS_DSH_COMPDESCR_T
and the following fields:
Field | Description |
---|---|
| Maximum length of field values |
| Number of decimal places |
| ABAP type, for example, P or C |
| Not used currently |
| Field name |
| Field description (displayed in the dashboard) |
| Specifies whether the field can be filtered in the dashboard |
| Specifies whether the field can be visible in the dashboard |
| Specifies whether master data exists for the field |
| Specifies whether the field can be filtered according to conditions (see Usage of Filters and Threshold Values) |
The method GET_FLAT_DATA
calls the results as flat data.
The export parameter DATA
has the table reference type DATA
and contains the results as flat data. The row type of the table must be a flat structure without embedded structures or tables. The number and sequence of the fields must be the same as in the method GET_METADATA
.
You can choose to also set the parameters IF_FILTER
and IS_CONDITION_SET
for the method. For a description of this, see the method GET_FLAT_DATA
of the sample implementation DSH_DS_BADI_DATA_DEMO
.
The different implementations are differentiated using the value of the filter USAGE
. Therefore, assign a unique name for this filter value.
When you have created your BAdI implementation, you can create a tile with this data source in Dashboard Builder (see Creating and Editing Tiles). You choose the Business Add-In
entry as the Data Source Type
, and the value of the filter USAGE
in your implementation as the name.