SAP SRM_SP_WFL_START_WORKFLOW Function Module for Workflow interfaces: Start workflow









SRM_SP_WFL_START_WORKFLOW is a standard srm sp wfl start workflow SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Workflow interfaces: Start workflow processing and below is the pattern details for this FM, 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 srm sp wfl start workflow FM, simply by entering the name SRM_SP_WFL_START_WORKFLOW into the relevant SAP transaction such as SE37 or SE38.

Function Group: SRM_SP_WF2
Program Name: SAPLSRM_SP_WF2
Main Program:
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function SRM_SP_WFL_START_WORKFLOW 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 'SRM_SP_WFL_START_WORKFLOW'"Workflow interfaces: Start workflow
EXPORTING
TASK = "Task ID
RFC_DESTINATION = "Logical Destination (Specified in Function Call)
SAP_RELEASE = "
INPUT_CONTAINER = "Table of Name/Value Pairs ('Simple Container')

IMPORTING
RETURN_CODE = "Return Parameters
WORKITEM_ID = "Work Item ID
CANCELLED = "

TABLES
* RETURN = "Return Parameters

EXCEPTIONS
INTERNAL_ERROR = 1 REMOTE_NOT_SUPPORTED = 2
.



IMPORTING Parameters details for SRM_SP_WFL_START_WORKFLOW

TASK - Task ID

Data type: SWW_TASK
Optional: No
Call by Reference: Yes

RFC_DESTINATION - Logical Destination (Specified in Function Call)

Data type: RFCDEST
Optional: No
Call by Reference: Yes

SAP_RELEASE -

Data type: RFCSI-RFCSAPRL
Optional: No
Call by Reference: Yes

INPUT_CONTAINER - Table of Name/Value Pairs ('Simple Container')

Data type: SWFNAMVTAB
Optional: No
Call by Reference: Yes

EXPORTING Parameters details for SRM_SP_WFL_START_WORKFLOW

RETURN_CODE - Return Parameters

Data type: SYSUBRC
Optional: No
Call by Reference: Yes

WORKITEM_ID - Work Item ID

Data type: SWW_WIID
Optional: No
Call by Reference: Yes

CANCELLED -

Data type: XFLAG
Optional: No
Call by Reference: Yes

TABLES Parameters details for SRM_SP_WFL_START_WORKFLOW

RETURN - Return Parameters

Data type: BAPIRET2
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

INTERNAL_ERROR - Internal Error

Data type:
Optional: No
Call by Reference: Yes

REMOTE_NOT_SUPPORTED -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for SRM_SP_WFL_START_WORKFLOW 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_task  TYPE SWW_TASK, "   
lt_return  TYPE STANDARD TABLE OF BAPIRET2, "   
lv_return_code  TYPE SYSUBRC, "   
lv_internal_error  TYPE SYSUBRC, "   
lv_workitem_id  TYPE SWW_WIID, "   
lv_rfc_destination  TYPE RFCDEST, "   
lv_remote_not_supported  TYPE RFCDEST, "   
lv_cancelled  TYPE XFLAG, "   
lv_sap_release  TYPE RFCSI-RFCSAPRL, "   
lv_input_container  TYPE SWFNAMVTAB. "   

  CALL FUNCTION 'SRM_SP_WFL_START_WORKFLOW'  "Workflow interfaces: Start workflow
    EXPORTING
         TASK = lv_task
         RFC_DESTINATION = lv_rfc_destination
         SAP_RELEASE = lv_sap_release
         INPUT_CONTAINER = lv_input_container
    IMPORTING
         RETURN_CODE = lv_return_code
         WORKITEM_ID = lv_workitem_id
         CANCELLED = lv_cancelled
    TABLES
         RETURN = lt_return
    EXCEPTIONS
        INTERNAL_ERROR = 1
        REMOTE_NOT_SUPPORTED = 2
. " SRM_SP_WFL_START_WORKFLOW




ABAP code using 7.40 inline data declarations to call FM SRM_SP_WFL_START_WORKFLOW

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 RFCSAPRL FROM RFCSI INTO @DATA(ld_sap_release).
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!