SAP SWD_HEADER_GET Function Module for Workflow definition: get header data









SWD_HEADER_GET is a standard swd header get 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 definition: get header data 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 swd header get FM, simply by entering the name SWD_HEADER_GET into the relevant SAP transaction such as SE37 or SE38.

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



Function SWD_HEADER_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 'SWD_HEADER_GET'"Workflow definition: get header data
IMPORTING
HEAD = "
GLOBAL = "
STARTING_EVENTS = "
LOCAL_EVENTS = "Workflow Definition: Events in Workflow Builder
EVENTS = "Workflow Definition: Events in Workflow Builder
WI_TEXT = "
RELEASE_STATE = "Release status of task
SAPPHONE = "SAPphone: Flag 'Suitable for SAPphone' (4 values'´)
PROPERTIES = "Properties

TABLES
* BINDING = "Workflow Definition: Binding for Steps (Temporary)
* FUNCTIONS = "Functions
* TEXT_DESCRIPTION = "
* TEXT_NOTIFICATION = "SAPscript: Text Lines
* TEXT_DEADLINE_LATEST_END = "SAPscript: Text Lines
* TEXT_DEADLINE_LATEST_START = "SAPscript: Text Lines
* TEXT_DEADLINE_DESIRED_END = "SAPscript: Text Lines
* TASKS = "Tasks Referenced Directly in Workflow Buffer

EXCEPTIONS
BUFFER_NOT_OCCUPIED = 1
.



EXPORTING Parameters details for SWD_HEADER_GET

HEAD -

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

GLOBAL -

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

STARTING_EVENTS -

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

LOCAL_EVENTS - Workflow Definition: Events in Workflow Builder

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

EVENTS - Workflow Definition: Events in Workflow Builder

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

WI_TEXT -

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

RELEASE_STATE - Release status of task

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

SAPPHONE - SAPphone: Flag 'Suitable for SAPphone' (4 values'´)

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

PROPERTIES - Properties

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

TABLES Parameters details for SWD_HEADER_GET

BINDING - Workflow Definition: Binding for Steps (Temporary)

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

FUNCTIONS - Functions

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

TEXT_DESCRIPTION -

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

TEXT_NOTIFICATION - SAPscript: Text Lines

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

TEXT_DEADLINE_LATEST_END - SAPscript: Text Lines

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

TEXT_DEADLINE_LATEST_START - SAPscript: Text Lines

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

TEXT_DEADLINE_DESIRED_END - SAPscript: Text Lines

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

TASKS - Tasks Referenced Directly in Workflow Buffer

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

EXCEPTIONS details

BUFFER_NOT_OCCUPIED -

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

Copy and paste ABAP code example for SWD_HEADER_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_head  TYPE SWD_AHEAD, "   
lt_binding  TYPE STANDARD TABLE OF SWD_STBIND, "   
lv_buffer_not_occupied  TYPE SWD_STBIND, "   
lv_global  TYPE SWDIGLOBAL, "   
lt_functions  TYPE STANDARD TABLE OF SWD_IFUNCS, "   
lv_starting_events  TYPE SWDTSTEVTS, "   
lt_text_description  TYPE STANDARD TABLE OF TLINE, "   
lv_local_events  TYPE SWDTILOCEVT, "   
lt_text_notification  TYPE STANDARD TABLE OF TLINE, "   
lv_events  TYPE SWDTIEVNTS, "   
lt_text_deadline_latest_end  TYPE STANDARD TABLE OF TLINE, "   
lv_wi_text  TYPE SWW_WITEXT, "   
lt_text_deadline_latest_start  TYPE STANDARD TABLE OF TLINE, "   
lv_release_state  TYPE TSKRELSTAT, "   
lt_text_deadline_desired_end  TYPE STANDARD TABLE OF TLINE, "   
lt_tasks  TYPE STANDARD TABLE OF SWD_ITASKS, "   
lv_sapphone  TYPE SP_SPHABLE, "   
lv_properties  TYPE SWDTIPROPTS. "   

  CALL FUNCTION 'SWD_HEADER_GET'  "Workflow definition: get header data
    IMPORTING
         HEAD = lv_head
         GLOBAL = lv_global
         STARTING_EVENTS = lv_starting_events
         LOCAL_EVENTS = lv_local_events
         EVENTS = lv_events
         WI_TEXT = lv_wi_text
         RELEASE_STATE = lv_release_state
         SAPPHONE = lv_sapphone
         PROPERTIES = lv_properties
    TABLES
         BINDING = lt_binding
         FUNCTIONS = lt_functions
         TEXT_DESCRIPTION = lt_text_description
         TEXT_NOTIFICATION = lt_text_notification
         TEXT_DEADLINE_LATEST_END = lt_text_deadline_latest_end
         TEXT_DEADLINE_LATEST_START = lt_text_deadline_latest_start
         TEXT_DEADLINE_DESIRED_END = lt_text_deadline_desired_end
         TASKS = lt_tasks
    EXCEPTIONS
        BUFFER_NOT_OCCUPIED = 1
. " SWD_HEADER_GET




ABAP code using 7.40 inline data declarations to call FM SWD_HEADER_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.

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


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!