SAP MCS_EVENT_GENERATE Function Module for NOTRANSL: LIS Ereignis generieren
MCS_EVENT_GENERATE is a standard mcs event generate SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: LIS Ereignis generieren processing and below is the pattern details for this FM, 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 mcs event generate FM, simply by entering the name MCS_EVENT_GENERATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: MCSE
Program Name: SAPLMCSE
Main Program: SAPLMCSE
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MCS_EVENT_GENERATE 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 'MCS_EVENT_GENERATE'"NOTRANSL: LIS Ereignis generieren.
EXPORTING
I_ZEITP = "Event
I_KAPPL = "Application
I_ZPTXT = "Short text for event
I_CSTRU = "Communication structure
EXCEPTIONS
EVENT_EXIST = 1 ERRORS_FOUND = 2 TRANSPORT_ERROR = 3
IMPORTING Parameters details for MCS_EVENT_GENERATE
I_ZEITP - Event
Data type: DMCSE-ZEITPOptional: No
Call by Reference: No ( called with pass by value option)
I_KAPPL - Application
Data type: DMCSE-KAPPLOptional: No
Call by Reference: No ( called with pass by value option)
I_ZPTXT - Short text for event
Data type: DMCSE-ZPTXTOptional: No
Call by Reference: No ( called with pass by value option)
I_CSTRU - Communication structure
Data type: DMCSE-CSTRUOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
EVENT_EXIST - The event already exists
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERRORS_FOUND - Errors occurred, check log!
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TRANSPORT_ERROR - Error in transport handling
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MCS_EVENT_GENERATE 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_i_zeitp | TYPE DMCSE-ZEITP, " | |||
| lv_event_exist | TYPE DMCSE, " | |||
| lv_i_kappl | TYPE DMCSE-KAPPL, " | |||
| lv_errors_found | TYPE DMCSE, " | |||
| lv_i_zptxt | TYPE DMCSE-ZPTXT, " | |||
| lv_transport_error | TYPE DMCSE, " | |||
| lv_i_cstru | TYPE DMCSE-CSTRU. " |
|   CALL FUNCTION 'MCS_EVENT_GENERATE' "NOTRANSL: LIS Ereignis generieren |
| EXPORTING | ||
| I_ZEITP | = lv_i_zeitp | |
| I_KAPPL | = lv_i_kappl | |
| I_ZPTXT | = lv_i_zptxt | |
| I_CSTRU | = lv_i_cstru | |
| EXCEPTIONS | ||
| EVENT_EXIST = 1 | ||
| ERRORS_FOUND = 2 | ||
| TRANSPORT_ERROR = 3 | ||
| . " MCS_EVENT_GENERATE | ||
ABAP code using 7.40 inline data declarations to call FM MCS_EVENT_GENERATE
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 ZEITP FROM DMCSE INTO @DATA(ld_i_zeitp). | ||||
| "SELECT single KAPPL FROM DMCSE INTO @DATA(ld_i_kappl). | ||||
| "SELECT single ZPTXT FROM DMCSE INTO @DATA(ld_i_zptxt). | ||||
| "SELECT single CSTRU FROM DMCSE INTO @DATA(ld_i_cstru). | ||||
Search for further information about these or an SAP related objects