SWW_WI_CREATE 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 SWW_WI_CREATE into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
SWR_DEPRECATED_RUNTIME
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'SWW_WI_CREATE' "
* EXPORTING
* callback_fb = SPACE " swwwihead-wi_cbfb FM for Completed WI Feedback
* checked_wi = SWFCO_NO_ID " swwwihead-wi_chckwi ID of Associated WI (Only for Types D and N)
* confirm = SPACE " swwwihead-wi_confirm Indicator Showing Whether End of Processing Is To Be Confirmed
* creator = " swwwihead-wi_creator WI Creator
* desired_end_action = SWFCO_WI_DEF_DH_ACT " sww_deact Action on Requested End
* desired_end_date = SWFCO_NO_DATE " sww_ded Requested End Date
* desired_end_time = SWFCO_NO_TIME " sww_det Requested End Time
* desired_start_date = SWFCO_NO_DATE " sww_dsd Requested Start Date
* desired_start_time = SWFCO_NO_TIME " sww_dst Requested Start Time
* language = SY-LANGU " swwwihead-wi_lang Language of WI (for Importing Texts)
* latest_end_action = SWFCO_WI_DEF_DH_ACT " sww_leact Action on Latest End
* latest_end_date = SWFCO_NO_DATE " sww_led Latest End Date
* latest_end_escalation = SWFCO_NO_ESC " sww_leesc Interval After Which Latest End Action Repeated
* latest_end_time = SWFCO_NO_TIME " sww_let Latest End Time
* latest_start_action = SWFCO_WI_DEF_DH_ACT " sww_lsact Action on Latest Start
* latest_start_date = SWFCO_NO_DATE " sww_lsd Latest Start Date
* latest_start_time = SWFCO_NO_TIME " sww_lst Latest Start Time
* max_event_count = SWFCO_DEF_MAX_EVT_CNT " swwei-max_count Maximum Number of Events To Be Received
* max_retry_count = SWFCO_NO_RETRY " swwwihead-max_retry Maximum Modeled Repeat Counter
* priority = SWFCO_NO_PRIO " swwwihead-wi_prio Priority of WI
* task = " swwwihead-wi_rh_task Associated Task ID According to Task Catalog
* workitem_type = SPACE " swwwihead-wi_type Work Item Type
* do_commit = 'X' " swwcommit-commitflag Indicator for Control of Commit Logic
* do_sync_callback = SPACE " swwcommit-syncflag Indicator for Control of Synchronous Callback
* text = SPACE " swwwihead-wi_text Display Text for WI
* do_sync_wi_chain = SPACE " swwwihead-syncchain Indicator Showing Whether WI in Synchronous Processing Chain
* created_by_user = SY-UNAME " sy-uname User Who Created the Work Item
* created_by_address = SPACE " swwaddrkey Address That Created the Work Item
* called_in_background = SPACE " swwcommit-dialogflag Indicator Showing Whether FM Called in Background
* logical_system = SPACE " tbdls-logsys Name of Logical System for Remote WI
* step_modeled_wi_display = SPACE " swwwihead-wlc_displ Flag Showing Whether WI Display in WLC from Step Definition
* no_deadline_parameters = SPACE " swwcommit-deadlckflg Indicator for Whether Deadline Data Was Passed
* restricted_log = SPACE " swwwihead-wi_restlog Indicator Showing Whether Selective Logging Is Switched On
* seconds_until_timeout = " swwwihead-timeout Number of Seconds Until Timeout
* create_event = SPACE " swwcommit-eventflag Indicator Denoting Whether Event CREATED Is To Be Triggered
* status_event = SPACE " swwwihead-status_evt Indicator Denoting Whether STATUS_CHANGED Is To Be Triggered
* xml_protocol = " swd_protcl Transmission Protocol Used in Web Activity
* wlc_flags = " swwwihead-wlc_flags Field for Packed WLC Indicators
* properties = " sww_wihext
* status = SWFCO_WI_STATUS_READY " sww_wistat Processing Status of WI
* use_wiid_as_objid = SPACE " swwcommit-widasobjid
* node_type = SPACE " swd_nodetp
* wi_rejectable = SPACE " sww_reject Indicator Denoting that Work Item Can Be Rejected by Agent
IMPORTING
wi_id = " swwwihead-wi_id ID of WI Created
wi_header = " swwwihead Header Data of WI Created
ex_wi_handle = " if_swf_run_wim_internal Workflow: Work Item Manager (Local)
ex_wi_exception = " cx_swf_run_wim Exception in WIM
* TABLES
* agents = " swhactor Possible Agents for Work Item
* deadline_agents = " swhactor Agents For Latest End
* desired_end_agents = " swhactor Agents for Requested End
* latest_start_agents = " swhactor Agents for Latest Start
* excluded_agents = " swhactor Excluded Agents for Work Item
* notification_agents = " swhactor Agents for End Notification
* secondary_methods = " swwmethods Object Methods To Be Called Additionally
* wi_container = " swcont Data Container of Work Item
* comp_events = " swwcompevt List of Terminating Events
* return_codes = " swp_return List of Return Codes Modeled in Flow
* om_bind_def = " swabindef Export: Binding Definition Task <-> Method
* method_exec_list = " swwmethods Export: List of Methods To Be Executed
* CHANGING
* wi_container_handle = " if_swf_cnt_container Container - Implementation of a 'Collection'
EXCEPTIONS
ID_NOT_CREATED = 1 " Work Item ID Cannot Be Created
READ_FAILED = 2 " Task Cannot Be Read
. " SWW_WI_CREATE
The ABAP code below is a full code listing to execute function module SWW_WI_CREATE 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_wi_id | TYPE SWWWIHEAD-WI_ID , |
| ld_wi_header | TYPE SWWWIHEAD , |
| ld_ex_wi_handle | TYPE IF_SWF_RUN_WIM_INTERNAL , |
| ld_ex_wi_exception | TYPE CX_SWF_RUN_WIM , |
| it_agents | TYPE STANDARD TABLE OF SWHACTOR,"TABLES PARAM |
| wa_agents | LIKE LINE OF it_agents , |
| it_deadline_agents | TYPE STANDARD TABLE OF SWHACTOR,"TABLES PARAM |
| wa_deadline_agents | LIKE LINE OF it_deadline_agents , |
| it_desired_end_agents | TYPE STANDARD TABLE OF SWHACTOR,"TABLES PARAM |
| wa_desired_end_agents | LIKE LINE OF it_desired_end_agents , |
| it_latest_start_agents | TYPE STANDARD TABLE OF SWHACTOR,"TABLES PARAM |
| wa_latest_start_agents | LIKE LINE OF it_latest_start_agents , |
| it_excluded_agents | TYPE STANDARD TABLE OF SWHACTOR,"TABLES PARAM |
| wa_excluded_agents | LIKE LINE OF it_excluded_agents , |
| it_notification_agents | TYPE STANDARD TABLE OF SWHACTOR,"TABLES PARAM |
| wa_notification_agents | LIKE LINE OF it_notification_agents , |
| it_secondary_methods | TYPE STANDARD TABLE OF SWWMETHODS,"TABLES PARAM |
| wa_secondary_methods | LIKE LINE OF it_secondary_methods , |
| it_wi_container | TYPE STANDARD TABLE OF SWCONT,"TABLES PARAM |
| wa_wi_container | LIKE LINE OF it_wi_container , |
| it_comp_events | TYPE STANDARD TABLE OF SWWCOMPEVT,"TABLES PARAM |
| wa_comp_events | LIKE LINE OF it_comp_events , |
| it_return_codes | TYPE STANDARD TABLE OF SWP_RETURN,"TABLES PARAM |
| wa_return_codes | LIKE LINE OF it_return_codes , |
| it_om_bind_def | TYPE STANDARD TABLE OF SWABINDEF,"TABLES PARAM |
| wa_om_bind_def | LIKE LINE OF it_om_bind_def , |
| it_method_exec_list | TYPE STANDARD TABLE OF SWWMETHODS,"TABLES PARAM |
| wa_method_exec_list | LIKE LINE OF it_method_exec_list . |
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_wi_container_handle | TYPE IF_SWF_CNT_CONTAINER , |
| ld_wi_id | TYPE SWWWIHEAD-WI_ID , |
| ld_callback_fb | TYPE SWWWIHEAD-WI_CBFB , |
| it_agents | TYPE STANDARD TABLE OF SWHACTOR , |
| wa_agents | LIKE LINE OF it_agents, |
| ld_wi_header | TYPE SWWWIHEAD , |
| ld_checked_wi | TYPE SWWWIHEAD-WI_CHCKWI , |
| it_deadline_agents | TYPE STANDARD TABLE OF SWHACTOR , |
| wa_deadline_agents | LIKE LINE OF it_deadline_agents, |
| ld_ex_wi_handle | TYPE IF_SWF_RUN_WIM_INTERNAL , |
| ld_confirm | TYPE SWWWIHEAD-WI_CONFIRM , |
| it_desired_end_agents | TYPE STANDARD TABLE OF SWHACTOR , |
| wa_desired_end_agents | LIKE LINE OF it_desired_end_agents, |
| ld_ex_wi_exception | TYPE CX_SWF_RUN_WIM , |
| ld_creator | TYPE SWWWIHEAD-WI_CREATOR , |
| it_latest_start_agents | TYPE STANDARD TABLE OF SWHACTOR , |
| wa_latest_start_agents | LIKE LINE OF it_latest_start_agents, |
| ld_desired_end_action | TYPE SWW_DEACT , |
| it_excluded_agents | TYPE STANDARD TABLE OF SWHACTOR , |
| wa_excluded_agents | LIKE LINE OF it_excluded_agents, |
| ld_desired_end_date | TYPE SWW_DED , |
| it_notification_agents | TYPE STANDARD TABLE OF SWHACTOR , |
| wa_notification_agents | LIKE LINE OF it_notification_agents, |
| it_secondary_methods | TYPE STANDARD TABLE OF SWWMETHODS , |
| wa_secondary_methods | LIKE LINE OF it_secondary_methods, |
| ld_desired_end_time | TYPE SWW_DET , |
| it_wi_container | TYPE STANDARD TABLE OF SWCONT , |
| wa_wi_container | LIKE LINE OF it_wi_container, |
| ld_desired_start_date | TYPE SWW_DSD , |
| it_comp_events | TYPE STANDARD TABLE OF SWWCOMPEVT , |
| wa_comp_events | LIKE LINE OF it_comp_events, |
| ld_desired_start_time | TYPE SWW_DST , |
| it_return_codes | TYPE STANDARD TABLE OF SWP_RETURN , |
| wa_return_codes | LIKE LINE OF it_return_codes, |
| ld_language | TYPE SWWWIHEAD-WI_LANG , |
| it_om_bind_def | TYPE STANDARD TABLE OF SWABINDEF , |
| wa_om_bind_def | LIKE LINE OF it_om_bind_def, |
| ld_latest_end_action | TYPE SWW_LEACT , |
| it_method_exec_list | TYPE STANDARD TABLE OF SWWMETHODS , |
| wa_method_exec_list | LIKE LINE OF it_method_exec_list, |
| ld_latest_end_date | TYPE SWW_LED , |
| ld_latest_end_escalation | TYPE SWW_LEESC , |
| ld_latest_end_time | TYPE SWW_LET , |
| ld_latest_start_action | TYPE SWW_LSACT , |
| ld_latest_start_date | TYPE SWW_LSD , |
| ld_latest_start_time | TYPE SWW_LST , |
| ld_max_event_count | TYPE SWWEI-MAX_COUNT , |
| ld_max_retry_count | TYPE SWWWIHEAD-MAX_RETRY , |
| ld_priority | TYPE SWWWIHEAD-WI_PRIO , |
| ld_task | TYPE SWWWIHEAD-WI_RH_TASK , |
| ld_workitem_type | TYPE SWWWIHEAD-WI_TYPE , |
| ld_do_commit | TYPE SWWCOMMIT-COMMITFLAG , |
| ld_do_sync_callback | TYPE SWWCOMMIT-SYNCFLAG , |
| ld_text | TYPE SWWWIHEAD-WI_TEXT , |
| ld_do_sync_wi_chain | TYPE SWWWIHEAD-SYNCCHAIN , |
| ld_created_by_user | TYPE SY-UNAME , |
| ld_created_by_address | TYPE SWWADDRKEY , |
| ld_called_in_background | TYPE SWWCOMMIT-DIALOGFLAG , |
| ld_logical_system | TYPE TBDLS-LOGSYS , |
| ld_step_modeled_wi_display | TYPE SWWWIHEAD-WLC_DISPL , |
| ld_no_deadline_parameters | TYPE SWWCOMMIT-DEADLCKFLG , |
| ld_restricted_log | TYPE SWWWIHEAD-WI_RESTLOG , |
| ld_seconds_until_timeout | TYPE SWWWIHEAD-TIMEOUT , |
| ld_create_event | TYPE SWWCOMMIT-EVENTFLAG , |
| ld_status_event | TYPE SWWWIHEAD-STATUS_EVT , |
| ld_xml_protocol | TYPE SWD_PROTCL , |
| ld_wlc_flags | TYPE SWWWIHEAD-WLC_FLAGS , |
| ld_properties | TYPE SWW_WIHEXT , |
| ld_status | TYPE SWW_WISTAT , |
| ld_use_wiid_as_objid | TYPE SWWCOMMIT-WIDASOBJID , |
| ld_node_type | TYPE SWD_NODETP , |
| ld_wi_rejectable | TYPE SWW_REJECT . |
This function module calls specific function modules (depending on the
work item type to be created) which create a work item.
...See here for full SAP fm documentation
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 SWW_WI_CREATE or its description.