SAP CTMV_CHARACT_CHANGE_OVERWRITE Function Module for
CTMV_CHARACT_CHANGE_OVERWRITE is a standard ctmv charact change overwrite 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 ctmv charact change overwrite FM, simply by entering the name CTMV_CHARACT_CHANGE_OVERWRITE into the relevant SAP transaction such as SE37 or SE38.
Function Group: CTMV
Program Name: SAPLCTMV
Main Program: SAPLCTMV
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CTMV_CHARACT_CHANGE_OVERWRITE 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 'CTMV_CHARACT_CHANGE_OVERWRITE'".
EXPORTING
CHARACT = "Characteristic name
* CHANGE_NUMBER = "Change number
CHAR_OVWR_INT_IMP = "Internal characteristic number of overwritten characteristic
* RESET_ALL = "Delete all overwrite
* RESET_VALUES = "Delete overwite for values
CHARACT_ID = "ID for overwritten characteristic
* CLASS_IMP = "Class number (internal)
* CLASS_TYPE = "Class type
* KEY_DATE = SY-DATUM "Key Date
IMPORTING
CHAR_OVWR_INT_EXP = "Internal characteristic number of overwritten characteristic
TABLES
* CHARACTERISTIC_DATA = "Master data of characteristic CHARACTERISTIC
* CHARACTERISTIC_VALUES = "Values for overwritten characteristic
* CHARACTERISTIC_VALUES_TEXTS = "Value descriptions for overwritten characteristic
EXCEPTIONS
CHARACT_OVWR_UNKNOWN = 1 ERROR = 2 HIERARCHY = 3
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLCTMV_001 User Exit for Characteristics: Current Data Before Saving Characteristic
IMPORTING Parameters details for CTMV_CHARACT_CHANGE_OVERWRITE
CHARACT - Characteristic name
Data type: CABN-ATNAMOptional: No
Call by Reference: No ( called with pass by value option)
CHANGE_NUMBER - Change number
Data type: CABN-AENNROptional: Yes
Call by Reference: No ( called with pass by value option)
CHAR_OVWR_INT_IMP - Internal characteristic number of overwritten characteristic
Data type: CABN-ATINNOptional: No
Call by Reference: No ( called with pass by value option)
RESET_ALL - Delete all overwrite
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
RESET_VALUES - Delete overwite for values
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
CHARACT_ID - ID for overwritten characteristic
Data type: CABN-ATIDNOptional: No
Call by Reference: No ( called with pass by value option)
CLASS_IMP - Class number (internal)
Data type: KLAH-CLINTOptional: Yes
Call by Reference: No ( called with pass by value option)
CLASS_TYPE - Class type
Data type: KLAH-KLARTOptional: Yes
Call by Reference: No ( called with pass by value option)
KEY_DATE - Key Date
Data type: SY-DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CTMV_CHARACT_CHANGE_OVERWRITE
CHAR_OVWR_INT_EXP - Internal characteristic number of overwritten characteristic
Data type: CABN-ATINNOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CTMV_CHARACT_CHANGE_OVERWRITE
CHARACTERISTIC_DATA - Master data of characteristic CHARACTERISTIC
Data type: CHAR_CHNGOptional: Yes
Call by Reference: No ( called with pass by value option)
CHARACTERISTIC_VALUES - Values for overwritten characteristic
Data type: CHAR_VALSOptional: Yes
Call by Reference: No ( called with pass by value option)
CHARACTERISTIC_VALUES_TEXTS - Value descriptions for overwritten characteristic
Data type: CHV_DESCROptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
CHARACT_OVWR_UNKNOWN - Overwritten characteristic not found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR - An error has occurred: see log
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
HIERARCHY -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for CTMV_CHARACT_CHANGE_OVERWRITE 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_charact | TYPE CABN-ATNAM, " | |||
| lv_char_ovwr_int_exp | TYPE CABN-ATINN, " | |||
| lt_characteristic_data | TYPE STANDARD TABLE OF CHAR_CHNG, " | |||
| lv_charact_ovwr_unknown | TYPE CHAR_CHNG, " | |||
| lv_error | TYPE CHAR_CHNG, " | |||
| lv_change_number | TYPE CABN-AENNR, " | |||
| lt_characteristic_values | TYPE STANDARD TABLE OF CHAR_VALS, " | |||
| lv_hierarchy | TYPE CHAR_VALS, " | |||
| lv_char_ovwr_int_imp | TYPE CABN-ATINN, " | |||
| lt_characteristic_values_texts | TYPE STANDARD TABLE OF CHV_DESCR, " | |||
| lv_reset_all | TYPE CHV_DESCR, " | |||
| lv_reset_values | TYPE CHV_DESCR, " | |||
| lv_charact_id | TYPE CABN-ATIDN, " | |||
| lv_class_imp | TYPE KLAH-CLINT, " | |||
| lv_class_type | TYPE KLAH-KLART, " | |||
| lv_key_date | TYPE SY-DATUM. " SY-DATUM |
|   CALL FUNCTION 'CTMV_CHARACT_CHANGE_OVERWRITE' " |
| EXPORTING | ||
| CHARACT | = lv_charact | |
| CHANGE_NUMBER | = lv_change_number | |
| CHAR_OVWR_INT_IMP | = lv_char_ovwr_int_imp | |
| RESET_ALL | = lv_reset_all | |
| RESET_VALUES | = lv_reset_values | |
| CHARACT_ID | = lv_charact_id | |
| CLASS_IMP | = lv_class_imp | |
| CLASS_TYPE | = lv_class_type | |
| KEY_DATE | = lv_key_date | |
| IMPORTING | ||
| CHAR_OVWR_INT_EXP | = lv_char_ovwr_int_exp | |
| TABLES | ||
| CHARACTERISTIC_DATA | = lt_characteristic_data | |
| CHARACTERISTIC_VALUES | = lt_characteristic_values | |
| CHARACTERISTIC_VALUES_TEXTS | = lt_characteristic_values_texts | |
| EXCEPTIONS | ||
| CHARACT_OVWR_UNKNOWN = 1 | ||
| ERROR = 2 | ||
| HIERARCHY = 3 | ||
| . " CTMV_CHARACT_CHANGE_OVERWRITE | ||
ABAP code using 7.40 inline data declarations to call FM CTMV_CHARACT_CHANGE_OVERWRITE
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 ATNAM FROM CABN INTO @DATA(ld_charact). | ||||
| "SELECT single ATINN FROM CABN INTO @DATA(ld_char_ovwr_int_exp). | ||||
| "SELECT single AENNR FROM CABN INTO @DATA(ld_change_number). | ||||
| "SELECT single ATINN FROM CABN INTO @DATA(ld_char_ovwr_int_imp). | ||||
| "SELECT single ATIDN FROM CABN INTO @DATA(ld_charact_id). | ||||
| "SELECT single CLINT FROM KLAH INTO @DATA(ld_class_imp). | ||||
| "SELECT single KLART FROM KLAH INTO @DATA(ld_class_type). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_key_date). | ||||
| DATA(ld_key_date) | = SY-DATUM. | |||
Search for further information about these or an SAP related objects