STU3_GET_STATEMENT_STATISTICS 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 STU3_GET_STATEMENT_STATISTICS into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
STU3
Released Date:
Not Released
Processing type: Remote-Enabled
CALL FUNCTION 'STU3_GET_STATEMENT_STATISTICS' "
* EXPORTING
* remote_dbcon = " dbcon-con_name Logical name for a database connection
* fb_dsctype = " sy-subrc Return Value of ABAP Statements
* fb_dsclist = " sy-subrc Return Value of ABAP Statements
* fb_dscvalue = " sy-subrc Return Value of ABAP Statements
* fb_dscvalue2 = " sy-subrc Return Value of ABAP Statements
* fb_retry = " db2qclreq-retry retry count
* ds_member_spec = " db2dsmem-memb_name Name of the data sharing group member
* get_long_sql = " db2cchar01 Field type char, length 1
IMPORTING
fb_dschdr = " db2dsshdr Header for statement cache statistics
fb_dsecprocd = " db2qclreq-dsecprocd number of data sections processed
fb_dsecnprocd = " db2qclreq-dsecnprocd number of data sections not processed
ds_member_used = " db2dsmem-memb_name Name of the data sharing group member
TABLES
fb_statement_tab = " db2qstc Structure for Statement Trace
* fb_filter_tab = " db2dscfilter_tab Statement Cache Filters
EXCEPTIONS
RS_AUTH_FAILURE = 1 "
RS_START_TRACE = 2 "
RS_INTERNAL_ERROR = 3 "
RS_DYN_CACH_NA = 4 "
RS_NO_CACH_STMTS = 5 "
RS_DSC_PTF_MISSING = 6 "
RS_NOT_COMPLETE = 7 "
REQUEST_TO_OLD = 8 "
NO_BUFFER_SPACE_IN_SHM = 9 "
UNVALID_REQUEST_ID = 10 "
ANSWER_IS_NOT_YET_AVAILABLE = 11 "
COMMUNICATION_ERROR = 12 "
ANSWER_NOT_POSSIBLE = 13 "
COMMUNICATION_BUFFER_TO_SMALL = 14 "
UNKNOWN_ERROR = 15 "
ILLEGAL_PARAMETER = 16 "
IFI_ERROR = 17 "
OTHER_EXCEPTION = 18 "
OTHERS = 19 "
. " STU3_GET_STATEMENT_STATISTICS
The ABAP code below is a full code listing to execute function module STU3_GET_STATEMENT_STATISTICS 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).
| ld_fb_dschdr | TYPE DB2DSSHDR , |
| ld_fb_dsecprocd | TYPE DB2QCLREQ-DSECPROCD , |
| ld_fb_dsecnprocd | TYPE DB2QCLREQ-DSECNPROCD , |
| ld_ds_member_used | TYPE DB2DSMEM-MEMB_NAME , |
| it_fb_statement_tab | TYPE STANDARD TABLE OF DB2QSTC,"TABLES PARAM |
| wa_fb_statement_tab | LIKE LINE OF it_fb_statement_tab , |
| it_fb_filter_tab | TYPE STANDARD TABLE OF DB2DSCFILTER_TAB,"TABLES PARAM |
| wa_fb_filter_tab | LIKE LINE OF it_fb_filter_tab . |
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_fb_dschdr | TYPE DB2DSSHDR , |
| ld_remote_dbcon | TYPE DBCON-CON_NAME , |
| it_fb_statement_tab | TYPE STANDARD TABLE OF DB2QSTC , |
| wa_fb_statement_tab | LIKE LINE OF it_fb_statement_tab, |
| ld_fb_dsecprocd | TYPE DB2QCLREQ-DSECPROCD , |
| ld_fb_dsctype | TYPE SY-SUBRC , |
| it_fb_filter_tab | TYPE STANDARD TABLE OF DB2DSCFILTER_TAB , |
| wa_fb_filter_tab | LIKE LINE OF it_fb_filter_tab, |
| ld_fb_dsclist | TYPE SY-SUBRC , |
| ld_fb_dsecnprocd | TYPE DB2QCLREQ-DSECNPROCD , |
| ld_fb_dscvalue | TYPE SY-SUBRC , |
| ld_ds_member_used | TYPE DB2DSMEM-MEMB_NAME , |
| ld_fb_dscvalue2 | TYPE SY-SUBRC , |
| ld_fb_retry | TYPE DB2QCLREQ-RETRY , |
| ld_ds_member_spec | TYPE DB2DSMEM-MEMB_NAME , |
| ld_get_long_sql | TYPE DB2CCHAR01 . |
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 STU3_GET_STATEMENT_STATISTICS or its description.