SAP SWP_TOP_LEVEL_WORKFLOW_GET Function Module for









SWP_TOP_LEVEL_WORKFLOW_GET is a standard swp top level workflow get 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 swp top level workflow get FM, simply by entering the name SWP_TOP_LEVEL_WORKFLOW_GET into the relevant SAP transaction such as SE37 or SE38.

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



Function SWP_TOP_LEVEL_WORKFLOW_GET 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 'SWP_TOP_LEVEL_WORKFLOW_GET'"
EXPORTING
WORKITEM_ID = "

IMPORTING
TOP_LEVEL_FLOWITEM = "
WORKITEM_IS_TOP_LEVEL = "

CHANGING
* WORKITEM = "

TABLES
* FIS_ON_THE_PATH = "

EXCEPTIONS
WI_DOES_NOT_EXIST = 1 WI_NOT_PART_OF_A_WORKFLOW = 2 PARENT_WI_DOES_NOT_EXIST = 3
.



IMPORTING Parameters details for SWP_TOP_LEVEL_WORKFLOW_GET

WORKITEM_ID -

Data type: SWWWIHEAD-WI_ID
Optional: No
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for SWP_TOP_LEVEL_WORKFLOW_GET

TOP_LEVEL_FLOWITEM -

Data type: SWWWIHEAD
Optional: No
Call by Reference: No ( called with pass by value option)

WORKITEM_IS_TOP_LEVEL -

Data type: C
Optional: No
Call by Reference: No ( called with pass by value option)

CHANGING Parameters details for SWP_TOP_LEVEL_WORKFLOW_GET

WORKITEM -

Data type: SWWWIHEAD
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for SWP_TOP_LEVEL_WORKFLOW_GET

FIS_ON_THE_PATH -

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

EXCEPTIONS details

WI_DOES_NOT_EXIST -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

WI_NOT_PART_OF_A_WORKFLOW -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

PARENT_WI_DOES_NOT_EXIST -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for SWP_TOP_LEVEL_WORKFLOW_GET 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_workitem  TYPE SWWWIHEAD, "   
lv_workitem_id  TYPE SWWWIHEAD-WI_ID, "   
lt_fis_on_the_path  TYPE STANDARD TABLE OF SWWWIHEAD, "   
lv_wi_does_not_exist  TYPE SWWWIHEAD, "   
lv_top_level_flowitem  TYPE SWWWIHEAD, "   
lv_workitem_is_top_level  TYPE C, "   
lv_wi_not_part_of_a_workflow  TYPE C, "   
lv_parent_wi_does_not_exist  TYPE C. "   

  CALL FUNCTION 'SWP_TOP_LEVEL_WORKFLOW_GET'  "
    EXPORTING
         WORKITEM_ID = lv_workitem_id
    IMPORTING
         TOP_LEVEL_FLOWITEM = lv_top_level_flowitem
         WORKITEM_IS_TOP_LEVEL = lv_workitem_is_top_level
    CHANGING
         WORKITEM = lv_workitem
    TABLES
         FIS_ON_THE_PATH = lt_fis_on_the_path
    EXCEPTIONS
        WI_DOES_NOT_EXIST = 1
        WI_NOT_PART_OF_A_WORKFLOW = 2
        PARENT_WI_DOES_NOT_EXIST = 3
. " SWP_TOP_LEVEL_WORKFLOW_GET




ABAP code using 7.40 inline data declarations to call FM SWP_TOP_LEVEL_WORKFLOW_GET

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 WI_ID FROM SWWWIHEAD INTO @DATA(ld_workitem_id).
 
 
 
 
 
 
 


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!