SAP SXPG_STEP_COMMAND_START Function Module for
SXPG_STEP_COMMAND_START is a standard sxpg step command start 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 sxpg step command start FM, simply by entering the name SXPG_STEP_COMMAND_START into the relevant SAP transaction such as SE37 or SE38.
Function Group: SSXP
Program Name: SAPLSSXP
Main Program: SAPLSSXP
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function SXPG_STEP_COMMAND_START 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 'SXPG_STEP_COMMAND_START'".
EXPORTING
* TARGET = "
TERMCNTL = "
* TRACELEVEL = 0 "
* BATCH = "
* LONG_PARAMS = "
* JOBNAME = "
* JOBCOUNT = "
* STEPCOUNT = "
* CONNCNTL = 'H' "
* DESTINATION = "
COMMANDNAME = "
ADDITIONAL_PARAMETERS = "
OPERATINGSYSTEM = "
STDINCNTL = "
STDOUTCNTL = "
STDERRCNTL = "
TRACECNTL = "
IMPORTING
STRTSTAT = "
XPGID = "
CONVID = "Conversation id
EXITSTAT = "
EXITCODE = "
PARAMS = "
LAST_PROC = "
LAST_HOST = "
LAST_PROC_NUM = "
TABLES
* LOG = "
EXCEPTIONS
COMMAND_NOT_FOUND = 1 CANNOT_GET_RFC_DESTS = 10 JOB_UPDATE_FAILED = 11 JOB_DOES_NOT_EXIST = 12 PROGRAM_START_ERROR = 13 PARAMETER_EXPECTED = 2 PARAMETERS_TOO_LONG = 3 SECURITY_RISK = 4 WRONG_CHECK_CALL_INTERFACE = 5 NO_PERMISSION = 6 UNKNOWN_ERROR = 7 COMMUNICATION_ERROR = 8 SYSTEM_ERROR = 9
IMPORTING Parameters details for SXPG_STEP_COMMAND_START
TARGET -
Data type: RFCDISPLAY-RFCHOSTOptional: Yes
Call by Reference: No ( called with pass by value option)
TERMCNTL -
Data type: BTCXPGSTIM-TERMCNTLOptional: No
Call by Reference: No ( called with pass by value option)
TRACELEVEL -
Data type: BTCCTL-TRACELEVELOptional: Yes
Call by Reference: No ( called with pass by value option)
BATCH -
Data type: BOOLE-BOOLEOptional: Yes
Call by Reference: No ( called with pass by value option)
LONG_PARAMS -
Data type: CHAR1024Optional: Yes
Call by Reference: No ( called with pass by value option)
JOBNAME -
Data type: TBTCO-JOBNAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
JOBCOUNT -
Data type: TBTCO-JOBCOUNTOptional: Yes
Call by Reference: No ( called with pass by value option)
STEPCOUNT -
Data type: TBTCP-STEPCOUNTOptional: Yes
Call by Reference: No ( called with pass by value option)
CONNCNTL -
Data type: BTCXP1-CONNCNTLDefault: 'H'
Optional: Yes
Call by Reference: No ( called with pass by value option)
DESTINATION -
Data type: RFCDES-RFCDESTOptional: Yes
Call by Reference: No ( called with pass by value option)
COMMANDNAME -
Data type: SXPGCOLIST-NAMEOptional: No
Call by Reference: No ( called with pass by value option)
ADDITIONAL_PARAMETERS -
Data type: SXPGCOLIST-PARAMETERSOptional: No
Call by Reference: No ( called with pass by value option)
OPERATINGSYSTEM -
Data type: SXPGCOLIST-OPSYSTEMOptional: No
Call by Reference: No ( called with pass by value option)
STDINCNTL -
Data type: BTCXPGSTIM-STDINCNTLOptional: No
Call by Reference: No ( called with pass by value option)
STDOUTCNTL -
Data type: BTCXPGSTIM-STDOUTCNTLOptional: No
Call by Reference: No ( called with pass by value option)
STDERRCNTL -
Data type: BTCXPGSTIM-STDERRCNTLOptional: No
Call by Reference: No ( called with pass by value option)
TRACECNTL -
Data type: BTCXPGSTIM-TRACECNTLOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for SXPG_STEP_COMMAND_START
STRTSTAT -
Data type: BTCXPGSTATOptional: No
Call by Reference: No ( called with pass by value option)
XPGID -
Data type: BTCXPGIDOptional: No
Call by Reference: No ( called with pass by value option)
CONVID - Conversation id
Data type: GWY_STRUCT-CONVIDOptional: No
Call by Reference: No ( called with pass by value option)
EXITSTAT -
Data type: BTCXPGSTATOptional: No
Call by Reference: No ( called with pass by value option)
EXITCODE -
Data type: BTCXPGEXITOptional: No
Call by Reference: No ( called with pass by value option)
PARAMS -
Data type: BTCXPGSTIM-PARAMSOptional: No
Call by Reference: No ( called with pass by value option)
LAST_PROC -
Data type: WPINFO-WP_PIDOptional: No
Call by Reference: No ( called with pass by value option)
LAST_HOST -
Data type: RFCHOSTOptional: No
Call by Reference: No ( called with pass by value option)
LAST_PROC_NUM -
Data type: WPINFO-WP_NOOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for SXPG_STEP_COMMAND_START
LOG -
Data type: BTCXPGLOGOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
COMMAND_NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
CANNOT_GET_RFC_DESTS -
Data type:Optional: No
Call by Reference: Yes
JOB_UPDATE_FAILED -
Data type:Optional: No
Call by Reference: Yes
JOB_DOES_NOT_EXIST -
Data type:Optional: No
Call by Reference: Yes
PROGRAM_START_ERROR -
Data type:Optional: No
Call by Reference: Yes
PARAMETER_EXPECTED -
Data type:Optional: No
Call by Reference: Yes
PARAMETERS_TOO_LONG -
Data type:Optional: No
Call by Reference: Yes
SECURITY_RISK -
Data type:Optional: No
Call by Reference: Yes
WRONG_CHECK_CALL_INTERFACE -
Data type:Optional: No
Call by Reference: Yes
NO_PERMISSION -
Data type:Optional: No
Call by Reference: Yes
UNKNOWN_ERROR -
Data type:Optional: No
Call by Reference: Yes
COMMUNICATION_ERROR -
Data type:Optional: No
Call by Reference: Yes
SYSTEM_ERROR -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for SXPG_STEP_COMMAND_START 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: | ||||
| lt_log | TYPE STANDARD TABLE OF BTCXPGLOG, " | |||
| lv_target | TYPE RFCDISPLAY-RFCHOST, " | |||
| lv_strtstat | TYPE BTCXPGSTAT, " | |||
| lv_command_not_found | TYPE BTCXPGSTAT, " | |||
| lv_termcntl | TYPE BTCXPGSTIM-TERMCNTL, " | |||
| lv_cannot_get_rfc_dests | TYPE BTCXPGSTIM, " | |||
| lv_tracelevel | TYPE BTCCTL-TRACELEVEL, " 0 | |||
| lv_job_update_failed | TYPE BTCCTL, " | |||
| lv_batch | TYPE BOOLE-BOOLE, " | |||
| lv_job_does_not_exist | TYPE BOOLE, " | |||
| lv_long_params | TYPE CHAR1024, " | |||
| lv_program_start_error | TYPE CHAR1024, " | |||
| lv_jobname | TYPE TBTCO-JOBNAME, " | |||
| lv_jobcount | TYPE TBTCO-JOBCOUNT, " | |||
| lv_stepcount | TYPE TBTCP-STEPCOUNT, " | |||
| lv_conncntl | TYPE BTCXP1-CONNCNTL, " 'H' | |||
| lv_xpgid | TYPE BTCXPGID, " | |||
| lv_destination | TYPE RFCDES-RFCDEST, " | |||
| lv_parameter_expected | TYPE RFCDES, " | |||
| lv_convid | TYPE GWY_STRUCT-CONVID, " | |||
| lv_commandname | TYPE SXPGCOLIST-NAME, " | |||
| lv_parameters_too_long | TYPE SXPGCOLIST, " | |||
| lv_exitstat | TYPE BTCXPGSTAT, " | |||
| lv_security_risk | TYPE BTCXPGSTAT, " | |||
| lv_additional_parameters | TYPE SXPGCOLIST-PARAMETERS, " | |||
| lv_exitcode | TYPE BTCXPGEXIT, " | |||
| lv_operatingsystem | TYPE SXPGCOLIST-OPSYSTEM, " | |||
| lv_wrong_check_call_interface | TYPE SXPGCOLIST, " | |||
| lv_params | TYPE BTCXPGSTIM-PARAMS, " | |||
| lv_stdincntl | TYPE BTCXPGSTIM-STDINCNTL, " | |||
| lv_no_permission | TYPE BTCXPGSTIM, " | |||
| lv_last_proc | TYPE WPINFO-WP_PID, " | |||
| lv_stdoutcntl | TYPE BTCXPGSTIM-STDOUTCNTL, " | |||
| lv_unknown_error | TYPE BTCXPGSTIM, " | |||
| lv_last_host | TYPE RFCHOST, " | |||
| lv_stderrcntl | TYPE BTCXPGSTIM-STDERRCNTL, " | |||
| lv_communication_error | TYPE BTCXPGSTIM, " | |||
| lv_tracecntl | TYPE BTCXPGSTIM-TRACECNTL, " | |||
| lv_system_error | TYPE BTCXPGSTIM, " | |||
| lv_last_proc_num | TYPE WPINFO-WP_NO. " |
|   CALL FUNCTION 'SXPG_STEP_COMMAND_START' " |
| EXPORTING | ||
| TARGET | = lv_target | |
| TERMCNTL | = lv_termcntl | |
| TRACELEVEL | = lv_tracelevel | |
| BATCH | = lv_batch | |
| LONG_PARAMS | = lv_long_params | |
| JOBNAME | = lv_jobname | |
| JOBCOUNT | = lv_jobcount | |
| STEPCOUNT | = lv_stepcount | |
| CONNCNTL | = lv_conncntl | |
| DESTINATION | = lv_destination | |
| COMMANDNAME | = lv_commandname | |
| ADDITIONAL_PARAMETERS | = lv_additional_parameters | |
| OPERATINGSYSTEM | = lv_operatingsystem | |
| STDINCNTL | = lv_stdincntl | |
| STDOUTCNTL | = lv_stdoutcntl | |
| STDERRCNTL | = lv_stderrcntl | |
| TRACECNTL | = lv_tracecntl | |
| IMPORTING | ||
| STRTSTAT | = lv_strtstat | |
| XPGID | = lv_xpgid | |
| CONVID | = lv_convid | |
| EXITSTAT | = lv_exitstat | |
| EXITCODE | = lv_exitcode | |
| PARAMS | = lv_params | |
| LAST_PROC | = lv_last_proc | |
| LAST_HOST | = lv_last_host | |
| LAST_PROC_NUM | = lv_last_proc_num | |
| TABLES | ||
| LOG | = lt_log | |
| EXCEPTIONS | ||
| COMMAND_NOT_FOUND = 1 | ||
| CANNOT_GET_RFC_DESTS = 10 | ||
| JOB_UPDATE_FAILED = 11 | ||
| JOB_DOES_NOT_EXIST = 12 | ||
| PROGRAM_START_ERROR = 13 | ||
| PARAMETER_EXPECTED = 2 | ||
| PARAMETERS_TOO_LONG = 3 | ||
| SECURITY_RISK = 4 | ||
| WRONG_CHECK_CALL_INTERFACE = 5 | ||
| NO_PERMISSION = 6 | ||
| UNKNOWN_ERROR = 7 | ||
| COMMUNICATION_ERROR = 8 | ||
| SYSTEM_ERROR = 9 | ||
| . " SXPG_STEP_COMMAND_START | ||
ABAP code using 7.40 inline data declarations to call FM SXPG_STEP_COMMAND_START
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 RFCHOST FROM RFCDISPLAY INTO @DATA(ld_target). | ||||
| "SELECT single TERMCNTL FROM BTCXPGSTIM INTO @DATA(ld_termcntl). | ||||
| "SELECT single TRACELEVEL FROM BTCCTL INTO @DATA(ld_tracelevel). | ||||
| "SELECT single BOOLE FROM BOOLE INTO @DATA(ld_batch). | ||||
| "SELECT single JOBNAME FROM TBTCO INTO @DATA(ld_jobname). | ||||
| "SELECT single JOBCOUNT FROM TBTCO INTO @DATA(ld_jobcount). | ||||
| "SELECT single STEPCOUNT FROM TBTCP INTO @DATA(ld_stepcount). | ||||
| "SELECT single CONNCNTL FROM BTCXP1 INTO @DATA(ld_conncntl). | ||||
| DATA(ld_conncntl) | = 'H'. | |||
| "SELECT single RFCDEST FROM RFCDES INTO @DATA(ld_destination). | ||||
| "SELECT single CONVID FROM GWY_STRUCT INTO @DATA(ld_convid). | ||||
| "SELECT single NAME FROM SXPGCOLIST INTO @DATA(ld_commandname). | ||||
| "SELECT single PARAMETERS FROM SXPGCOLIST INTO @DATA(ld_additional_parameters). | ||||
| "SELECT single OPSYSTEM FROM SXPGCOLIST INTO @DATA(ld_operatingsystem). | ||||
| "SELECT single PARAMS FROM BTCXPGSTIM INTO @DATA(ld_params). | ||||
| "SELECT single STDINCNTL FROM BTCXPGSTIM INTO @DATA(ld_stdincntl). | ||||
| "SELECT single WP_PID FROM WPINFO INTO @DATA(ld_last_proc). | ||||
| "SELECT single STDOUTCNTL FROM BTCXPGSTIM INTO @DATA(ld_stdoutcntl). | ||||
| "SELECT single STDERRCNTL FROM BTCXPGSTIM INTO @DATA(ld_stderrcntl). | ||||
| "SELECT single TRACECNTL FROM BTCXPGSTIM INTO @DATA(ld_tracecntl). | ||||
| "SELECT single WP_NO FROM WPINFO INTO @DATA(ld_last_proc_num). | ||||
Search for further information about these or an SAP related objects