SAP STU3_GET_SQL_CALL Function Module for
STU3_GET_SQL_CALL is a standard stu3 get sql call 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 stu3 get sql call FM, simply by entering the name STU3_GET_SQL_CALL into the relevant SAP transaction such as SE37 or SE38.
Function Group: STU3
Program Name: SAPLSTU3
Main Program: SAPLSTU3
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function STU3_GET_SQL_CALL 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 'STU3_GET_SQL_CALL'".
EXPORTING
FB_MY_USER = "
FB_DATATYPE = "
FB_DB2THREADS = "
* GET_OLD_DATA = "Get new data from RFCOSCOL?
* DS_MEMBER_SPEC = "Name of the data sharing group member
IMPORTING
FB_DB2RDI = "
FB_DSECPROCD = "number of data sections processed
FB_DSECNPROCD = "number of data sections not processed
TABLES
FB_STATEMENT_TAB = "
EXCEPTIONS
RS_AUTH_FAILURE = 1 RS_NO_LOCKING_THREAD = 10 RS_NO_SQLCOUNTER_THREAD = 11 REQUEST_TO_OLD = 12 NO_BUFFER_SPACE_IN_SHM = 13 UNVALID_REQUEST_ID = 14 ANSWER_IS_NOT_YET_AVAILABLE = 15 COMMUNICATION_ERROR = 16 ANSWER_NOT_POSSIBLE = 17 COMMUNICATION_BUFFER_TO_SMALL = 18 UNKNOWN_ERROR = 19 RS_START_TRACE = 2 ILLEGAL_PARAMETER = 20 IFI_ERROR = 21 RS_INTERNAL_ERROR = 3 RS_NO_LOCKCONFS_SYSWIDE = 4 RS_NO_SQLSTMT_THREAD = 5 RS_NO_LOCKS_HELD_THREAD = 6 RS_INVALID_ACE_THREAD = 7 RS_NO_LOCKCONFS_THREAD = 8 RS_NO_BUFFERS_THREAD = 9
IMPORTING Parameters details for STU3_GET_SQL_CALL
FB_MY_USER -
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
FB_DATATYPE -
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
FB_DB2THREADS -
Data type: DB2THREADSOptional: No
Call by Reference: No ( called with pass by value option)
GET_OLD_DATA - Get new data from RFCOSCOL?
Data type: INT4Optional: Yes
Call by Reference: No ( called with pass by value option)
DS_MEMBER_SPEC - Name of the data sharing group member
Data type: DB2DSMEM-MEMB_NAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for STU3_GET_SQL_CALL
FB_DB2RDI -
Data type: DB2RDIOptional: No
Call by Reference: No ( called with pass by value option)
FB_DSECPROCD - number of data sections processed
Data type: DB2QCLREQ-DSECPROCDOptional: No
Call by Reference: No ( called with pass by value option)
FB_DSECNPROCD - number of data sections not processed
Data type: DB2QCLREQ-DSECNPROCDOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for STU3_GET_SQL_CALL
FB_STATEMENT_TAB -
Data type: LINETABOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
RS_AUTH_FAILURE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RS_NO_LOCKING_THREAD -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RS_NO_SQLCOUNTER_THREAD -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
REQUEST_TO_OLD -
Data type:Optional: No
Call by Reference: Yes
NO_BUFFER_SPACE_IN_SHM -
Data type:Optional: No
Call by Reference: Yes
UNVALID_REQUEST_ID -
Data type:Optional: No
Call by Reference: Yes
ANSWER_IS_NOT_YET_AVAILABLE -
Data type:Optional: No
Call by Reference: Yes
COMMUNICATION_ERROR -
Data type:Optional: No
Call by Reference: Yes
ANSWER_NOT_POSSIBLE -
Data type:Optional: No
Call by Reference: Yes
COMMUNICATION_BUFFER_TO_SMALL -
Data type:Optional: No
Call by Reference: Yes
UNKNOWN_ERROR -
Data type:Optional: No
Call by Reference: Yes
RS_START_TRACE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ILLEGAL_PARAMETER -
Data type:Optional: No
Call by Reference: Yes
IFI_ERROR -
Data type:Optional: No
Call by Reference: Yes
RS_INTERNAL_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RS_NO_LOCKCONFS_SYSWIDE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RS_NO_SQLSTMT_THREAD -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RS_NO_LOCKS_HELD_THREAD -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RS_INVALID_ACE_THREAD -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RS_NO_LOCKCONFS_THREAD -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RS_NO_BUFFERS_THREAD -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for STU3_GET_SQL_CALL 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_fb_db2rdi | TYPE DB2RDI, " | |||
| lv_fb_my_user | TYPE SY-SUBRC, " | |||
| lv_rs_auth_failure | TYPE SY, " | |||
| lt_fb_statement_tab | TYPE STANDARD TABLE OF LINETAB, " | |||
| lv_rs_no_locking_thread | TYPE LINETAB, " | |||
| lv_rs_no_sqlcounter_thread | TYPE LINETAB, " | |||
| lv_request_to_old | TYPE LINETAB, " | |||
| lv_no_buffer_space_in_shm | TYPE LINETAB, " | |||
| lv_unvalid_request_id | TYPE LINETAB, " | |||
| lv_answer_is_not_yet_available | TYPE LINETAB, " | |||
| lv_communication_error | TYPE LINETAB, " | |||
| lv_answer_not_possible | TYPE LINETAB, " | |||
| lv_communication_buffer_to_small | TYPE LINETAB, " | |||
| lv_unknown_error | TYPE LINETAB, " | |||
| lv_fb_datatype | TYPE SY-SUBRC, " | |||
| lv_fb_dsecprocd | TYPE DB2QCLREQ-DSECPROCD, " | |||
| lv_rs_start_trace | TYPE DB2QCLREQ, " | |||
| lv_illegal_parameter | TYPE DB2QCLREQ, " | |||
| lv_ifi_error | TYPE DB2QCLREQ, " | |||
| lv_fb_db2threads | TYPE DB2THREADS, " | |||
| lv_fb_dsecnprocd | TYPE DB2QCLREQ-DSECNPROCD, " | |||
| lv_rs_internal_error | TYPE DB2QCLREQ, " | |||
| lv_get_old_data | TYPE INT4, " | |||
| lv_rs_no_lockconfs_syswide | TYPE INT4, " | |||
| lv_ds_member_spec | TYPE DB2DSMEM-MEMB_NAME, " | |||
| lv_rs_no_sqlstmt_thread | TYPE DB2DSMEM, " | |||
| lv_rs_no_locks_held_thread | TYPE DB2DSMEM, " | |||
| lv_rs_invalid_ace_thread | TYPE DB2DSMEM, " | |||
| lv_rs_no_lockconfs_thread | TYPE DB2DSMEM, " | |||
| lv_rs_no_buffers_thread | TYPE DB2DSMEM. " |
|   CALL FUNCTION 'STU3_GET_SQL_CALL' " |
| EXPORTING | ||
| FB_MY_USER | = lv_fb_my_user | |
| FB_DATATYPE | = lv_fb_datatype | |
| FB_DB2THREADS | = lv_fb_db2threads | |
| GET_OLD_DATA | = lv_get_old_data | |
| DS_MEMBER_SPEC | = lv_ds_member_spec | |
| IMPORTING | ||
| FB_DB2RDI | = lv_fb_db2rdi | |
| FB_DSECPROCD | = lv_fb_dsecprocd | |
| FB_DSECNPROCD | = lv_fb_dsecnprocd | |
| TABLES | ||
| FB_STATEMENT_TAB | = lt_fb_statement_tab | |
| EXCEPTIONS | ||
| RS_AUTH_FAILURE = 1 | ||
| RS_NO_LOCKING_THREAD = 10 | ||
| RS_NO_SQLCOUNTER_THREAD = 11 | ||
| REQUEST_TO_OLD = 12 | ||
| NO_BUFFER_SPACE_IN_SHM = 13 | ||
| UNVALID_REQUEST_ID = 14 | ||
| ANSWER_IS_NOT_YET_AVAILABLE = 15 | ||
| COMMUNICATION_ERROR = 16 | ||
| ANSWER_NOT_POSSIBLE = 17 | ||
| COMMUNICATION_BUFFER_TO_SMALL = 18 | ||
| UNKNOWN_ERROR = 19 | ||
| RS_START_TRACE = 2 | ||
| ILLEGAL_PARAMETER = 20 | ||
| IFI_ERROR = 21 | ||
| RS_INTERNAL_ERROR = 3 | ||
| RS_NO_LOCKCONFS_SYSWIDE = 4 | ||
| RS_NO_SQLSTMT_THREAD = 5 | ||
| RS_NO_LOCKS_HELD_THREAD = 6 | ||
| RS_INVALID_ACE_THREAD = 7 | ||
| RS_NO_LOCKCONFS_THREAD = 8 | ||
| RS_NO_BUFFERS_THREAD = 9 | ||
| . " STU3_GET_SQL_CALL | ||
ABAP code using 7.40 inline data declarations to call FM STU3_GET_SQL_CALL
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 SUBRC FROM SY INTO @DATA(ld_fb_my_user). | ||||
| "SELECT single SUBRC FROM SY INTO @DATA(ld_fb_datatype). | ||||
| "SELECT single DSECPROCD FROM DB2QCLREQ INTO @DATA(ld_fb_dsecprocd). | ||||
| "SELECT single DSECNPROCD FROM DB2QCLREQ INTO @DATA(ld_fb_dsecnprocd). | ||||
| "SELECT single MEMB_NAME FROM DB2DSMEM INTO @DATA(ld_ds_member_spec). | ||||
Search for further information about these or an SAP related objects