SAP CM_F_COLLECT_MESSAGE Function Module for NOTRANSL: Sammelt Meldung ins Protokoll (Einfache Version)









CM_F_COLLECT_MESSAGE is a standard cm f collect message 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: Sammelt Meldung ins Protokoll (Einfache Version) 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 cm f collect message FM, simply by entering the name CM_F_COLLECT_MESSAGE into the relevant SAP transaction such as SE37 or SE38.

Function Group: CMFE
Program Name: SAPLCMFE
Main Program: SAPLCMFE
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CM_F_COLLECT_MESSAGE 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 'CM_F_COLLECT_MESSAGE'"NOTRANSL: Sammelt Meldung ins Protokoll (Einfache Version)
EXPORTING
* APPEND_SAME_MESSAGE = ' ' "
* OBJECT_DEPENDENT = ' ' "
* PARAMS = "
* MSGID = SY-MSGID "
* MSGNO = SY-MSGNO "Message Number
* MSGTY = SY-MSGTY "
* MSGV1 = SY-MSGV1 "Message Parameter 1
* MSGV2 = SY-MSGV2 "Message Parameter 2
* MSGV3 = SY-MSGV3 "Message Parameter 3
* MSGV4 = SY-MSGV4 "Message Parameter 4
* MSG_ON_SCREEN = ' ' "
.



IMPORTING Parameters details for CM_F_COLLECT_MESSAGE

APPEND_SAME_MESSAGE -

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

OBJECT_DEPENDENT -

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

PARAMS -

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

MSGID -

Data type: SY-MSGID
Default: SY-MSGID
Optional: Yes
Call by Reference: No ( called with pass by value option)

MSGNO - Message Number

Data type: SY-MSGNO
Default: SY-MSGNO
Optional: Yes
Call by Reference: No ( called with pass by value option)

MSGTY -

Data type: SY-MSGTY
Default: SY-MSGTY
Optional: Yes
Call by Reference: No ( called with pass by value option)

MSGV1 - Message Parameter 1

Data type: SY-MSGV1
Default: SY-MSGV1
Optional: Yes
Call by Reference: No ( called with pass by value option)

MSGV2 - Message Parameter 2

Data type: SY-MSGV2
Default: SY-MSGV2
Optional: Yes
Call by Reference: No ( called with pass by value option)

MSGV3 - Message Parameter 3

Data type: SY-MSGV3
Default: SY-MSGV3
Optional: Yes
Call by Reference: No ( called with pass by value option)

MSGV4 - Message Parameter 4

Data type: SY-MSGV4
Default: SY-MSGV4
Optional: Yes
Call by Reference: No ( called with pass by value option)

MSG_ON_SCREEN -

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

Copy and paste ABAP code example for CM_F_COLLECT_MESSAGE 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_append_same_message  TYPE C, "   SPACE
lv_object_dependent  TYPE C, "   SPACE
lv_params  TYPE CMFEXITCALL, "   
lv_msgid  TYPE SY-MSGID, "   SY-MSGID
lv_msgno  TYPE SY-MSGNO, "   SY-MSGNO
lv_msgty  TYPE SY-MSGTY, "   SY-MSGTY
lv_msgv1  TYPE SY-MSGV1, "   SY-MSGV1
lv_msgv2  TYPE SY-MSGV2, "   SY-MSGV2
lv_msgv3  TYPE SY-MSGV3, "   SY-MSGV3
lv_msgv4  TYPE SY-MSGV4, "   SY-MSGV4
lv_msg_on_screen  TYPE C. "   SPACE

  CALL FUNCTION 'CM_F_COLLECT_MESSAGE'  "NOTRANSL: Sammelt Meldung ins Protokoll (Einfache Version)
    EXPORTING
         APPEND_SAME_MESSAGE = lv_append_same_message
         OBJECT_DEPENDENT = lv_object_dependent
         PARAMS = lv_params
         MSGID = lv_msgid
         MSGNO = lv_msgno
         MSGTY = lv_msgty
         MSGV1 = lv_msgv1
         MSGV2 = lv_msgv2
         MSGV3 = lv_msgv3
         MSGV4 = lv_msgv4
         MSG_ON_SCREEN = lv_msg_on_screen
. " CM_F_COLLECT_MESSAGE




ABAP code using 7.40 inline data declarations to call FM CM_F_COLLECT_MESSAGE

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.

DATA(ld_append_same_message) = ' '.
 
DATA(ld_object_dependent) = ' '.
 
 
"SELECT single MSGID FROM SY INTO @DATA(ld_msgid).
DATA(ld_msgid) = SY-MSGID.
 
"SELECT single MSGNO FROM SY INTO @DATA(ld_msgno).
DATA(ld_msgno) = SY-MSGNO.
 
"SELECT single MSGTY FROM SY INTO @DATA(ld_msgty).
DATA(ld_msgty) = SY-MSGTY.
 
"SELECT single MSGV1 FROM SY INTO @DATA(ld_msgv1).
DATA(ld_msgv1) = SY-MSGV1.
 
"SELECT single MSGV2 FROM SY INTO @DATA(ld_msgv2).
DATA(ld_msgv2) = SY-MSGV2.
 
"SELECT single MSGV3 FROM SY INTO @DATA(ld_msgv3).
DATA(ld_msgv3) = SY-MSGV3.
 
"SELECT single MSGV4 FROM SY INTO @DATA(ld_msgv4).
DATA(ld_msgv4) = SY-MSGV4.
 
DATA(ld_msg_on_screen) = ' '.
 


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!