SAPWL_STATREC_DIRECT_READ_R_D is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name SAPWL_STATREC_DIRECT_READ_R_D into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
SAPWL_STAT
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'SAPWL_STATREC_DIRECT_READ_R_D' "
EXPORTING
no_of_records = -1 " sapwlsrirn
read_start_date = " sydatum
read_start_time = " syuzeit
read_end_date = " sydatum
read_end_time = " syuzeit
* read_client = " sapwlclint
* read_username = " xubname
* read_exclude_username = " xubname
* read_workprocess = 'FFFF' " sapwlpwpno
* statistic_file = " sapwlpsrfn
* no_buffer_flush = " sapwlpflag
EXCEPTIONS
FUNCTION_NOT_IMPLEMENTED_YET = 1 " Function not available
. " SAPWL_STATREC_DIRECT_READ_R_D
The ABAP code below is a full code listing to execute function module SAPWL_STATREC_DIRECT_READ_R_D including all data declarations. The code uses 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 original method of declaring data variables up front. 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).
DATA(ld_no_of_records) = 'Check type of data required'.
DATA(ld_read_start_date) = '20210129'.
DATA(ld_read_start_time) = 'Check type of data required'.
DATA(ld_read_end_date) = '20210129'.
DATA(ld_read_end_time) = 'Check type of data required'.
DATA(ld_read_client) = 'Check type of data required'.
DATA(ld_read_username) = 'Check type of data required'.
DATA(ld_read_exclude_username) = 'Check type of data required'.
DATA(ld_read_workprocess) = 'Check type of data required'.
DATA(ld_statistic_file) = 'Check type of data required'.
DATA(ld_no_buffer_flush) = 'Check type of data required'. . CALL FUNCTION 'SAPWL_STATREC_DIRECT_READ_R_D' EXPORTING no_of_records = ld_no_of_records read_start_date = ld_read_start_date read_start_time = ld_read_start_time read_end_date = ld_read_end_date read_end_time = ld_read_end_time * read_client = ld_read_client * read_username = ld_read_username * read_exclude_username = ld_read_exclude_username * read_workprocess = ld_read_workprocess * statistic_file = ld_statistic_file * no_buffer_flush = ld_no_buffer_flush EXCEPTIONS FUNCTION_NOT_IMPLEMENTED_YET = 1 . " SAPWL_STATREC_DIRECT_READ_R_D
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_no_of_records | TYPE SAPWLSRIRN , |
| ld_read_start_date | TYPE SYDATUM , |
| ld_read_start_time | TYPE SYUZEIT , |
| ld_read_end_date | TYPE SYDATUM , |
| ld_read_end_time | TYPE SYUZEIT , |
| ld_read_client | TYPE SAPWLCLINT , |
| ld_read_username | TYPE XUBNAME , |
| ld_read_exclude_username | TYPE XUBNAME , |
| ld_read_workprocess | TYPE SAPWLPWPNO , |
| ld_statistic_file | TYPE SAPWLPSRFN , |
| ld_no_buffer_flush | TYPE SAPWLPFLAG . |
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name SAPWL_STATREC_DIRECT_READ_R_D or its description.