SAP CUTC_MSG Function Module for









CUTC_MSG is a standard cutc msg SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 cutc msg FM, simply by entering the name CUTC_MSG into the relevant SAP transaction such as SE37 or SE38.

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



Function CUTC_MSG 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 'CUTC_MSG'"
EXPORTING
* AREA = "Application
MSGNR = "Message number
MSGLEVEL = "Weighting of message (I, W, E)
* LANG = SY-LANGU "Language
* ARG1 = ' ' "First substitute value
* ARG2 = ' ' "Second substitute value
* ARG3 = ' ' "Third substitute value
* ARG4 = ' ' "Fourth substitute value
MODULE = "Author module of message

EXCEPTIONS
MSG_NOT_FOUND = 1 INTERNAL_ERROR = 2 ERROR = 3 ABEND = 4
.



IMPORTING Parameters details for CUTC_MSG

AREA - Application

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

MSGNR - Message number

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

MSGLEVEL - Weighting of message (I, W, E)

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

LANG - Language

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

ARG1 - First substitute value

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

ARG2 - Second substitute value

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

ARG3 - Third substitute value

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

ARG4 - Fourth substitute value

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

MODULE - Author module of message

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

EXCEPTIONS details

MSG_NOT_FOUND - Message text not found

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

INTERNAL_ERROR - Internal processing error displaying message

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

ERROR - Error has occurred

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

ABEND -

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

Copy and paste ABAP code example for CUTC_MSG 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_area  TYPE T100-ARBGB, "   
lv_msg_not_found  TYPE T100, "   
lv_msgnr  TYPE T100-MSGNR, "   
lv_internal_error  TYPE T100, "   
lv_error  TYPE T100, "   
lv_msglevel  TYPE T100, "   
lv_lang  TYPE SY-LANGU, "   SY-LANGU
lv_abend  TYPE SY, "   
lv_arg1  TYPE SY, "   SPACE
lv_arg2  TYPE SY, "   SPACE
lv_arg3  TYPE SY, "   SPACE
lv_arg4  TYPE SY, "   SPACE
lv_module  TYPE RCUTC-MODULE. "   

  CALL FUNCTION 'CUTC_MSG'  "
    EXPORTING
         AREA = lv_area
         MSGNR = lv_msgnr
         MSGLEVEL = lv_msglevel
         LANG = lv_lang
         ARG1 = lv_arg1
         ARG2 = lv_arg2
         ARG3 = lv_arg3
         ARG4 = lv_arg4
         MODULE = lv_module
    EXCEPTIONS
        MSG_NOT_FOUND = 1
        INTERNAL_ERROR = 2
        ERROR = 3
        ABEND = 4
. " CUTC_MSG




ABAP code using 7.40 inline data declarations to call FM CUTC_MSG

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 ARBGB FROM T100 INTO @DATA(ld_area).
 
 
"SELECT single MSGNR FROM T100 INTO @DATA(ld_msgnr).
 
 
 
 
"SELECT single LANGU FROM SY INTO @DATA(ld_lang).
DATA(ld_lang) = SY-LANGU.
 
 
DATA(ld_arg1) = ' '.
 
DATA(ld_arg2) = ' '.
 
DATA(ld_arg3) = ' '.
 
DATA(ld_arg4) = ' '.
 
"SELECT single MODULE FROM RCUTC INTO @DATA(ld_module).
 


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!