SWF_WSC_TASK_GENERATE is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name SWF_WSC_TASK_GENERATE into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
SWF_WSC_TASK_GENERATOR
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'SWF_WSC_TASK_GENERATE' "
EXPORTING
i_task_description = " swlwptdsc Describes Task to Be Generated by RFC (on Server Side)
i_devclass = " devclass Package
i_korrnum = " trkorr Request/Task
* i_uname = SY-UNAME " syuname SAP System, User Logon Name
* i_langu = SY-LANGU " sylangu SAP R/3 System, Current Language
* i_master_language = SY-LANGU " sylangu SAP R/3 System, Current Language
IMPORTING
e_hrs_otype = " hrsobject-otype Standard object type
e_hrs_objid = " hrsobject-objid Object ID of Standard Object
TABLES
t_wi_texts = " swlwptwit Structure for Work Item Texts
t_cnt_elem_def = " swlwpcndsc Describes Container Definition to Be Generated by RFC
t_cnt_elem_descr = " swlwpcndes Names of Container Elements
. " SWF_WSC_TASK_GENERATE
The ABAP code below is a full code listing to execute function module SWF_WSC_TASK_GENERATE including all data declarations. The code uses 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 original method of declaring data variables up front. 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).
| ld_e_hrs_otype | TYPE HRSOBJECT-OTYPE , |
| ld_e_hrs_objid | TYPE HRSOBJECT-OBJID , |
| it_t_wi_texts | TYPE STANDARD TABLE OF SWLWPTWIT,"TABLES PARAM |
| wa_t_wi_texts | LIKE LINE OF it_t_wi_texts , |
| it_t_cnt_elem_def | TYPE STANDARD TABLE OF SWLWPCNDSC,"TABLES PARAM |
| wa_t_cnt_elem_def | LIKE LINE OF it_t_cnt_elem_def , |
| it_t_cnt_elem_descr | TYPE STANDARD TABLE OF SWLWPCNDES,"TABLES PARAM |
| wa_t_cnt_elem_descr | LIKE LINE OF it_t_cnt_elem_descr . |
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_e_hrs_otype | TYPE HRSOBJECT-OTYPE , |
| ld_i_task_description | TYPE SWLWPTDSC , |
| it_t_wi_texts | TYPE STANDARD TABLE OF SWLWPTWIT , |
| wa_t_wi_texts | LIKE LINE OF it_t_wi_texts, |
| ld_e_hrs_objid | TYPE HRSOBJECT-OBJID , |
| ld_i_devclass | TYPE DEVCLASS , |
| it_t_cnt_elem_def | TYPE STANDARD TABLE OF SWLWPCNDSC , |
| wa_t_cnt_elem_def | LIKE LINE OF it_t_cnt_elem_def, |
| ld_i_korrnum | TYPE TRKORR , |
| it_t_cnt_elem_descr | TYPE STANDARD TABLE OF SWLWPCNDES , |
| wa_t_cnt_elem_descr | LIKE LINE OF it_t_cnt_elem_descr, |
| ld_i_uname | TYPE SYUNAME , |
| ld_i_langu | TYPE SYLANGU , |
| ld_i_master_language | TYPE SYLANGU . |
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name SWF_WSC_TASK_GENERATE or its description.