SAP ST04_DB4_GET_FILE_INFO Function Module for OS/400: Get File Statistics for ST04 Detail Analysis
ST04_DB4_GET_FILE_INFO is a standard st04 db4 get file info SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for OS/400: Get File Statistics for ST04 Detail Analysis 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 st04 db4 get file info FM, simply by entering the name ST04_DB4_GET_FILE_INFO 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 ST04_DB4_GET_FILE_INFO 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 'ST04_DB4_GET_FILE_INFO'"OS/400: Get File Statistics for ST04 Detail Analysis.
EXPORTING
* RESET_FLAG = "iSeries: Flag to indicate reset in ST04
* DBHOST = "R/3 System, Name of Application Server
* SCHEMANAME = "
* DBCNAME = "Logical name for a database connection
IMPORTING
QUALITY = "iSeries: Hit Ratio
TABLES
* IT_FILESTATS = "Table Sizes in the Database (File Statistics)
EXCEPTIONS
NO_DATA_FOUND = 1 NO_OUTPUT_TABLE_SPECIFIED = 2
IMPORTING Parameters details for ST04_DB4_GET_FILE_INFO
RESET_FLAG - iSeries: Flag to indicate reset in ST04
Data type: DB4QQPAR-QRESETOptional: Yes
Call by Reference: No ( called with pass by value option)
DBHOST - R/3 System, Name of Application Server
Data type: DB4TABLE_STAT-DBHOSTOptional: Yes
Call by Reference: No ( called with pass by value option)
SCHEMANAME -
Data type: DB4TABLE_STAT-SCHEMANAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
DBCNAME - Logical name for a database connection
Data type: DBCON_NAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for ST04_DB4_GET_FILE_INFO
QUALITY - iSeries: Hit Ratio
Data type: SQHIST_DB4-QUALITYOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for ST04_DB4_GET_FILE_INFO
IT_FILESTATS - Table Sizes in the Database (File Statistics)
Data type: DB4TABLE_STATOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NO_DATA_FOUND - No data found
Data type:Optional: No
Call by Reference: Yes
NO_OUTPUT_TABLE_SPECIFIED - No table specified to receive info specified
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for ST04_DB4_GET_FILE_INFO 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_quality | TYPE SQHIST_DB4-QUALITY, " | |||
| lv_reset_flag | TYPE DB4QQPAR-QRESET, " | |||
| lt_it_filestats | TYPE STANDARD TABLE OF DB4TABLE_STAT, " | |||
| lv_no_data_found | TYPE DB4TABLE_STAT, " | |||
| lv_dbhost | TYPE DB4TABLE_STAT-DBHOST, " | |||
| lv_no_output_table_specified | TYPE DB4TABLE_STAT, " | |||
| lv_schemaname | TYPE DB4TABLE_STAT-SCHEMANAME, " | |||
| lv_dbcname | TYPE DBCON_NAME. " |
|   CALL FUNCTION 'ST04_DB4_GET_FILE_INFO' "OS/400: Get File Statistics for ST04 Detail Analysis |
| EXPORTING | ||
| RESET_FLAG | = lv_reset_flag | |
| DBHOST | = lv_dbhost | |
| SCHEMANAME | = lv_schemaname | |
| DBCNAME | = lv_dbcname | |
| IMPORTING | ||
| QUALITY | = lv_quality | |
| TABLES | ||
| IT_FILESTATS | = lt_it_filestats | |
| EXCEPTIONS | ||
| NO_DATA_FOUND = 1 | ||
| NO_OUTPUT_TABLE_SPECIFIED = 2 | ||
| . " ST04_DB4_GET_FILE_INFO | ||
ABAP code using 7.40 inline data declarations to call FM ST04_DB4_GET_FILE_INFO
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 QUALITY FROM SQHIST_DB4 INTO @DATA(ld_quality). | ||||
| "SELECT single QRESET FROM DB4QQPAR INTO @DATA(ld_reset_flag). | ||||
| "SELECT single DBHOST FROM DB4TABLE_STAT INTO @DATA(ld_dbhost). | ||||
| "SELECT single SCHEMANAME FROM DB4TABLE_STAT INTO @DATA(ld_schemaname). | ||||
Search for further information about these or an SAP related objects