SAP COMH_CHECK_MESSAGE_ELEMENTS Function Module for NOTRANSL: Prüfen der Meldungselemente
COMH_CHECK_MESSAGE_ELEMENTS is a standard comh check message elements 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: Prüfen der Meldungselemente 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 comh check message elements FM, simply by entering the name COMH_CHECK_MESSAGE_ELEMENTS into the relevant SAP transaction such as SE37 or SE38.
Function Group: COMH
Program Name: SAPLCOMH
Main Program:
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function COMH_CHECK_MESSAGE_ELEMENTS 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 'COMH_CHECK_MESSAGE_ELEMENTS'"NOTRANSL: Prüfen der Meldungselemente.
EXPORTING
MESSAGE_CLASS = "Message category
MESSAGE_ID = "Message number
WERK = "Plant
* IGNORE_TEXTS = ' ' "Ignore text characteristics
IMPORTING
ERROR_ATINN = "Incorrect characteristic
ERROR_INDEX = "Sy tabix of message characteristic
ERROR_TYPE = "Error type
TABLES
TCOME = "Table with message characteristics
IMPORTING Parameters details for COMH_CHECK_MESSAGE_ELEMENTS
MESSAGE_CLASS - Message category
Data type: RCOMHP-MSCLAOptional: No
Call by Reference: Yes
MESSAGE_ID - Message number
Data type: RCOMHP-MSIDOptional: No
Call by Reference: Yes
WERK - Plant
Data type: RCOMHP-WERKOptional: No
Call by Reference: Yes
IGNORE_TEXTS - Ignore text characteristics
Data type:Default: SPACE
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for COMH_CHECK_MESSAGE_ELEMENTS
ERROR_ATINN - Incorrect characteristic
Data type: CABN-ATINNOptional: No
Call by Reference: No ( called with pass by value option)
ERROR_INDEX - Sy tabix of message characteristic
Data type: SY-TABIXOptional: No
Call by Reference: No ( called with pass by value option)
ERROR_TYPE - Error type
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for COMH_CHECK_MESSAGE_ELEMENTS
TCOME - Table with message characteristics
Data type: RCOMEOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for COMH_CHECK_MESSAGE_ELEMENTS 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: | ||||
| lt_tcome | TYPE STANDARD TABLE OF RCOME, " | |||
| lv_error_atinn | TYPE CABN-ATINN, " | |||
| lv_message_class | TYPE RCOMHP-MSCLA, " | |||
| lv_message_id | TYPE RCOMHP-MSID, " | |||
| lv_error_index | TYPE SY-TABIX, " | |||
| lv_werk | TYPE RCOMHP-WERK, " | |||
| lv_error_type | TYPE SY-SUBRC, " | |||
| lv_ignore_texts | TYPE SY. " SPACE |
|   CALL FUNCTION 'COMH_CHECK_MESSAGE_ELEMENTS' "NOTRANSL: Prüfen der Meldungselemente |
| EXPORTING | ||
| MESSAGE_CLASS | = lv_message_class | |
| MESSAGE_ID | = lv_message_id | |
| WERK | = lv_werk | |
| IGNORE_TEXTS | = lv_ignore_texts | |
| IMPORTING | ||
| ERROR_ATINN | = lv_error_atinn | |
| ERROR_INDEX | = lv_error_index | |
| ERROR_TYPE | = lv_error_type | |
| TABLES | ||
| TCOME | = lt_tcome | |
| . " COMH_CHECK_MESSAGE_ELEMENTS | ||
ABAP code using 7.40 inline data declarations to call FM COMH_CHECK_MESSAGE_ELEMENTS
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 ATINN FROM CABN INTO @DATA(ld_error_atinn). | ||||
| "SELECT single MSCLA FROM RCOMHP INTO @DATA(ld_message_class). | ||||
| "SELECT single MSID FROM RCOMHP INTO @DATA(ld_message_id). | ||||
| "SELECT single TABIX FROM SY INTO @DATA(ld_error_index). | ||||
| "SELECT single WERK FROM RCOMHP INTO @DATA(ld_werk). | ||||
| "SELECT single SUBRC FROM SY INTO @DATA(ld_error_type). | ||||
| DATA(ld_ignore_texts) | = ' '. | |||
Search for further information about these or an SAP related objects