SAP GET_DB4_SPACE_STATISTICS Function Module for Get the Space Statistics of an OS/400









GET_DB4_SPACE_STATISTICS is a standard get db4 space statistics SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get the Space Statistics of an OS/400 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 get db4 space statistics FM, simply by entering the name GET_DB4_SPACE_STATISTICS into the relevant SAP transaction such as SE37 or SE38.

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



Function GET_DB4_SPACE_STATISTICS 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 'GET_DB4_SPACE_STATISTICS'"Get the Space Statistics of an OS/400
EXPORTING
* TABNAM = "Name of the Table for Details
SCAIL = "Possible values: 'D' (Day), 'W' (Week), 'M' (Month)
* DELTA_SIZE = "Natural number
* CURRSYST = "DB6: System Registration Table

TABLES
SUM = "used for parameter sum in fctmodule db02_db4_get_space_info
HISTORY = "structure for hist parameter of fct. db02_db4_get_space_info
CHANGE = "Change of size of table
.



IMPORTING Parameters details for GET_DB4_SPACE_STATISTICS

TABNAM - Name of the Table for Details

Data type: SPIMPAR-TABNAM
Optional: Yes
Call by Reference: No ( called with pass by value option)

SCAIL - Possible values: 'D' (Day), 'W' (Week), 'M' (Month)

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

DELTA_SIZE - Natural number

Data type: SPIMPAR-DELTA_SIZE
Optional: Yes
Call by Reference: No ( called with pass by value option)

CURRSYST - DB6: System Registration Table

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

TABLES Parameters details for GET_DB4_SPACE_STATISTICS

SUM - used for parameter sum in fctmodule db02_db4_get_space_info

Data type: SUMSTR
Optional: No
Call by Reference: Yes

HISTORY - structure for hist parameter of fct. db02_db4_get_space_info

Data type: HISTSTRU
Optional: No
Call by Reference: Yes

CHANGE - Change of size of table

Data type: CHANGESTR
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for GET_DB4_SPACE_STATISTICS 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:
lt_sum  TYPE STANDARD TABLE OF SUMSTR, "   
lv_tabnam  TYPE SPIMPAR-TABNAM, "   
lv_scail  TYPE SPIMPAR-SCAIL, "   
lt_history  TYPE STANDARD TABLE OF HISTSTRU, "   
lt_change  TYPE STANDARD TABLE OF CHANGESTR, "   
lv_delta_size  TYPE SPIMPAR-DELTA_SIZE, "   
lv_currsyst  TYPE DB6NAVSYST. "   

  CALL FUNCTION 'GET_DB4_SPACE_STATISTICS'  "Get the Space Statistics of an OS/400
    EXPORTING
         TABNAM = lv_tabnam
         SCAIL = lv_scail
         DELTA_SIZE = lv_delta_size
         CURRSYST = lv_currsyst
    TABLES
         SUM = lt_sum
         HISTORY = lt_history
         CHANGE = lt_change
. " GET_DB4_SPACE_STATISTICS




ABAP code using 7.40 inline data declarations to call FM GET_DB4_SPACE_STATISTICS

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 TABNAM FROM SPIMPAR INTO @DATA(ld_tabnam).
 
"SELECT single SCAIL FROM SPIMPAR INTO @DATA(ld_scail).
 
 
 
"SELECT single DELTA_SIZE FROM SPIMPAR INTO @DATA(ld_delta_size).
 
 


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!