SAP CRM_CMG_ADDNOTES Function Module for Create Automatic Case Note
CRM_CMG_ADDNOTES is a standard crm cmg addnotes SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create Automatic Case Note 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 crm cmg addnotes FM, simply by entering the name CRM_CMG_ADDNOTES into the relevant SAP transaction such as SE37 or SE38.
Function Group: CRM_CMG_CASE_NOTE
Program Name: SAPLCRM_CMG_CASE_NOTE
Main Program: SAPLCRM_CMG_CASE_NOTE
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function CRM_CMG_ADDNOTES 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 'CRM_CMG_ADDNOTES'"Create Automatic Case Note.
EXPORTING
* IV_CASE_GUID = "Internal Case GUID
* IV_MSGV1 = "Message Variable
* IV_MSGV2 = "Message Variable
* IV_MSGV3 = "Message Variable
* IV_MSGV4 = "Message Variable
* IT_CRMT_ATTR_NAME_VALUE_T = "Attribute Name Value
* IV_COMMIT_WORK = '' "Execute Commit Work
* IV_EXT_KEY = "External Case ID
IV_TDSPRAS = "Language of Note to Be Created
IV_TDID = "Text ID of Note to Be Created
* IV_TDTITLE = "Title of Note to Be Created
* IV_LONGTEXT = "Content of Note to Be Created
* IV_TDLUSER = "Created By
* IV_MSGNR = "Message Number
* IV_ARBGB = "Message Class
IMPORTING
ES_RETURN = "Return Parameter
ET_RETURN = "Return parameter table
IMPORTING Parameters details for CRM_CMG_ADDNOTES
IV_CASE_GUID - Internal Case GUID
Data type: SCMG_CASE_GUIDOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_MSGV1 - Message Variable
Data type: SYMSGVOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_MSGV2 - Message Variable
Data type: SYMSGVOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_MSGV3 - Message Variable
Data type: SYMSGVOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_MSGV4 - Message Variable
Data type: SYMSGVOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_CRMT_ATTR_NAME_VALUE_T - Attribute Name Value
Data type: CRMT_ATTR_NAME_VALUE_TOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_COMMIT_WORK - Execute Commit Work
Data type: XFLAGDefault: ''
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_EXT_KEY - External Case ID
Data type: SCMG_EXT_KEYOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_TDSPRAS - Language of Note to Be Created
Data type: SPRASOptional: No
Call by Reference: No ( called with pass by value option)
IV_TDID - Text ID of Note to Be Created
Data type: TDIDOptional: No
Call by Reference: No ( called with pass by value option)
IV_TDTITLE - Title of Note to Be Created
Data type: TDTITLEOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_LONGTEXT - Content of Note to Be Created
Data type: STRINGOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_TDLUSER - Created By
Data type: TDFUSEROptional: Yes
Call by Reference: No ( called with pass by value option)
IV_MSGNR - Message Number
Data type: MSGNROptional: Yes
Call by Reference: No ( called with pass by value option)
IV_ARBGB - Message Class
Data type: ARBGBOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CRM_CMG_ADDNOTES
ES_RETURN - Return Parameter
Data type: BAPIRET2Optional: No
Call by Reference: No ( called with pass by value option)
ET_RETURN - Return parameter table
Data type: BAPIRETTABOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CRM_CMG_ADDNOTES 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_es_return | TYPE BAPIRET2, " | |||
| lv_iv_case_guid | TYPE SCMG_CASE_GUID, " | |||
| lv_iv_msgv1 | TYPE SYMSGV, " | |||
| lv_iv_msgv2 | TYPE SYMSGV, " | |||
| lv_iv_msgv3 | TYPE SYMSGV, " | |||
| lv_iv_msgv4 | TYPE SYMSGV, " | |||
| lv_it_crmt_attr_name_value_t | TYPE CRMT_ATTR_NAME_VALUE_T, " | |||
| lv_iv_commit_work | TYPE XFLAG, " '' | |||
| lv_et_return | TYPE BAPIRETTAB, " | |||
| lv_iv_ext_key | TYPE SCMG_EXT_KEY, " | |||
| lv_iv_tdspras | TYPE SPRAS, " | |||
| lv_iv_tdid | TYPE TDID, " | |||
| lv_iv_tdtitle | TYPE TDTITLE, " | |||
| lv_iv_longtext | TYPE STRING, " | |||
| lv_iv_tdluser | TYPE TDFUSER, " | |||
| lv_iv_msgnr | TYPE MSGNR, " | |||
| lv_iv_arbgb | TYPE ARBGB. " |
|   CALL FUNCTION 'CRM_CMG_ADDNOTES' "Create Automatic Case Note |
| EXPORTING | ||
| IV_CASE_GUID | = lv_iv_case_guid | |
| IV_MSGV1 | = lv_iv_msgv1 | |
| IV_MSGV2 | = lv_iv_msgv2 | |
| IV_MSGV3 | = lv_iv_msgv3 | |
| IV_MSGV4 | = lv_iv_msgv4 | |
| IT_CRMT_ATTR_NAME_VALUE_T | = lv_it_crmt_attr_name_value_t | |
| IV_COMMIT_WORK | = lv_iv_commit_work | |
| IV_EXT_KEY | = lv_iv_ext_key | |
| IV_TDSPRAS | = lv_iv_tdspras | |
| IV_TDID | = lv_iv_tdid | |
| IV_TDTITLE | = lv_iv_tdtitle | |
| IV_LONGTEXT | = lv_iv_longtext | |
| IV_TDLUSER | = lv_iv_tdluser | |
| IV_MSGNR | = lv_iv_msgnr | |
| IV_ARBGB | = lv_iv_arbgb | |
| IMPORTING | ||
| ES_RETURN | = lv_es_return | |
| ET_RETURN | = lv_et_return | |
| . " CRM_CMG_ADDNOTES | ||
ABAP code using 7.40 inline data declarations to call FM CRM_CMG_ADDNOTES
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_iv_commit_work) | = ''. | |||
Search for further information about these or an SAP related objects