SAP CM_F_INITIALIZE Function Module for NOTRANSL: Initialisierung der Fehlersteuerung und -analyse
CM_F_INITIALIZE is a standard cm f initialize 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: Initialisierung der Fehlersteuerung und -analyse 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 initialize FM, simply by entering the name CM_F_INITIALIZE 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_INITIALIZE 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_INITIALIZE'"NOTRANSL: Initialisierung der Fehlersteuerung und -analyse.
EXPORTING
* ABORT_MSGTY = 'A' "MSGTY with which termination of the transaction occurred
* APLID = ' ' "Application ID for access to control parameter
* MSG_ON_SCREEN = ' ' "Indicator whether messages are output on screen
* OBJECT_ID = ' ' "ID of object for which the errors are logged
* OCS_ACTIV = ' ' "Indicator whether message control should be active
* REFRESH_OLD_LOG = 'X' "Delete old log in internal memory
* SMSG_INITIALIZE = ' ' "Also initialize CO error mgmt (gr. SMSG)
* NO_OTHER_INITIALIZE = ' ' "Only a leading application can initialize
* NO_DISPLAY_ON_ABORT = ' ' "
IMPORTING
INITIALIZE_NOT_ALLOWED = "Other appl. attempts to init. and NO_OTH.. = 'X'
SMSG_IDENTIFICATION = "
EXCEPTIONS
MESSAGE_TYPE_NOT_VALID = 1 UNKNOWN_APLID = 2 UNKNOWN_OBJECT_ID = 3
IMPORTING Parameters details for CM_F_INITIALIZE
ABORT_MSGTY - MSGTY with which termination of the transaction occurred
Data type: CMIMSG-MSGTYDefault: 'A'
Optional: Yes
Call by Reference: No ( called with pass by value option)
APLID - Application ID for access to control parameter
Data type: TCMF6-APLIDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
MSG_ON_SCREEN - Indicator whether messages are output on screen
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJECT_ID - ID of object for which the errors are logged
Data type: TCMF5-OBJECT_IDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
OCS_ACTIV - Indicator whether message control should be active
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
REFRESH_OLD_LOG - Delete old log in internal memory
Data type: CDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
SMSG_INITIALIZE - Also initialize CO error mgmt (gr. SMSG)
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
NO_OTHER_INITIALIZE - Only a leading application can initialize
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
NO_DISPLAY_ON_ABORT -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CM_F_INITIALIZE
INITIALIZE_NOT_ALLOWED - Other appl. attempts to init. and NO_OTH.. = 'X'
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SMSG_IDENTIFICATION -
Data type: SY-UZEITOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
MESSAGE_TYPE_NOT_VALID - Message type unknown
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
UNKNOWN_APLID - Unknown application ID
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
UNKNOWN_OBJECT_ID - Unknown object
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CM_F_INITIALIZE 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_abort_msgty | TYPE CMIMSG-MSGTY, " 'A' | |||
| lv_initialize_not_allowed | TYPE CMIMSG, " | |||
| lv_message_type_not_valid | TYPE CMIMSG, " | |||
| lv_aplid | TYPE TCMF6-APLID, " SPACE | |||
| lv_unknown_aplid | TYPE TCMF6, " | |||
| lv_smsg_identification | TYPE SY-UZEIT, " | |||
| lv_msg_on_screen | TYPE C, " SPACE | |||
| lv_unknown_object_id | TYPE C, " | |||
| lv_object_id | TYPE TCMF5-OBJECT_ID, " SPACE | |||
| lv_ocs_activ | TYPE C, " SPACE | |||
| lv_refresh_old_log | TYPE C, " 'X' | |||
| lv_smsg_initialize | TYPE C, " SPACE | |||
| lv_no_other_initialize | TYPE C, " SPACE | |||
| lv_no_display_on_abort | TYPE C. " SPACE |
|   CALL FUNCTION 'CM_F_INITIALIZE' "NOTRANSL: Initialisierung der Fehlersteuerung und -analyse |
| EXPORTING | ||
| ABORT_MSGTY | = lv_abort_msgty | |
| APLID | = lv_aplid | |
| MSG_ON_SCREEN | = lv_msg_on_screen | |
| OBJECT_ID | = lv_object_id | |
| OCS_ACTIV | = lv_ocs_activ | |
| REFRESH_OLD_LOG | = lv_refresh_old_log | |
| SMSG_INITIALIZE | = lv_smsg_initialize | |
| NO_OTHER_INITIALIZE | = lv_no_other_initialize | |
| NO_DISPLAY_ON_ABORT | = lv_no_display_on_abort | |
| IMPORTING | ||
| INITIALIZE_NOT_ALLOWED | = lv_initialize_not_allowed | |
| SMSG_IDENTIFICATION | = lv_smsg_identification | |
| EXCEPTIONS | ||
| MESSAGE_TYPE_NOT_VALID = 1 | ||
| UNKNOWN_APLID = 2 | ||
| UNKNOWN_OBJECT_ID = 3 | ||
| . " CM_F_INITIALIZE | ||
ABAP code using 7.40 inline data declarations to call FM CM_F_INITIALIZE
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 CMIMSG INTO @DATA(ld_abort_msgty). | ||||
| DATA(ld_abort_msgty) | = 'A'. | |||
| "SELECT single APLID FROM TCMF6 INTO @DATA(ld_aplid). | ||||
| DATA(ld_aplid) | = ' '. | |||
| "SELECT single UZEIT FROM SY INTO @DATA(ld_smsg_identification). | ||||
| DATA(ld_msg_on_screen) | = ' '. | |||
| "SELECT single OBJECT_ID FROM TCMF5 INTO @DATA(ld_object_id). | ||||
| DATA(ld_object_id) | = ' '. | |||
| DATA(ld_ocs_activ) | = ' '. | |||
| DATA(ld_refresh_old_log) | = 'X'. | |||
| DATA(ld_smsg_initialize) | = ' '. | |||
| DATA(ld_no_other_initialize) | = ' '. | |||
| DATA(ld_no_display_on_abort) | = ' '. | |||
Search for further information about these or an SAP related objects