SAP CM_F_MESSAGE Function Module for NOTRANSL: Sammelt die Nachrichten in einer internen Fehlerprotokolltabelle









CM_F_MESSAGE is a standard cm f 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 die Nachrichten in einer internen Fehlerprotokolltabelle 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 message FM, simply by entering the name CM_F_MESSAGE into the relevant SAP transaction such as SE37 or SE38.

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



Function CM_F_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_MESSAGE'"NOTRANSL: Sammelt die Nachrichten in einer internen Fehlerprotokolltabelle
EXPORTING
* APPEND_SAME_MSG = ' ' "Switch: Collect same messages or summarize
* MSGV1 = ' ' "Message Parameter 1
* MSGV2 = ' ' "Message Parameter 2
* MSGV3 = ' ' "Message Parameter 3
* MSGV4 = ' ' "Message Parameter 4
* MSG_ON_SCREEN = ' ' "Switch: log or output messages
* OBJECT_DEPENDENT = ' ' "Message is Object-Dependent
* PLANR = ' ' "Capacity planner group
* VAGRP = ' ' "Planner Group
* WERKS = ' ' "Plant
* CMFE_INTO_SMSG = ' ' "Transfer message to function group SMSG
ARBGB = "Application area (message ID)
* PARAMS = "
* LOGSYS = ' ' "
* DISPO = ' ' "Material Requirements Planning (MRP) Group
* EKGRP = ' ' "Purchasing group
* KOKRS = ' ' "Controlling area
* KOSTL = ' ' "Cost center
* LABOR = ' ' "Laboratory
MSGNR = "Message no. from T100 or TCMF1
MSGTY = "Message type (S,I,W,E,A)

EXCEPTIONS
MESAGE_TYPE_NOT_VALID = 1 NO_SY_MESSAGE = 2
.



IMPORTING Parameters details for CM_F_MESSAGE

APPEND_SAME_MSG - Switch: Collect same messages or summarize

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

MSGV1 - Message Parameter 1

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

MSGV2 - Message Parameter 2

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

MSGV3 - Message Parameter 3

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

MSGV4 - Message Parameter 4

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

MSG_ON_SCREEN - Switch: log or output messages

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

OBJECT_DEPENDENT - Message is Object-Dependent

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

PLANR - Capacity planner group

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

VAGRP - Planner Group

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

WERKS - Plant

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

CMFE_INTO_SMSG - Transfer message to function group SMSG

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

ARBGB - Application area (message ID)

Data type: CMIMSG-ARBGB
Optional: No
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)

LOGSYS -

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

DISPO - Material Requirements Planning (MRP) Group

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

EKGRP - Purchasing group

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

KOKRS - Controlling area

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

KOSTL - Cost center

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

LABOR - Laboratory

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

MSGNR - Message no. from T100 or TCMF1

Data type: CMIMSG-MSGNR
Optional: No
Call by Reference: No ( called with pass by value option)

MSGTY - Message type (S,I,W,E,A)

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

EXCEPTIONS details

MESAGE_TYPE_NOT_VALID - Message type does not exist

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

NO_SY_MESSAGE - No system message found

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

Copy and paste ABAP code example for CM_F_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_msg  TYPE XFLAG, "   SPACE
lv_mesage_type_not_valid  TYPE XFLAG, "   
lv_msgv1  TYPE XFLAG, "   SPACE
lv_msgv2  TYPE XFLAG, "   SPACE
lv_msgv3  TYPE XFLAG, "   SPACE
lv_msgv4  TYPE XFLAG, "   SPACE
lv_msg_on_screen  TYPE XFLAG, "   SPACE
lv_object_dependent  TYPE XFLAG, "   SPACE
lv_planr  TYPE TC27-PLANR, "   SPACE
lv_vagrp  TYPE T024A-FEVOR, "   SPACE
lv_werks  TYPE T001W-WERKS, "   SPACE
lv_cmfe_into_smsg  TYPE SELKZ, "   SPACE
lv_arbgb  TYPE CMIMSG-ARBGB, "   
lv_no_sy_message  TYPE CMIMSG, "   
lv_params  TYPE CMFEXITCALL, "   
lv_logsys  TYPE RFCDEST, "   SPACE
lv_dispo  TYPE T024D-DISPO, "   SPACE
lv_ekgrp  TYPE T024-EKGRP, "   SPACE
lv_kokrs  TYPE TKA01-KOKRS, "   SPACE
lv_kostl  TYPE CSKS-KOSTL, "   SPACE
lv_labor  TYPE T024L-LABOR, "   SPACE
lv_msgnr  TYPE CMIMSG-MSGNR, "   
lv_msgty  TYPE CMIMSG-MSGTY. "   

  CALL FUNCTION 'CM_F_MESSAGE'  "NOTRANSL: Sammelt die Nachrichten in einer internen Fehlerprotokolltabelle
    EXPORTING
         APPEND_SAME_MSG = lv_append_same_msg
         MSGV1 = lv_msgv1
         MSGV2 = lv_msgv2
         MSGV3 = lv_msgv3
         MSGV4 = lv_msgv4
         MSG_ON_SCREEN = lv_msg_on_screen
         OBJECT_DEPENDENT = lv_object_dependent
         PLANR = lv_planr
         VAGRP = lv_vagrp
         WERKS = lv_werks
         CMFE_INTO_SMSG = lv_cmfe_into_smsg
         ARBGB = lv_arbgb
         PARAMS = lv_params
         LOGSYS = lv_logsys
         DISPO = lv_dispo
         EKGRP = lv_ekgrp
         KOKRS = lv_kokrs
         KOSTL = lv_kostl
         LABOR = lv_labor
         MSGNR = lv_msgnr
         MSGTY = lv_msgty
    EXCEPTIONS
        MESAGE_TYPE_NOT_VALID = 1
        NO_SY_MESSAGE = 2
. " CM_F_MESSAGE




ABAP code using 7.40 inline data declarations to call FM CM_F_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_msg) = ' '.
 
 
DATA(ld_msgv1) = ' '.
 
DATA(ld_msgv2) = ' '.
 
DATA(ld_msgv3) = ' '.
 
DATA(ld_msgv4) = ' '.
 
DATA(ld_msg_on_screen) = ' '.
 
DATA(ld_object_dependent) = ' '.
 
"SELECT single PLANR FROM TC27 INTO @DATA(ld_planr).
DATA(ld_planr) = ' '.
 
"SELECT single FEVOR FROM T024A INTO @DATA(ld_vagrp).
DATA(ld_vagrp) = ' '.
 
"SELECT single WERKS FROM T001W INTO @DATA(ld_werks).
DATA(ld_werks) = ' '.
 
DATA(ld_cmfe_into_smsg) = ' '.
 
"SELECT single ARBGB FROM CMIMSG INTO @DATA(ld_arbgb).
 
 
 
DATA(ld_logsys) = ' '.
 
"SELECT single DISPO FROM T024D INTO @DATA(ld_dispo).
DATA(ld_dispo) = ' '.
 
"SELECT single EKGRP FROM T024 INTO @DATA(ld_ekgrp).
DATA(ld_ekgrp) = ' '.
 
"SELECT single KOKRS FROM TKA01 INTO @DATA(ld_kokrs).
DATA(ld_kokrs) = ' '.
 
"SELECT single KOSTL FROM CSKS INTO @DATA(ld_kostl).
DATA(ld_kostl) = ' '.
 
"SELECT single LABOR FROM T024L INTO @DATA(ld_labor).
DATA(ld_labor) = ' '.
 
"SELECT single MSGNR FROM CMIMSG INTO @DATA(ld_msgnr).
 
"SELECT single MSGTY FROM CMIMSG INTO @DATA(ld_msgty).
 


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!