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

Function CTHE_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_VALUE_F4'"Possible entries for char. value (F4).
EXPORTING
* I_ATINN = "Internal Characteristic Number
* I_ATNAM = "Characteristic Name
* I_DISPLAY_ONLY = ' ' "Display Only
* I_ONLY_ALLOWED_VALUES = ' ' "
* I_SHOW_DESCRIPTION = ' ' "
* I_KEY_DATE = SY-DATUM "
IMPORTING
E_VALUE = "Characteristic Value
EXCEPTIONS
NO_SELECTION = 1 CHARACT_NOT_FOUND = 2 NO_VALUES_FOUND = 3
IMPORTING Parameters details for CTHE_VALUE_F4
I_ATINN - Internal Characteristic Number
Data type: CABN-ATINNOptional: Yes
Call by Reference: No ( called with pass by value option)
I_ATNAM - Characteristic Name
Data type: CABN-ATNAMOptional: Yes
Call by Reference: No ( called with pass by value option)
I_DISPLAY_ONLY - Display Only
Data type: SY-BATCHDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_ONLY_ALLOWED_VALUES -
Data type: SY-BATCHDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_SHOW_DESCRIPTION -
Data type: SY-BATCHDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_KEY_DATE -
Data type: RMCLS-KEY_DATEDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CTHE_VALUE_F4
E_VALUE - Characteristic Value
Data type: CAWN-ATWRTOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_SELECTION - No Selection
Data type:Optional: No
Call by Reference: Yes
CHARACT_NOT_FOUND - Characteristic does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VALUES_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CTHE_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_e_value | TYPE CAWN-ATWRT, " | |||
| lv_i_atinn | TYPE CABN-ATINN, " | |||
| lv_no_selection | TYPE CABN, " | |||
| lv_i_atnam | TYPE CABN-ATNAM, " | |||
| lv_charact_not_found | TYPE CABN, " | |||
| lv_i_display_only | TYPE SY-BATCH, " SPACE | |||
| lv_no_values_found | TYPE SY, " | |||
| lv_i_only_allowed_values | TYPE SY-BATCH, " SPACE | |||
| lv_i_show_description | TYPE SY-BATCH, " SPACE | |||
| lv_i_key_date | TYPE RMCLS-KEY_DATE. " SY-DATUM |
|   CALL FUNCTION 'CTHE_VALUE_F4' "Possible entries for char. value (F4) |
| EXPORTING | ||
| I_ATINN | = lv_i_atinn | |
| I_ATNAM | = lv_i_atnam | |
| I_DISPLAY_ONLY | = lv_i_display_only | |
| I_ONLY_ALLOWED_VALUES | = lv_i_only_allowed_values | |
| I_SHOW_DESCRIPTION | = lv_i_show_description | |
| I_KEY_DATE | = lv_i_key_date | |
| IMPORTING | ||
| E_VALUE | = lv_e_value | |
| EXCEPTIONS | ||
| NO_SELECTION = 1 | ||
| CHARACT_NOT_FOUND = 2 | ||
| NO_VALUES_FOUND = 3 | ||
| . " CTHE_VALUE_F4 | ||
ABAP code using 7.40 inline data declarations to call FM CTHE_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.| "SELECT single ATWRT FROM CAWN INTO @DATA(ld_e_value). | ||||
| "SELECT single ATINN FROM CABN INTO @DATA(ld_i_atinn). | ||||
| "SELECT single ATNAM FROM CABN INTO @DATA(ld_i_atnam). | ||||
| "SELECT single BATCH FROM SY INTO @DATA(ld_i_display_only). | ||||
| DATA(ld_i_display_only) | = ' '. | |||
| "SELECT single BATCH FROM SY INTO @DATA(ld_i_only_allowed_values). | ||||
| DATA(ld_i_only_allowed_values) | = ' '. | |||
| "SELECT single BATCH FROM SY INTO @DATA(ld_i_show_description). | ||||
| DATA(ld_i_show_description) | = ' '. | |||
| "SELECT single KEY_DATE FROM RMCLS INTO @DATA(ld_i_key_date). | ||||
| DATA(ld_i_key_date) | = SY-DATUM. | |||
Search for further information about these or an SAP related objects