SAP CTHE_CHARACT_VALUE_F4 Function Module for
CTHE_CHARACT_VALUE_F4 is a standard cthe charact value f4 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 cthe charact value f4 FM, simply by entering the name CTHE_CHARACT_VALUE_F4 into the relevant SAP transaction such as SE37 or SE38.
Function Group: CTHE
Program Name: SAPLCTHE
Main Program: SAPLCTHE
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CTHE_CHARACT_VALUE_F4 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 'CTHE_CHARACT_VALUE_F4'".
EXPORTING
CHARACT_NAME = "Characteristic Name
* OVERWRITING_KEY = "
* DISPLAY_MODE = "
* KEY_DATE = SY-DATUM "Key Date
IMPORTING
ES_CAWN = "
ES_CAWNT = "
EXCEPTIONS
CHARACT_NOT_FOUND = 1 NO_VALUES_FOUND = 2 VALUE_CONVERSION = 3 CHECK_FUNCTION_ERROR = 4
IMPORTING Parameters details for CTHE_CHARACT_VALUE_F4
CHARACT_NAME - Characteristic Name
Data type: ATNAMOptional: No
Call by Reference: No ( called with pass by value option)
OVERWRITING_KEY -
Data type: ATINNOptional: Yes
Call by Reference: No ( called with pass by value option)
DISPLAY_MODE -
Data type: FLAGOptional: Yes
Call by Reference: No ( called with pass by value option)
KEY_DATE - Key Date
Data type: DATUVDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CTHE_CHARACT_VALUE_F4
ES_CAWN -
Data type: CAWNOptional: No
Call by Reference: No ( called with pass by value option)
ES_CAWNT -
Data type: CAWNTOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
CHARACT_NOT_FOUND - Characteristic Does Not Exist
Data type:Optional: No
Call by Reference: Yes
NO_VALUES_FOUND -
Data type:Optional: No
Call by Reference: Yes
VALUE_CONVERSION -
Data type:Optional: No
Call by Reference: Yes
CHECK_FUNCTION_ERROR -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for CTHE_CHARACT_VALUE_F4 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_cawn | TYPE CAWN, " | |||
| lv_charact_name | TYPE ATNAM, " | |||
| lv_charact_not_found | TYPE ATNAM, " | |||
| lv_es_cawnt | TYPE CAWNT, " | |||
| lv_no_values_found | TYPE CAWNT, " | |||
| lv_overwriting_key | TYPE ATINN, " | |||
| lv_display_mode | TYPE FLAG, " | |||
| lv_value_conversion | TYPE FLAG, " | |||
| lv_key_date | TYPE DATUV, " SY-DATUM | |||
| lv_check_function_error | TYPE DATUV. " |
|   CALL FUNCTION 'CTHE_CHARACT_VALUE_F4' " |
| EXPORTING | ||
| CHARACT_NAME | = lv_charact_name | |
| OVERWRITING_KEY | = lv_overwriting_key | |
| DISPLAY_MODE | = lv_display_mode | |
| KEY_DATE | = lv_key_date | |
| IMPORTING | ||
| ES_CAWN | = lv_es_cawn | |
| ES_CAWNT | = lv_es_cawnt | |
| EXCEPTIONS | ||
| CHARACT_NOT_FOUND = 1 | ||
| NO_VALUES_FOUND = 2 | ||
| VALUE_CONVERSION = 3 | ||
| CHECK_FUNCTION_ERROR = 4 | ||
| . " CTHE_CHARACT_VALUE_F4 | ||
ABAP code using 7.40 inline data declarations to call FM CTHE_CHARACT_VALUE_F4
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_key_date) | = SY-DATUM. | |||
Search for further information about these or an SAP related objects