EPM_KPI_HIST_DEL is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for You can use this report to delete KPI values that lie outside of the validity period...see full standard documentation available for this report. Also check out the submitted Comments related to this SAP report and the details below to see which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC.
If you would like to execute this report or see the full code listing simply enter EPM_KPI_HIST_DEL into the relevant SAP transactions such as SE38 or SE80
This report can be called from another progam/report simply by using the ABAP SUBMIT statement, see below for example ABAP code snipts of how to do this.
Following KPI values lie outside of historical validity
Selection Text: P_CO_DEL = Delete Data with Comments
Selection Text: P_TEST = Test Run
Selection Text: S_KPI_ID = D KPI ID
Title: Delete Historical KPI Data
Text Symbol: SEL = Delete historical KPIs that lie outside of validity period
001 KPI Time Stamp
INCLUDE EPM_CONST.
No SAP DATABASE tables are accessed within this REPORT code!
TZ_SYSTEM_GET_TZONE CALL FUNCTION 'TZ_SYSTEM_GET_TZONE' "#EC * IMPORTING "#EC * tzone_system = lv_tzone. "#EC *
START_TIME_DETERMINE CALL FUNCTION 'START_TIME_DETERMINE' EXPORTING duration = ls_kpi_del_date-range_per_period unit = lv_unit_hour * FACTORY_CALENDAR = IMPORTING start_date = lv_start_date start_time = lv_start_time CHANGING end_date = lv_end_date end_time = lv_end_time 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.
START_TIME_DETERMINE CALL FUNCTION 'START_TIME_DETERMINE' EXPORTING duration = ls_kpi_del_date-range_per_period unit = lv_unit_day * FACTORY_CALENDAR = IMPORTING start_date = lv_start_date start_time = lv_start_time CHANGING end_date = lv_end_date end_time = lv_end_time 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.
START_TIME_DETERMINE CALL FUNCTION 'START_TIME_DETERMINE' EXPORTING duration = ls_kpi_del_date-range_per_period unit = lv_unit_week * FACTORY_CALENDAR = IMPORTING start_date = lv_start_date start_time = lv_start_time CHANGING end_date = lv_end_date end_time = lv_end_time 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.
START_TIME_DETERMINE CALL FUNCTION 'START_TIME_DETERMINE' EXPORTING duration = ls_kpi_del_date-range_per_period unit = lv_unit_month * FACTORY_CALENDAR = IMPORTING start_date = lv_start_date start_time = lv_start_time CHANGING end_date = lv_end_date end_time = lv_end_time 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.
START_TIME_DETERMINE CALL FUNCTION 'START_TIME_DETERMINE' EXPORTING duration = ls_kpi_del_date-range_per_period unit = lv_unit_year * FACTORY_CALENDAR = IMPORTING start_date = lv_start_date start_time = lv_start_time CHANGING end_date = lv_end_date end_time = lv_end_time 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.
DIMENSION_GET CALL FUNCTION 'DIMENSION_GET' EXPORTING time = 1 IMPORTING dimid = dimid EXCEPTIONS dimension_not_found = 01.
UNIT_GET CALL FUNCTION 'UNIT_GET' EXPORTING dimension = dimid numerator = 3600 denominator = 1 IMPORTING unit = c_unit_hour EXCEPTIONS unit_not_found = 01. "#EC *
UNIT_GET CALL FUNCTION 'UNIT_GET' EXPORTING dimension = dimid numerator = 86400 denominator = 1 IMPORTING unit = c_unit_day EXCEPTIONS unit_not_found = 01.
UNIT_OF_TIME_INSERT_INTO_BUFFE CALL FUNCTION 'UNIT_OF_TIME_INSERT_INTO_BUFFE' EXPORTING numerator = 86400 denominator = 1 IMPORTING unit = c_unit_day EXCEPTIONS dimension_time_not_found = 1.
UNIT_GET CALL FUNCTION 'UNIT_GET' EXPORTING dimension = dimid numerator = 604800 denominator = 1 IMPORTING unit = c_unit_week EXCEPTIONS unit_not_found = 01. "#EC *
UNIT_GET CALL FUNCTION 'UNIT_GET' EXPORTING dimension = dimid numerator = 2592000 denominator = 1 IMPORTING unit = c_unit_month EXCEPTIONS unit_not_found = 01. "#EC *
UNIT_GET CALL FUNCTION 'UNIT_GET' EXPORTING dimension = dimid numerator = 31536000 denominator = 1 IMPORTING unit = c_unit_year EXCEPTIONS unit_not_found = 01. "#EC *
Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.