SAP SWE_EVENT_ENQUEUE Function Module for
SWE_EVENT_ENQUEUE is a standard swe event enqueue 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 swe event enqueue FM, simply by entering the name SWE_EVENT_ENQUEUE into the relevant SAP transaction such as SE37 or SE38.
Function Group: SWEQ
Program Name: SAPLSWEQ
Main Program: SAPLSWEQ
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function SWE_EVENT_ENQUEUE 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 'SWE_EVENT_ENQUEUE'".
EXPORTING
OBJTYPE = "Type of triggering object
* START_RECFB_SYNCHRON = "Flag for synchronous call to receiver FM
* NO_EXPLICIT_COMMIT_REQUIRED = "
* DEBUG_FLAG = "
* EVT_LOG_ID = 0 "
* STATUS = 0 "
OBJKEY = "ID (key) of triggering object
EVENT = "Name of Event
RECTYPE = "
RECFB = "
* RFCDEST = "
* CREATOR = "Event creator
* TAKE_WORKITEM_REQUESTER = "Flag for using last WI as requester
* START_WITH_DELAY = "Flag for delayed start of aRFC
IMPORTING
EVENT_ID = "ID of triggered event
TABLES
* EVENT_CONTAINER = "Data container of event
EXCEPTIONS
OBJTYPE_NOT_FOUND = 1
IMPORTING Parameters details for SWE_EVENT_ENQUEUE
OBJTYPE - Type of triggering object
Data type: SWETYPECOU-OBJTYPEOptional: No
Call by Reference: No ( called with pass by value option)
START_RECFB_SYNCHRON - Flag for synchronous call to receiver FM
Data type: SWEFLAGS-SYNCFLAGOptional: Yes
Call by Reference: No ( called with pass by value option)
NO_EXPLICIT_COMMIT_REQUIRED -
Data type: SWEFLAGS-COMMITFLAGOptional: Yes
Call by Reference: No ( called with pass by value option)
DEBUG_FLAG -
Data type: SWEFLAGS-DEBUGFLAGOptional: Yes
Call by Reference: No ( called with pass by value option)
EVT_LOG_ID -
Data type: SWELOG-EVENT_IDOptional: Yes
Call by Reference: No ( called with pass by value option)
STATUS -
Data type: SWEQUEUE-STATUSOptional: Yes
Call by Reference: No ( called with pass by value option)
OBJKEY - ID (key) of triggering object
Data type: SWEINSTCOU-OBJKEYOptional: No
Call by Reference: No ( called with pass by value option)
EVENT - Name of Event
Data type: SWETYPECOU-EVENTOptional: No
Call by Reference: No ( called with pass by value option)
RECTYPE -
Data type: SWETYPECOU-RECTYPEOptional: No
Call by Reference: No ( called with pass by value option)
RECFB -
Data type: SWETYPECOU-RECFBOptional: No
Call by Reference: No ( called with pass by value option)
RFCDEST -
Data type: SWETYPECOU-RFCDESTOptional: Yes
Call by Reference: No ( called with pass by value option)
CREATOR - Event creator
Data type: SWHACTOROptional: Yes
Call by Reference: No ( called with pass by value option)
TAKE_WORKITEM_REQUESTER - Flag for using last WI as requester
Data type: SWEFLAGS-WIREQFLAGOptional: Yes
Call by Reference: No ( called with pass by value option)
START_WITH_DELAY - Flag for delayed start of aRFC
Data type: SWEFLAGS-DELAYFLAGOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for SWE_EVENT_ENQUEUE
EVENT_ID - ID of triggered event
Data type: SWEDUMEVID-EVTIDOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for SWE_EVENT_ENQUEUE
EVENT_CONTAINER - Data container of event
Data type: SWCONTOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
OBJTYPE_NOT_FOUND - Triggering object type not found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for SWE_EVENT_ENQUEUE 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_objtype | TYPE SWETYPECOU-OBJTYPE, " | |||
| lv_event_id | TYPE SWEDUMEVID-EVTID, " | |||
| lt_event_container | TYPE STANDARD TABLE OF SWCONT, " | |||
| lv_objtype_not_found | TYPE SWCONT, " | |||
| lv_start_recfb_synchron | TYPE SWEFLAGS-SYNCFLAG, " | |||
| lv_no_explicit_commit_required | TYPE SWEFLAGS-COMMITFLAG, " | |||
| lv_debug_flag | TYPE SWEFLAGS-DEBUGFLAG, " | |||
| lv_evt_log_id | TYPE SWELOG-EVENT_ID, " 0 | |||
| lv_status | TYPE SWEQUEUE-STATUS, " 0 | |||
| lv_objkey | TYPE SWEINSTCOU-OBJKEY, " | |||
| lv_event | TYPE SWETYPECOU-EVENT, " | |||
| lv_rectype | TYPE SWETYPECOU-RECTYPE, " | |||
| lv_recfb | TYPE SWETYPECOU-RECFB, " | |||
| lv_rfcdest | TYPE SWETYPECOU-RFCDEST, " | |||
| lv_creator | TYPE SWHACTOR, " | |||
| lv_take_workitem_requester | TYPE SWEFLAGS-WIREQFLAG, " | |||
| lv_start_with_delay | TYPE SWEFLAGS-DELAYFLAG. " |
|   CALL FUNCTION 'SWE_EVENT_ENQUEUE' " |
| EXPORTING | ||
| OBJTYPE | = lv_objtype | |
| START_RECFB_SYNCHRON | = lv_start_recfb_synchron | |
| NO_EXPLICIT_COMMIT_REQUIRED | = lv_no_explicit_commit_required | |
| DEBUG_FLAG | = lv_debug_flag | |
| EVT_LOG_ID | = lv_evt_log_id | |
| STATUS | = lv_status | |
| OBJKEY | = lv_objkey | |
| EVENT | = lv_event | |
| RECTYPE | = lv_rectype | |
| RECFB | = lv_recfb | |
| RFCDEST | = lv_rfcdest | |
| CREATOR | = lv_creator | |
| TAKE_WORKITEM_REQUESTER | = lv_take_workitem_requester | |
| START_WITH_DELAY | = lv_start_with_delay | |
| IMPORTING | ||
| EVENT_ID | = lv_event_id | |
| TABLES | ||
| EVENT_CONTAINER | = lt_event_container | |
| EXCEPTIONS | ||
| OBJTYPE_NOT_FOUND = 1 | ||
| . " SWE_EVENT_ENQUEUE | ||
ABAP code using 7.40 inline data declarations to call FM SWE_EVENT_ENQUEUE
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.| "SELECT single OBJTYPE FROM SWETYPECOU INTO @DATA(ld_objtype). | ||||
| "SELECT single EVTID FROM SWEDUMEVID INTO @DATA(ld_event_id). | ||||
| "SELECT single SYNCFLAG FROM SWEFLAGS INTO @DATA(ld_start_recfb_synchron). | ||||
| "SELECT single COMMITFLAG FROM SWEFLAGS INTO @DATA(ld_no_explicit_commit_required). | ||||
| "SELECT single DEBUGFLAG FROM SWEFLAGS INTO @DATA(ld_debug_flag). | ||||
| "SELECT single EVENT_ID FROM SWELOG INTO @DATA(ld_evt_log_id). | ||||
| "SELECT single STATUS FROM SWEQUEUE INTO @DATA(ld_status). | ||||
| "SELECT single OBJKEY FROM SWEINSTCOU INTO @DATA(ld_objkey). | ||||
| "SELECT single EVENT FROM SWETYPECOU INTO @DATA(ld_event). | ||||
| "SELECT single RECTYPE FROM SWETYPECOU INTO @DATA(ld_rectype). | ||||
| "SELECT single RECFB FROM SWETYPECOU INTO @DATA(ld_recfb). | ||||
| "SELECT single RFCDEST FROM SWETYPECOU INTO @DATA(ld_rfcdest). | ||||
| "SELECT single WIREQFLAG FROM SWEFLAGS INTO @DATA(ld_take_workitem_requester). | ||||
| "SELECT single DELAYFLAG FROM SWEFLAGS INTO @DATA(ld_start_with_delay). | ||||
Search for further information about these or an SAP related objects