RSDU_EXEC_SQL_HDB 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 RSDU_EXEC_SQL_HDB into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
RSDU_CORE_SQL_HDB
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'RSDU_EXEC_SQL_HDB' "Execute Native-SQL Statement (no CURSORs, host-variables etc.)
* EXPORTING
* i_t_stmt = " rsdu_t_abapsource SQL Statement in an Internal Table
* i_stmt = " c SQL Statement in a String
* i_lower_trans = RS_C_FALSE " rs_bool SQL Keywords in Lowercase Yes/No
* i_error_download = RS_C_TRUE " rs_bool Download of a Erroneous SQL Statement Yes/No
* i_connection = 'DEFAULT' " dbcon_name
IMPORTING
e_sqlerr = " i DB-Specific SQL-Error Code (OK = 0)
e_sqlerrtxt = " rsdu_string72 SQL Error Text
e_stmtsize = " i Size of the SQL Statement in Bytes
e_num_rows = " i
CHANGING
c_processed = RS_C_FALSE " rs_bool Boolean
EXCEPTIONS
SQL_ERROR = 1 " SQL Error (Error Code in E_SQLERR)
STATEMENT_TOO_COMPLEX = 2 " SQL Statement Too Complex (Long)
NO_STATEMENT = 3 " No Internal Table or String
INHERITED_ERROR = 4 " Internal Error
DUPREC = 5 "
OBJ_EXISTS = 6 "
OBJ_NOT_FOUND = 7 "
. " RSDU_EXEC_SQL_HDB
The ABAP code below is a full code listing to execute function module RSDU_EXEC_SQL_HDB 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_e_sqlerr | TYPE I , |
| ld_e_sqlerrtxt | TYPE RSDU_STRING72 , |
| ld_e_stmtsize | TYPE I , |
| ld_e_num_rows | TYPE I . |
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_c_processed | TYPE RS_BOOL , |
| ld_e_sqlerr | TYPE I , |
| ld_i_t_stmt | TYPE RSDU_T_ABAPSOURCE , |
| ld_e_sqlerrtxt | TYPE RSDU_STRING72 , |
| ld_i_stmt | TYPE C , |
| ld_e_stmtsize | TYPE I , |
| ld_i_lower_trans | TYPE RS_BOOL , |
| ld_e_num_rows | TYPE I , |
| ld_i_error_download | TYPE RS_BOOL , |
| ld_i_connection | TYPE DBCON_NAME . |
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 RSDU_EXEC_SQL_HDB or its description.
RSDU_EXEC_SQL_HDB - Execute Native-SQL Statement (no CURSORs, host-variables etc.) RSDU_EXEC_SQL_DB6 - Execute Native SQL Statement (No CURSORs, Host Variables etc.) RSDU_EXEC_SQL_DB4 - Execute Native SQL Statement (No CURSORs, Host Variables etc.) RSDU_EXEC_SQL_DB2 - Execute Native SQL Statement (No CURSORs, Host Variables etc.) RSDU_EXEC_SQL_ADA - Execute Native SQL Statement (No CURSORs, Host Variables etc.) RSDU_EXEC_SQL - Execute Native SQL Statement (No CURSORs, Host Variables etc.)