SAP CO_MES_GET_MESS_TYPE Function Module for Determination of Message Type from Table T160M
CO_MES_GET_MESS_TYPE is a standard co mes get mess type SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Determination of Message Type from Table T160M 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 co mes get mess type FM, simply by entering the name CO_MES_GET_MESS_TYPE into the relevant SAP transaction such as SE37 or SE38.
Function Group: COMES
Program Name: SAPLCOMES
Main Program: SAPLCOMES
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function CO_MES_GET_MESS_TYPE 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 'CO_MES_GET_MESS_TYPE'"Determination of Message Type from Table T160M.
EXPORTING
I_MSGID = "
I_MSGNO = "Message Number
* SEND_MESSAGE = "
* I_MSGV1 = "Message variable 1
* I_MSGV2 = "Message variable 2
* I_MSGV3 = "Message variable 3
* I_MSGV4 = "Message variable 4
* I_MSGVS = ' ' "Message control version: Purchasing/Sales
IMPORTING
E_MSGTY = "
EXCEPTIONS
NO_ENTRY = 1
IMPORTING Parameters details for CO_MES_GET_MESS_TYPE
I_MSGID -
Data type: SY-MSGIDOptional: No
Call by Reference: No ( called with pass by value option)
I_MSGNO - Message Number
Data type: SY-MSGNOOptional: No
Call by Reference: No ( called with pass by value option)
SEND_MESSAGE -
Data type: RC27S-FLG_DARKOptional: Yes
Call by Reference: No ( called with pass by value option)
I_MSGV1 - Message variable 1
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
I_MSGV2 - Message variable 2
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
I_MSGV3 - Message variable 3
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
I_MSGV4 - Message variable 4
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
I_MSGVS - Message control version: Purchasing/Sales
Data type: T160M-MSGVSDefault: SPACE
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for CO_MES_GET_MESS_TYPE
E_MSGTY -
Data type: SY-MSGTYOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_ENTRY -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CO_MES_GET_MESS_TYPE 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_e_msgty | TYPE SY-MSGTY, " | |||
lv_i_msgid | TYPE SY-MSGID, " | |||
lv_no_entry | TYPE SY, " | |||
lv_i_msgno | TYPE SY-MSGNO, " | |||
lv_send_message | TYPE RC27S-FLG_DARK, " | |||
lv_i_msgv1 | TYPE RC27S, " | |||
lv_i_msgv2 | TYPE RC27S, " | |||
lv_i_msgv3 | TYPE RC27S, " | |||
lv_i_msgv4 | TYPE RC27S, " | |||
lv_i_msgvs | TYPE T160M-MSGVS. " SPACE |
  CALL FUNCTION 'CO_MES_GET_MESS_TYPE' "Determination of Message Type from Table T160M |
EXPORTING | ||
I_MSGID | = lv_i_msgid | |
I_MSGNO | = lv_i_msgno | |
SEND_MESSAGE | = lv_send_message | |
I_MSGV1 | = lv_i_msgv1 | |
I_MSGV2 | = lv_i_msgv2 | |
I_MSGV3 | = lv_i_msgv3 | |
I_MSGV4 | = lv_i_msgv4 | |
I_MSGVS | = lv_i_msgvs | |
IMPORTING | ||
E_MSGTY | = lv_e_msgty | |
EXCEPTIONS | ||
NO_ENTRY = 1 | ||
. " CO_MES_GET_MESS_TYPE |
ABAP code using 7.40 inline data declarations to call FM CO_MES_GET_MESS_TYPE
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 MSGTY FROM SY INTO @DATA(ld_e_msgty). | ||||
"SELECT single MSGID FROM SY INTO @DATA(ld_i_msgid). | ||||
"SELECT single MSGNO FROM SY INTO @DATA(ld_i_msgno). | ||||
"SELECT single FLG_DARK FROM RC27S INTO @DATA(ld_send_message). | ||||
"SELECT single MSGVS FROM T160M INTO @DATA(ld_i_msgvs). | ||||
DATA(ld_i_msgvs) | = ' '. | |||
Search for further information about these or an SAP related objects