SAP SWF_WSS_TASK_GENERATE Function Module for









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

Function Group: SWF_WS_UTILITY
Program Name: SAPLSWF_WS_UTILITY
Main Program: SAPLSWF_WS_UTILITY
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function SWF_WSS_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_WSS_TASK_GENERATE'"
EXPORTING
I_INTF = "Web Service Interface (with Meta Data)
I_SHORT = "Object Abbreviation
* I_STEXT = "Object Description
* I_LANGU = SY-LANGU "SAP R/3 System, Current Language
* I_UNAME = SY-UNAME "SAP System, User Logon Name

IMPORTING
E_OTYPE = "Object Type
E_OBJID = "Object ID

TABLES
IT_WITEXTS = "Structure for Work Item Texts

EXCEPTIONS
NAMES_SET_ERROR = 1 WI_TEXT_SET_ERROR = 2 INVALID_XMLTYPE = 3 SERIALIZATION_ERROR = 4 CONTAINER_ERROR = 5 INTERFACE_ERROR = 6
.



IMPORTING Parameters details for SWF_WSS_TASK_GENERATE

I_INTF - Web Service Interface (with Meta Data)

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

I_SHORT - Object Abbreviation

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

I_STEXT - Object Description

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

I_LANGU - SAP R/3 System, Current Language

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

I_UNAME - SAP System, User Logon Name

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

EXPORTING Parameters details for SWF_WSS_TASK_GENERATE

E_OTYPE - Object Type

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

E_OBJID - Object ID

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

TABLES Parameters details for SWF_WSS_TASK_GENERATE

IT_WITEXTS - Structure for Work Item Texts

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

EXCEPTIONS details

NAMES_SET_ERROR -

Data type:
Optional: No
Call by Reference: Yes

WI_TEXT_SET_ERROR -

Data type:
Optional: No
Call by Reference: Yes

INVALID_XMLTYPE -

Data type:
Optional: No
Call by Reference: Yes

SERIALIZATION_ERROR - Error in the Task Serialization

Data type:
Optional: No
Call by Reference: Yes

CONTAINER_ERROR - Error when generating the task container

Data type:
Optional: No
Call by Reference: Yes

INTERFACE_ERROR -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for SWF_WSS_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_i_intf  TYPE SWFWSINTFRFC, "   
lv_e_otype  TYPE OTYPE, "   
lt_it_witexts  TYPE STANDARD TABLE OF SWLWPTWIT, "   
lv_names_set_error  TYPE SWLWPTWIT, "   
lv_e_objid  TYPE HROBJID, "   
lv_i_short  TYPE SHORT_D, "   
lv_wi_text_set_error  TYPE SHORT_D, "   
lv_i_stext  TYPE STEXT, "   
lv_invalid_xmltype  TYPE STEXT, "   
lv_i_langu  TYPE SYLANGU, "   SY-LANGU
lv_serialization_error  TYPE SYLANGU, "   
lv_i_uname  TYPE SYUNAME, "   SY-UNAME
lv_container_error  TYPE SYUNAME, "   
lv_interface_error  TYPE SYUNAME. "   

  CALL FUNCTION 'SWF_WSS_TASK_GENERATE'  "
    EXPORTING
         I_INTF = lv_i_intf
         I_SHORT = lv_i_short
         I_STEXT = lv_i_stext
         I_LANGU = lv_i_langu
         I_UNAME = lv_i_uname
    IMPORTING
         E_OTYPE = lv_e_otype
         E_OBJID = lv_e_objid
    TABLES
         IT_WITEXTS = lt_it_witexts
    EXCEPTIONS
        NAMES_SET_ERROR = 1
        WI_TEXT_SET_ERROR = 2
        INVALID_XMLTYPE = 3
        SERIALIZATION_ERROR = 4
        CONTAINER_ERROR = 5
        INTERFACE_ERROR = 6
. " SWF_WSS_TASK_GENERATE




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

 
 
 
 
 
 
 
 
 
DATA(ld_i_langu) = SY-LANGU.
 
 
DATA(ld_i_uname) = SY-UNAME.
 
 
 


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!