Menu

SAP Function Module MSS_GET_SQLSTATEMENT

MS SQL Server: Get SQL code and parameters

Recommended Now

Fire TV Stick Lite Essentials Bundle

This bundle contains Amazon Fire TV Stick Lite and Mission USB Power Cable. The USB power cable eliminates the need to find an AC outlet near your TV by powering Amazon Fire TV directly from your TV's USB port. Includes special power management circuitry that enhances the peak power capability of the USB port by storing excess energy and then releasing it as needed.

Check it out on amazon.com →

The Function Module MSS_GET_SQLSTATEMENT (MS SQL Server: Get SQL code and parameters) is a standard Function Module in SAP ERP and is part of the function group STUS within the package STUS.

Technical Information

Function Module MSS_GET_SQLSTATEMENT
Short Text MS SQL Server: Get SQL code and parameters
Function Group STUS
Package STUS
Module Type Remote-Enabled

Importing Parameters

These are the IMPORTING parameters of this function module.

Parameter Name Type Associated Type Default Value Short Text
CON_NAME LIKE DBCON-CON_NAME 'DEFAULT' DBCON name
INSTNAME LIKE MSXXLIST-NAME ' '
OBJ_DB TYPE MSSDB Database name
OBJ_SCHEMA TYPE MSSSCHEMA Schema name
SCHEMA TYPE MSSSCHEMA SPACE Target Schema
SPID LIKE MSQPROCESS-SPID 0
SPNAME LIKE MSSSTATS1X-SPNAME ' ' Stored procedure name
SQLCODE TYPE CHAR1 ' ' Single-character flag

Exporting Parameters

These are the EXPORTING parameters of this function module.

Parameter Name Type Associated Type Default Value Short Text
FINAL_COMMAND LIKE MSQEXPLAIN-LONGSQLTXT
MSQSTMTINFO LIKE MSQSTMTINF
TABNAME TYPE MSSTABLE Table name

Changing Parameters

This function module does not define any CHANGING parameters.

Table Parameters

These are the TABLE parameters of this function module.

Parameter Name Type Associated Type Default Value Short Text
SP_CODE LIKE MSQSQLCODE
SP_PARAMS LIKE MSQSPPARAM
STMT_LINES LIKE MSQSQLCODE MS SQL server structure to get the sp text

Exceptions

These are the Exceptions of this function module.

Exception Name Short Text
CONNECT_ERROR Error Connecting to the Database
DB_ERROR DB error
DB_NOT_FOUND DB not found
INTERNAL_ERROR Internal error
INVALID_INPUT Invalid input
INVALID_OBJECT Invalid object
NOT_RUNNING_ON_MSSQL Not running on MSSQL
NO_DB_ACCESS No DB access
NO_SP_ON_SPID No SP on SPID
SCHEMA_NOT_FOUND Schema not found
SQLTEXT_NOT_FOUND SQLtext not found
UNKNOWN_ERROR Unknown error