SAP_WAPI_CREATE_EVENT 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 SAP_WAPI_CREATE_EVENT into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
SWRR
Released Date:
14.01.2009
Processing type: Remote-Enabled
CALL FUNCTION 'SAP_WAPI_CREATE_EVENT' "Workflow Interfaces: Create Event (BOR)
EXPORTING
object_type = " swr_struct-object_typ Business Object Repository object type
object_key = " swr_struct-object_key Business Object Repository object key
event = " swr_struct-event Event
* commit_work = 'X' " swr_struct-commitflag Do not trigger "Commit Work" at end
* event_language = SY-LANGU " sy-langu Event language
* language = SY-LANGU " sylangu SAP System, Current Language
* user = SY-UNAME " syuname ABAP System, User Logon Name
* ifs_xml_container = " xstring Event Container as XML Data Stream
IMPORTING
return_code = " sy-subrc Return code (0 - 3, 999)
event_id = " swr_struct-event_id Event ID
* TABLES
* input_container = " swr_cont Input container (name-value pairs)
* message_lines = " swr_messag Message Lines
* message_struct = " swr_mstruc Message Structure
. " SAP_WAPI_CREATE_EVENT
The ABAP code below is a full code listing to execute function module SAP_WAPI_CREATE_EVENT 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_return_code | TYPE SY-SUBRC , |
| ld_event_id | TYPE SWR_STRUCT-EVENT_ID , |
| it_input_container | TYPE STANDARD TABLE OF SWR_CONT,"TABLES PARAM |
| wa_input_container | LIKE LINE OF it_input_container , |
| it_message_lines | TYPE STANDARD TABLE OF SWR_MESSAG,"TABLES PARAM |
| wa_message_lines | LIKE LINE OF it_message_lines , |
| it_message_struct | TYPE STANDARD TABLE OF SWR_MSTRUC,"TABLES PARAM |
| wa_message_struct | LIKE LINE OF it_message_struct . |
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_return_code | TYPE SY-SUBRC , |
| ld_object_type | TYPE SWR_STRUCT-OBJECT_TYP , |
| it_input_container | TYPE STANDARD TABLE OF SWR_CONT , |
| wa_input_container | LIKE LINE OF it_input_container, |
| ld_event_id | TYPE SWR_STRUCT-EVENT_ID , |
| ld_object_key | TYPE SWR_STRUCT-OBJECT_KEY , |
| it_message_lines | TYPE STANDARD TABLE OF SWR_MESSAG , |
| wa_message_lines | LIKE LINE OF it_message_lines, |
| ld_event | TYPE SWR_STRUCT-EVENT , |
| it_message_struct | TYPE STANDARD TABLE OF SWR_MSTRUC , |
| wa_message_struct | LIKE LINE OF it_message_struct, |
| ld_commit_work | TYPE SWR_STRUCT-COMMITFLAG , |
| ld_event_language | TYPE SY-LANGU , |
| ld_language | TYPE SYLANGU , |
| ld_user | TYPE SYUNAME , |
| ld_ifs_xml_container | TYPE XSTRING . |
An event is generated for a business object.
The object is identified using parameters
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 SAP_WAPI_CREATE_EVENT or its description.
SAP_WAPI_CREATE_EVENT - Workflow Interfaces: Create Event (BOR) SAP_WAPI_COUNT_WORKITEMS - Workflow Interfaces: Number of Work Items for User SAP_WAPI_CHANGE_WORKITEM_PRIO - Workflow Interfaces: Change Priority of Work Item SAP_WAPI_ATTACHMENT_DELETE - SAP_WAPI_ATTACHMENT_ADD_REF - SAP_WAPI_ATTACHMENT_ADD -