SAP MESSAGES_STOP Function Module for End collection of messages; report importance of errors occurred
MESSAGES_STOP is a standard messages stop SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for End collection of messages; report importance of errors occurred 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 messages stop FM, simply by entering the name MESSAGES_STOP into the relevant SAP transaction such as SE37 or SE38.
Function Group: SMSG
Program Name: SAPLSMSG
Main Program: SAPLSMSG
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MESSAGES_STOP 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 'MESSAGES_STOP'"End collection of messages; report importance of errors occurred.
EXPORTING
* I_RESET_IDENTIFICATION = "Flag: Reset Identification
* I_IDENTIFICATION = "Identification for Reset Messages
* I_RESET_MESSAGES = "Flag: Reset Collected Messages (MESSAGES_INITIALIZE)
EXCEPTIONS
A_MESSAGE = 1 E_MESSAGE = 2 W_MESSAGE = 3 I_MESSAGE = 4 S_MESSAGE = 5 DEACTIVATED_BY_MD = 6
IMPORTING Parameters details for MESSAGES_STOP
I_RESET_IDENTIFICATION - Flag: Reset Identification
Data type: BOOLE_DOptional: Yes
Call by Reference: No ( called with pass by value option)
I_IDENTIFICATION - Identification for Reset Messages
Data type: SY-UZEITOptional: Yes
Call by Reference: No ( called with pass by value option)
I_RESET_MESSAGES - Flag: Reset Collected Messages (MESSAGES_INITIALIZE)
Data type: BOOLE_DOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
A_MESSAGE - Maximum occurring error level: Termination
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
E_MESSAGE - Maximum occurring error level: E
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
W_MESSAGE - Maximum occurring error level: W
Data type:Optional: No
Call by Reference: Yes
I_MESSAGE - Maximum occurring error level: I
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
S_MESSAGE - Maximum occurring error level: S
Data type:Optional: No
Call by Reference: Yes
DEACTIVATED_BY_MD - Log deactivated by message dispatcher
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MESSAGES_STOP 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_a_message | TYPE STRING, " | |||
| lv_i_reset_identification | TYPE BOOLE_D, " | |||
| lv_e_message | TYPE BOOLE_D, " | |||
| lv_i_identification | TYPE SY-UZEIT, " | |||
| lv_w_message | TYPE SY, " | |||
| lv_i_reset_messages | TYPE BOOLE_D, " | |||
| lv_i_message | TYPE BOOLE_D, " | |||
| lv_s_message | TYPE BOOLE_D, " | |||
| lv_deactivated_by_md | TYPE BOOLE_D. " |
|   CALL FUNCTION 'MESSAGES_STOP' "End collection of messages; report importance of errors occurred |
| EXPORTING | ||
| I_RESET_IDENTIFICATION | = lv_i_reset_identification | |
| I_IDENTIFICATION | = lv_i_identification | |
| I_RESET_MESSAGES | = lv_i_reset_messages | |
| EXCEPTIONS | ||
| A_MESSAGE = 1 | ||
| E_MESSAGE = 2 | ||
| W_MESSAGE = 3 | ||
| I_MESSAGE = 4 | ||
| S_MESSAGE = 5 | ||
| DEACTIVATED_BY_MD = 6 | ||
| . " MESSAGES_STOP | ||
ABAP code using 7.40 inline data declarations to call FM MESSAGES_STOP
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 UZEIT FROM SY INTO @DATA(ld_i_identification). | ||||
Search for further information about these or an SAP related objects