SAP SAPWL_STATREC_DIRECT_READ Function Module for
SAPWL_STATREC_DIRECT_READ is a standard sapwl statrec direct read SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 sapwl statrec direct read FM, simply by entering the name SAPWL_STATREC_DIRECT_READ into the relevant SAP transaction such as SE37 or SE38.
Function Group: SAPWL_STAT
Program Name: SAPLSAPWL_STAT
Main Program: SAPLSAPWL_STAT
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SAPWL_STATREC_DIRECT_READ 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 'SAPWL_STATREC_DIRECT_READ'".
EXPORTING
* NO_OF_RECORDS = -1 "
* STATISTIC_FILE = "
* NO_BUFFER_FLUSH = "
READ_START_DATE = "
READ_START_TIME = "
READ_END_DATE = "
READ_END_TIME = "
* READ_CLIENT = "
* READ_USERNAME = "
* READ_EXCLUDE_USERNAME = "
* READ_WORKPROCESS = 'FFFF' "
IMPORTING
RECORDS_READ = "Number of records read
RFC_TIMEINT_RECORDS = "
SPOOL_PRINT_RECORDS = "
SPOOL_ACTIVITY_RECORDS = "
DB_PROCEDURE_RECORDS = "
ADM_MESSAGE_RECORDS = "
CLIENT_INFO_RECORDS = "
HTTP_RECORDS = "
HTTP_CLIENT_RECORDS = "
HTTP_CLIENT_DEST_RECS = "
NORM_SUBRECORD_INDEX = "
EOF_REACHED = "
NORMAL_RECORDS_KB = "
BTC_STEP_RECORDS_KB = "
NORMAL_RECORDS = "
BTC_STEP_RECORDS = "
TABLE_RECORDS = "Table records
RFC_CLIENT_RECORDS = "
RFC_SERVER_RECORDS = "
RFC_CLIENT_DEST_RECORDS = "
RFC_SERVER_DEST_RECORDS = "
EXCEPTIONS
WRONG_PARAMETER_COMBINATION = 1 FILE_PROBLEMS = 2 CONVERT_OVERFLOW = 3
IMPORTING Parameters details for SAPWL_STATREC_DIRECT_READ
NO_OF_RECORDS -
Data type: SAPWLSRIRNDefault: -1
Optional: No
Call by Reference: No ( called with pass by value option)
STATISTIC_FILE -
Data type: SAPWLPSRFNOptional: Yes
Call by Reference: No ( called with pass by value option)
NO_BUFFER_FLUSH -
Data type: SAPWLPFLAGOptional: Yes
Call by Reference: No ( called with pass by value option)
READ_START_DATE -
Data type: SYDATUMOptional: No
Call by Reference: No ( called with pass by value option)
READ_START_TIME -
Data type: SYUZEITOptional: No
Call by Reference: No ( called with pass by value option)
READ_END_DATE -
Data type: SYDATUMOptional: No
Call by Reference: No ( called with pass by value option)
READ_END_TIME -
Data type: SYUZEITOptional: No
Call by Reference: No ( called with pass by value option)
READ_CLIENT -
Data type: SAPWLCLINTOptional: Yes
Call by Reference: No ( called with pass by value option)
READ_USERNAME -
Data type: XUBNAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
READ_EXCLUDE_USERNAME -
Data type: XUBNAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
READ_WORKPROCESS -
Data type: SAPWLPWPNODefault: 'FFFF'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for SAPWL_STATREC_DIRECT_READ
RECORDS_READ - Number of records read
Data type: SAPWLSRIRNOptional: No
Call by Reference: No ( called with pass by value option)
RFC_TIMEINT_RECORDS -
Data type: SAPWLRFCTMINRECSOptional: No
Call by Reference: Yes
SPOOL_PRINT_RECORDS -
Data type: SAPWLSPOPRECSOptional: No
Call by Reference: Yes
SPOOL_ACTIVITY_RECORDS -
Data type: SAPWLSPOACRECSOptional: No
Call by Reference: Yes
DB_PROCEDURE_RECORDS -
Data type: SAPWLDBPROCRECSOptional: No
Call by Reference: Yes
ADM_MESSAGE_RECORDS -
Data type: SAPWLADMRECSOptional: No
Call by Reference: Yes
CLIENT_INFO_RECORDS -
Data type: SAPWLCIFRECSOptional: No
Call by Reference: Yes
HTTP_RECORDS -
Data type: SAPWLHTPRECSOptional: No
Call by Reference: Yes
HTTP_CLIENT_RECORDS -
Data type: SAPWLHTTPCLRECSOptional: No
Call by Reference: Yes
HTTP_CLIENT_DEST_RECS -
Data type: SAPWLHTTPCLDRECSOptional: No
Call by Reference: Yes
NORM_SUBRECORD_INDEX -
Data type: SAPWLNORMSUBINDXOptional: No
Call by Reference: Yes
EOF_REACHED -
Data type: SAPWLPFLAGOptional: No
Call by Reference: No ( called with pass by value option)
NORMAL_RECORDS_KB -
Data type: SAPWLNORMRECS_KBOptional: No
Call by Reference: Yes
BTC_STEP_RECORDS_KB -
Data type: SAPWLBTCRECS_KBOptional: No
Call by Reference: Yes
NORMAL_RECORDS -
Data type: SAPWLNORMRECSOptional: No
Call by Reference: Yes
BTC_STEP_RECORDS -
Data type: SAPWLBTCRECSOptional: No
Call by Reference: Yes
TABLE_RECORDS - Table records
Data type: SAPWLTABRECSOptional: No
Call by Reference: Yes
RFC_CLIENT_RECORDS -
Data type: SAPWLRFCCLRECSOptional: No
Call by Reference: Yes
RFC_SERVER_RECORDS -
Data type: SAPWLRFCSVRECSOptional: No
Call by Reference: Yes
RFC_CLIENT_DEST_RECORDS -
Data type: SAPWLRFCCLDRECSOptional: No
Call by Reference: Yes
RFC_SERVER_DEST_RECORDS -
Data type: SAPWLRFCSVDRECSOptional: No
Call by Reference: Yes
EXCEPTIONS details
WRONG_PARAMETER_COMBINATION - Incorrect parameter combination
Data type:Optional: No
Call by Reference: Yes
FILE_PROBLEMS -
Data type:Optional: No
Call by Reference: Yes
CONVERT_OVERFLOW -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for SAPWL_STATREC_DIRECT_READ 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_records_read | TYPE SAPWLSRIRN, " | |||
| lv_no_of_records | TYPE SAPWLSRIRN, " -1 | |||
| lv_wrong_parameter_combination | TYPE SAPWLSRIRN, " | |||
| lv_statistic_file | TYPE SAPWLPSRFN, " | |||
| lv_rfc_timeint_records | TYPE SAPWLRFCTMINRECS, " | |||
| lv_no_buffer_flush | TYPE SAPWLPFLAG, " | |||
| lv_spool_print_records | TYPE SAPWLSPOPRECS, " | |||
| lv_spool_activity_records | TYPE SAPWLSPOACRECS, " | |||
| lv_db_procedure_records | TYPE SAPWLDBPROCRECS, " | |||
| lv_adm_message_records | TYPE SAPWLADMRECS, " | |||
| lv_client_info_records | TYPE SAPWLCIFRECS, " | |||
| lv_http_records | TYPE SAPWLHTPRECS, " | |||
| lv_http_client_records | TYPE SAPWLHTTPCLRECS, " | |||
| lv_http_client_dest_recs | TYPE SAPWLHTTPCLDRECS, " | |||
| lv_norm_subrecord_index | TYPE SAPWLNORMSUBINDX, " | |||
| lv_eof_reached | TYPE SAPWLPFLAG, " | |||
| lv_file_problems | TYPE SAPWLPFLAG, " | |||
| lv_read_start_date | TYPE SYDATUM, " | |||
| lv_normal_records_kb | TYPE SAPWLNORMRECS_KB, " | |||
| lv_btc_step_records_kb | TYPE SAPWLBTCRECS_KB, " | |||
| lv_normal_records | TYPE SAPWLNORMRECS, " | |||
| lv_read_start_time | TYPE SYUZEIT, " | |||
| lv_convert_overflow | TYPE SYUZEIT, " | |||
| lv_read_end_date | TYPE SYDATUM, " | |||
| lv_btc_step_records | TYPE SAPWLBTCRECS, " | |||
| lv_read_end_time | TYPE SYUZEIT, " | |||
| lv_table_records | TYPE SAPWLTABRECS, " | |||
| lv_read_client | TYPE SAPWLCLINT, " | |||
| lv_rfc_client_records | TYPE SAPWLRFCCLRECS, " | |||
| lv_read_username | TYPE XUBNAME, " | |||
| lv_rfc_server_records | TYPE SAPWLRFCSVRECS, " | |||
| lv_read_exclude_username | TYPE XUBNAME, " | |||
| lv_rfc_client_dest_records | TYPE SAPWLRFCCLDRECS, " | |||
| lv_read_workprocess | TYPE SAPWLPWPNO, " 'FFFF' | |||
| lv_rfc_server_dest_records | TYPE SAPWLRFCSVDRECS. " |
|   CALL FUNCTION 'SAPWL_STATREC_DIRECT_READ' " |
| EXPORTING | ||
| NO_OF_RECORDS | = lv_no_of_records | |
| STATISTIC_FILE | = lv_statistic_file | |
| NO_BUFFER_FLUSH | = lv_no_buffer_flush | |
| READ_START_DATE | = lv_read_start_date | |
| READ_START_TIME | = lv_read_start_time | |
| READ_END_DATE | = lv_read_end_date | |
| READ_END_TIME | = lv_read_end_time | |
| READ_CLIENT | = lv_read_client | |
| READ_USERNAME | = lv_read_username | |
| READ_EXCLUDE_USERNAME | = lv_read_exclude_username | |
| READ_WORKPROCESS | = lv_read_workprocess | |
| IMPORTING | ||
| RECORDS_READ | = lv_records_read | |
| RFC_TIMEINT_RECORDS | = lv_rfc_timeint_records | |
| SPOOL_PRINT_RECORDS | = lv_spool_print_records | |
| SPOOL_ACTIVITY_RECORDS | = lv_spool_activity_records | |
| DB_PROCEDURE_RECORDS | = lv_db_procedure_records | |
| ADM_MESSAGE_RECORDS | = lv_adm_message_records | |
| CLIENT_INFO_RECORDS | = lv_client_info_records | |
| HTTP_RECORDS | = lv_http_records | |
| HTTP_CLIENT_RECORDS | = lv_http_client_records | |
| HTTP_CLIENT_DEST_RECS | = lv_http_client_dest_recs | |
| NORM_SUBRECORD_INDEX | = lv_norm_subrecord_index | |
| EOF_REACHED | = lv_eof_reached | |
| NORMAL_RECORDS_KB | = lv_normal_records_kb | |
| BTC_STEP_RECORDS_KB | = lv_btc_step_records_kb | |
| NORMAL_RECORDS | = lv_normal_records | |
| BTC_STEP_RECORDS | = lv_btc_step_records | |
| TABLE_RECORDS | = lv_table_records | |
| RFC_CLIENT_RECORDS | = lv_rfc_client_records | |
| RFC_SERVER_RECORDS | = lv_rfc_server_records | |
| RFC_CLIENT_DEST_RECORDS | = lv_rfc_client_dest_records | |
| RFC_SERVER_DEST_RECORDS | = lv_rfc_server_dest_records | |
| EXCEPTIONS | ||
| WRONG_PARAMETER_COMBINATION = 1 | ||
| FILE_PROBLEMS = 2 | ||
| CONVERT_OVERFLOW = 3 | ||
| . " SAPWL_STATREC_DIRECT_READ | ||
ABAP code using 7.40 inline data declarations to call FM SAPWL_STATREC_DIRECT_READ
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.| DATA(ld_no_of_records) | = -1. | |||
| DATA(ld_read_workprocess) | = 'FFFF'. | |||
Search for further information about these or an SAP related objects