SAP OSCOL_SAVE_STATISTIC Function Module for SAP Workload: Workload Statistics: Save All Statistics









OSCOL_SAVE_STATISTIC is a standard oscol save statistic SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for SAP Workload: Workload Statistics: Save All Statistics processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for oscol save statistic FM, simply by entering the name OSCOL_SAVE_STATISTIC into the relevant SAP transaction such as SE37 or SE38.

Function Group: STUH
Program Name: SAPLSTUH
Main Program: SAPLSTUH
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function OSCOL_SAVE_STATISTIC pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'OSCOL_SAVE_STATISTIC'"SAP Workload: Workload Statistics: Save All Statistics
EXPORTING
PERIODTYPE = "Period type
HOSTID = "Server ID (or 'TOTAL' for combination of all servers)
STARTDATE = "Period start date

TABLES
TF_HOUR_OK = "
TF_CPU_SUM = "
TF_DISK_SUM = "
TF_FSYS_SUM = "
TF_LAN_SUM = "
TF_MEM_SUM = "

EXCEPTIONS
UNKNOWN_PERIODTYPE = 1
.



IMPORTING Parameters details for OSCOL_SAVE_STATISTIC

PERIODTYPE - Period type

Data type: SAPWLACCTP-PERIODTYPE
Optional: No
Call by Reference: No ( called with pass by value option)

HOSTID - Server ID (or 'TOTAL' for combination of all servers)

Data type: SAPWLTADIR-HOSTID
Optional: No
Call by Reference: No ( called with pass by value option)

STARTDATE - Period start date

Data type: SAPWLACCTP-STARTDATE
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for OSCOL_SAVE_STATISTIC

TF_HOUR_OK -

Data type: HOUR_TAB
Optional: No
Call by Reference: No ( called with pass by value option)

TF_CPU_SUM -

Data type: CPU_SUM
Optional: No
Call by Reference: No ( called with pass by value option)

TF_DISK_SUM -

Data type: DSK_SUM
Optional: No
Call by Reference: No ( called with pass by value option)

TF_FSYS_SUM -

Data type: FSY_SUM
Optional: No
Call by Reference: No ( called with pass by value option)

TF_LAN_SUM -

Data type: LAN_SUM
Optional: No
Call by Reference: No ( called with pass by value option)

TF_MEM_SUM -

Data type: MEM_SUM
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

UNKNOWN_PERIODTYPE - Invalid period type specified

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for OSCOL_SAVE_STATISTIC Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_periodtype  TYPE SAPWLACCTP-PERIODTYPE, "   
lt_tf_hour_ok  TYPE STANDARD TABLE OF HOUR_TAB, "   
lv_unknown_periodtype  TYPE HOUR_TAB, "   
lv_hostid  TYPE SAPWLTADIR-HOSTID, "   
lt_tf_cpu_sum  TYPE STANDARD TABLE OF CPU_SUM, "   
lv_startdate  TYPE SAPWLACCTP-STARTDATE, "   
lt_tf_disk_sum  TYPE STANDARD TABLE OF DSK_SUM, "   
lt_tf_fsys_sum  TYPE STANDARD TABLE OF FSY_SUM, "   
lt_tf_lan_sum  TYPE STANDARD TABLE OF LAN_SUM, "   
lt_tf_mem_sum  TYPE STANDARD TABLE OF MEM_SUM. "   

  CALL FUNCTION 'OSCOL_SAVE_STATISTIC'  "SAP Workload: Workload Statistics: Save All Statistics
    EXPORTING
         PERIODTYPE = lv_periodtype
         HOSTID = lv_hostid
         STARTDATE = lv_startdate
    TABLES
         TF_HOUR_OK = lt_tf_hour_ok
         TF_CPU_SUM = lt_tf_cpu_sum
         TF_DISK_SUM = lt_tf_disk_sum
         TF_FSYS_SUM = lt_tf_fsys_sum
         TF_LAN_SUM = lt_tf_lan_sum
         TF_MEM_SUM = lt_tf_mem_sum
    EXCEPTIONS
        UNKNOWN_PERIODTYPE = 1
. " OSCOL_SAVE_STATISTIC




ABAP code using 7.40 inline data declarations to call FM OSCOL_SAVE_STATISTIC

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single PERIODTYPE FROM SAPWLACCTP INTO @DATA(ld_periodtype).
 
 
 
"SELECT single HOSTID FROM SAPWLTADIR INTO @DATA(ld_hostid).
 
 
"SELECT single STARTDATE FROM SAPWLACCTP INTO @DATA(ld_startdate).
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!