SWZ_AI_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 SWZ_AI_CREATE into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
SWZA
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'SWZ_AI_CREATE' "
EXPORTING
* application = SPACE " swzai-appl Application which created the WQ
* callback_fb = SPACE " swwwihead-wi_cbfb FM for confirming completed WQ
creator = " swwwihead-wi_creator Work queue creator
* def_task = SPACE " swzai-def_task Default task overwrites all line tasks
* language = SY-LANGU " swwwihead-wi_lang Language of WQ (for reading texts)
* priority = SWFCO_NO_PRIO " swwwihead-wi_prio Work queue priority
* released = SPACE " swzai-released Immediate execution without explicit release
* text = SPACE " swwwihead-wi_text Short text for the work item
* do_commit = 'X' " swwcommit-commitflag Flag for controlling commit logic
* create_event = 'X' " swwcommit-eventflag Flag for triggering event "CREATED"
* application_exec_function = SPACE " swzai-applexfunc
* object_type = 'ARCHLISTWI' " swotobjid-objtype Object type of WQ in object repository
* keep_initial_agents = SPACE " xfeld
IMPORTING
wi_id = " swwwihead-wi_id ID of WQ created
wi_header = " swwwihead Header data of WQ created
TABLES
* agents = " swhactor Agents for releasing work queue
object_list = " swzaielem Container with lines to be copied to WQ
* wi_container = " swcont Data container of WQ
EXCEPTIONS
ID_NOT_CREATED = 1 " Work queue ID cannot be created
ID_NOT_EXECUTED = 2 " Immediate execution not possible
READ_FAILED = 3 " Higher-level deadlines cannot be read
. " SWZ_AI_CREATE
The ABAP code below is a full code listing to execute function module SWZ_AI_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 , |
| it_agents | TYPE STANDARD TABLE OF SWHACTOR,"TABLES PARAM |
| wa_agents | LIKE LINE OF it_agents , |
| it_object_list | TYPE STANDARD TABLE OF SWZAIELEM,"TABLES PARAM |
| wa_object_list | LIKE LINE OF it_object_list , |
| it_wi_container | TYPE STANDARD TABLE OF SWCONT,"TABLES PARAM |
| wa_wi_container | LIKE LINE OF it_wi_container . |
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_id | TYPE SWWWIHEAD-WI_ID , |
| ld_application | TYPE SWZAI-APPL , |
| it_agents | TYPE STANDARD TABLE OF SWHACTOR , |
| wa_agents | LIKE LINE OF it_agents, |
| ld_wi_header | TYPE SWWWIHEAD , |
| ld_callback_fb | TYPE SWWWIHEAD-WI_CBFB , |
| it_object_list | TYPE STANDARD TABLE OF SWZAIELEM , |
| wa_object_list | LIKE LINE OF it_object_list, |
| ld_creator | TYPE SWWWIHEAD-WI_CREATOR , |
| it_wi_container | TYPE STANDARD TABLE OF SWCONT , |
| wa_wi_container | LIKE LINE OF it_wi_container, |
| ld_def_task | TYPE SWZAI-DEF_TASK , |
| ld_language | TYPE SWWWIHEAD-WI_LANG , |
| ld_priority | TYPE SWWWIHEAD-WI_PRIO , |
| ld_released | TYPE SWZAI-RELEASED , |
| ld_text | TYPE SWWWIHEAD-WI_TEXT , |
| ld_do_commit | TYPE SWWCOMMIT-COMMITFLAG , |
| ld_create_event | TYPE SWWCOMMIT-EVENTFLAG , |
| ld_application_exec_function | TYPE SWZAI-APPLEXFUNC , |
| ld_object_type | TYPE SWOTOBJID-OBJTYPE , |
| ld_keep_initial_agents | TYPE XFELD . |
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 SWZ_AI_CREATE or its description.