SAP SWE_EVENT_CREATE_ENHANCED Function Module for









SWE_EVENT_CREATE_ENHANCED is a standard swe event create enhanced 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 create enhanced FM, simply by entering the name SWE_EVENT_CREATE_ENHANCED into the relevant SAP transaction such as SE37 or SE38.

Function Group: SWEA
Program Name: SAPLSWEA
Main Program: SAPLSWEA
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function SWE_EVENT_CREATE_ENHANCED 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_CREATE_ENHANCED'"
EXPORTING
OBJTYPE = "Type of triggering object
* IDENT = "
* NO_EXPLICIT_COMMIT_REQUIRED = ' ' "
* IN_BACKGROUND_TASK = ' ' "
* IN_UPDATE_TASK = ' ' "
OBJKEY = "ID (key) of triggering object
EVENT = "Name of Event
* CREATOR = ' ' "Event creator
* TAKE_WORKITEM_REQUESTER = ' ' "
* START_WITH_DELAY = ' ' "Flag for delayed start of aRFC
* START_RECFB_SYNCHRON = ' ' "Flag for synchronous call to receiver FM
* DEBUG_FLAG = ' ' "
* NO_LOGGING = ' ' "

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_CREATE_ENHANCED

OBJTYPE - Type of triggering object

Data type: SWETYPECOU-OBJTYPE
Optional: No
Call by Reference: No ( called with pass by value option)

IDENT -

Data type: SWEDUMEVID-EVTID
Optional: Yes
Call by Reference: No ( called with pass by value option)

NO_EXPLICIT_COMMIT_REQUIRED -

Data type: SWEFLAGS-COMMITFLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IN_BACKGROUND_TASK -

Data type: SWEFLAGS-BCKGRDFLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IN_UPDATE_TASK -

Data type: SWEFLAGS-UPDATEFLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

OBJKEY - ID (key) of triggering object

Data type: SWEINSTCOU-OBJKEY
Optional: No
Call by Reference: No ( called with pass by value option)

EVENT - Name of Event

Data type: SWETYPECOU-EVENT
Optional: No
Call by Reference: No ( called with pass by value option)

CREATOR - Event creator

Data type: SWHACTOR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TAKE_WORKITEM_REQUESTER -

Data type: SWEFLAGS-WIREQFLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

START_WITH_DELAY - Flag for delayed start of aRFC

Data type: SWEFLAGS-DELAYFLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

START_RECFB_SYNCHRON - Flag for synchronous call to receiver FM

Data type: SWEFLAGS-SYNCFLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

DEBUG_FLAG -

Data type: SWEFLAGS-DEBUGFLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

NO_LOGGING -

Data type: SWEFLAGS-LOGFLAG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for SWE_EVENT_CREATE_ENHANCED

EVENT_ID - ID of triggered event

Data type: SWEDUMEVID-EVTID
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for SWE_EVENT_CREATE_ENHANCED

EVENT_CONTAINER - Data container of event

Data type: SWCONT
Optional: 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_CREATE_ENHANCED 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_ident  TYPE SWEDUMEVID-EVTID, "   
lv_no_explicit_commit_required  TYPE SWEFLAGS-COMMITFLAG, "   SPACE
lv_in_background_task  TYPE SWEFLAGS-BCKGRDFLAG, "   SPACE
lv_in_update_task  TYPE SWEFLAGS-UPDATEFLAG, "   SPACE
lv_objkey  TYPE SWEINSTCOU-OBJKEY, "   
lv_event  TYPE SWETYPECOU-EVENT, "   
lv_creator  TYPE SWHACTOR, "   SPACE
lv_take_workitem_requester  TYPE SWEFLAGS-WIREQFLAG, "   SPACE
lv_start_with_delay  TYPE SWEFLAGS-DELAYFLAG, "   SPACE
lv_start_recfb_synchron  TYPE SWEFLAGS-SYNCFLAG, "   SPACE
lv_debug_flag  TYPE SWEFLAGS-DEBUGFLAG, "   SPACE
lv_no_logging  TYPE SWEFLAGS-LOGFLAG. "   SPACE

  CALL FUNCTION 'SWE_EVENT_CREATE_ENHANCED'  "
    EXPORTING
         OBJTYPE = lv_objtype
         IDENT = lv_ident
         NO_EXPLICIT_COMMIT_REQUIRED = lv_no_explicit_commit_required
         IN_BACKGROUND_TASK = lv_in_background_task
         IN_UPDATE_TASK = lv_in_update_task
         OBJKEY = lv_objkey
         EVENT = lv_event
         CREATOR = lv_creator
         TAKE_WORKITEM_REQUESTER = lv_take_workitem_requester
         START_WITH_DELAY = lv_start_with_delay
         START_RECFB_SYNCHRON = lv_start_recfb_synchron
         DEBUG_FLAG = lv_debug_flag
         NO_LOGGING = lv_no_logging
    IMPORTING
         EVENT_ID = lv_event_id
    TABLES
         EVENT_CONTAINER = lt_event_container
    EXCEPTIONS
        OBJTYPE_NOT_FOUND = 1
. " SWE_EVENT_CREATE_ENHANCED




ABAP code using 7.40 inline data declarations to call FM SWE_EVENT_CREATE_ENHANCED

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 EVTID FROM SWEDUMEVID INTO @DATA(ld_ident).
 
"SELECT single COMMITFLAG FROM SWEFLAGS INTO @DATA(ld_no_explicit_commit_required).
DATA(ld_no_explicit_commit_required) = ' '.
 
"SELECT single BCKGRDFLAG FROM SWEFLAGS INTO @DATA(ld_in_background_task).
DATA(ld_in_background_task) = ' '.
 
"SELECT single UPDATEFLAG FROM SWEFLAGS INTO @DATA(ld_in_update_task).
DATA(ld_in_update_task) = ' '.
 
"SELECT single OBJKEY FROM SWEINSTCOU INTO @DATA(ld_objkey).
 
"SELECT single EVENT FROM SWETYPECOU INTO @DATA(ld_event).
 
DATA(ld_creator) = ' '.
 
"SELECT single WIREQFLAG FROM SWEFLAGS INTO @DATA(ld_take_workitem_requester).
DATA(ld_take_workitem_requester) = ' '.
 
"SELECT single DELAYFLAG FROM SWEFLAGS INTO @DATA(ld_start_with_delay).
DATA(ld_start_with_delay) = ' '.
 
"SELECT single SYNCFLAG FROM SWEFLAGS INTO @DATA(ld_start_recfb_synchron).
DATA(ld_start_recfb_synchron) = ' '.
 
"SELECT single DEBUGFLAG FROM SWEFLAGS INTO @DATA(ld_debug_flag).
DATA(ld_debug_flag) = ' '.
 
"SELECT single LOGFLAG FROM SWEFLAGS INTO @DATA(ld_no_logging).
DATA(ld_no_logging) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!