SAP SWF_TS_TASK_GENERATE Function Module for









SWF_TS_TASK_GENERATE is a standard swf ts task generate 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 swf ts task generate FM, simply by entering the name SWF_TS_TASK_GENERATE into the relevant SAP transaction such as SE37 or SE38.

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



Function SWF_TS_TASK_GENERATE 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 'SWF_TS_TASK_GENERATE'"
EXPORTING
ACT_METHOD = "
ACT_OBJTYPE = "Object Category and Object Type
ACT_SHORT = "
* ACT_STEXT = "
* ACT_GENERAL = "
* ACT_BACKGROUND = "
* ACT_CONFIRM = "
* ACT_WI_TEXT = "
* ACT_CONTAINER_HANDLE = "Container - Implementation of a 'Collection'

IMPORTING
ACT_TASK = "

TABLES
* ACT_AGENTS = "
* ACT_INITIAL_BINDING = "
* ACT_TASK_TO_METHOD_BINDING = "
* ACT_METHOD_TO_TASK_BINDING = "
* ACT_DESCRIPTION = "
* ACT_NOTIFICATION = "
* ACT_LATEST_END = "
* ACT_DESIRED_END = "
* ACT_LATEST_START = "

EXCEPTIONS
TASK_NOT_GENERATED = 1 METHOD_NOT_FOUND = 2
.



IMPORTING Parameters details for SWF_TS_TASK_GENERATE

ACT_METHOD -

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

ACT_OBJTYPE - Object Category and Object Type

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

ACT_SHORT -

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

ACT_STEXT -

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

ACT_GENERAL -

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

ACT_BACKGROUND -

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

ACT_CONFIRM -

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

ACT_WI_TEXT -

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

ACT_CONTAINER_HANDLE - Container - Implementation of a 'Collection'

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

EXPORTING Parameters details for SWF_TS_TASK_GENERATE

ACT_TASK -

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

TABLES Parameters details for SWF_TS_TASK_GENERATE

ACT_AGENTS -

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

ACT_INITIAL_BINDING -

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

ACT_TASK_TO_METHOD_BINDING -

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

ACT_METHOD_TO_TASK_BINDING -

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

ACT_DESCRIPTION -

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

ACT_NOTIFICATION -

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

ACT_LATEST_END -

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

ACT_DESIRED_END -

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

ACT_LATEST_START -

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

EXCEPTIONS details

TASK_NOT_GENERATED -

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

METHOD_NOT_FOUND -

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

Copy and paste ABAP code example for SWF_TS_TASK_GENERATE 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_act_task  TYPE SWHACTOR, "   
lt_act_agents  TYPE STANDARD TABLE OF SWHACTOR, "   
lv_act_method  TYPE SWOTRM-METHOD, "   
lv_task_not_generated  TYPE SWOTRM, "   
lv_act_objtype  TYPE SWD_OTYPE, "   
lv_method_not_found  TYPE SWD_OTYPE, "   
lt_act_initial_binding  TYPE STANDARD TABLE OF SWF_INBIND, "   
lv_act_short  TYPE HRS1000-SHORT, "   
lt_act_task_to_method_binding  TYPE STANDARD TABLE OF SWF_INBIND, "   
lv_act_stext  TYPE HRS1000-STEXT, "   
lt_act_method_to_task_binding  TYPE STANDARD TABLE OF SWF_INBIND, "   
lv_act_general  TYPE SY-INPUT, "   
lt_act_description  TYPE STANDARD TABLE OF TLINE, "   
lv_act_background  TYPE SY-INPUT, "   
lt_act_notification  TYPE STANDARD TABLE OF TLINE, "   
lv_act_confirm  TYPE SY-INPUT, "   
lt_act_latest_end  TYPE STANDARD TABLE OF TLINE, "   
lv_act_wi_text  TYPE HRS1206-WITEXT, "   
lt_act_desired_end  TYPE STANDARD TABLE OF TLINE, "   
lt_act_latest_start  TYPE STANDARD TABLE OF TLINE, "   
lv_act_container_handle  TYPE IF_SWF_CNT_CONTAINER. "   

  CALL FUNCTION 'SWF_TS_TASK_GENERATE'  "
    EXPORTING
         ACT_METHOD = lv_act_method
         ACT_OBJTYPE = lv_act_objtype
         ACT_SHORT = lv_act_short
         ACT_STEXT = lv_act_stext
         ACT_GENERAL = lv_act_general
         ACT_BACKGROUND = lv_act_background
         ACT_CONFIRM = lv_act_confirm
         ACT_WI_TEXT = lv_act_wi_text
         ACT_CONTAINER_HANDLE = lv_act_container_handle
    IMPORTING
         ACT_TASK = lv_act_task
    TABLES
         ACT_AGENTS = lt_act_agents
         ACT_INITIAL_BINDING = lt_act_initial_binding
         ACT_TASK_TO_METHOD_BINDING = lt_act_task_to_method_binding
         ACT_METHOD_TO_TASK_BINDING = lt_act_method_to_task_binding
         ACT_DESCRIPTION = lt_act_description
         ACT_NOTIFICATION = lt_act_notification
         ACT_LATEST_END = lt_act_latest_end
         ACT_DESIRED_END = lt_act_desired_end
         ACT_LATEST_START = lt_act_latest_start
    EXCEPTIONS
        TASK_NOT_GENERATED = 1
        METHOD_NOT_FOUND = 2
. " SWF_TS_TASK_GENERATE




ABAP code using 7.40 inline data declarations to call FM SWF_TS_TASK_GENERATE

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 METHOD FROM SWOTRM INTO @DATA(ld_act_method).
 
 
 
 
 
"SELECT single SHORT FROM HRS1000 INTO @DATA(ld_act_short).
 
 
"SELECT single STEXT FROM HRS1000 INTO @DATA(ld_act_stext).
 
 
"SELECT single INPUT FROM SY INTO @DATA(ld_act_general).
 
 
"SELECT single INPUT FROM SY INTO @DATA(ld_act_background).
 
 
"SELECT single INPUT FROM SY INTO @DATA(ld_act_confirm).
 
 
"SELECT single WITEXT FROM HRS1206 INTO @DATA(ld_act_wi_text).
 
 
 
 


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!