SAP CHAR_VALUE_CONVERSION_EXIT Function Module for Edititing CHAR Characteristic Value via Conversion Exit









CHAR_VALUE_CONVERSION_EXIT is a standard char value conversion exit SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Edititing CHAR Characteristic Value via Conversion Exit 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 char value conversion exit FM, simply by entering the name CHAR_VALUE_CONVERSION_EXIT into the relevant SAP transaction such as SE37 or SE38.

Function Group: C5CH
Program Name: SAPLC5CH
Main Program:
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CHAR_VALUE_CONVERSION_EXIT 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 'CHAR_VALUE_CONVERSION_EXIT'"Edititing CHAR Characteristic Value via Conversion Exit
EXPORTING
CONV_MODE_IMP = "Conversion mode ('O'=Output, 'I'=Input)
* FLG_CHAR_DATA_PROVIDE_IMP = 'X' "Flag, read characteristic data
ATINN_IMP = "Charact.
* ATKON_IMP = "Conversion exit for characteristic value
* ANZST_IMP = 0 "Number of characters
ATWRTSHOW_IMP = "Old characteristic value

IMPORTING
ATWRTSHOW_EXP = "New characteristic value

EXCEPTIONS
WRONG_CONV_MODE = 1 NECESSARY_PARAMS_NOT_GIVEN = 2 COULD_NOT_READ_CHAR_DATA = 3 FUNC_CONV_EXIT_NOT_FOUND = 4 ERROR_CONV_EXIT = 5
.



IMPORTING Parameters details for CHAR_VALUE_CONVERSION_EXIT

CONV_MODE_IMP - Conversion mode ('O'=Output, 'I'=Input)

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

FLG_CHAR_DATA_PROVIDE_IMP - Flag, read characteristic data

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

ATINN_IMP - Charact.

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

ATKON_IMP - Conversion exit for characteristic value

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

ANZST_IMP - Number of characters

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

ATWRTSHOW_IMP - Old characteristic value

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

EXPORTING Parameters details for CHAR_VALUE_CONVERSION_EXIT

ATWRTSHOW_EXP - New characteristic value

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

EXCEPTIONS details

WRONG_CONV_MODE - Unauthorized conversion mode

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

NECESSARY_PARAMS_NOT_GIVEN - Required parameters not transferred

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

COULD_NOT_READ_CHAR_DATA - Could not read characteristic data

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

FUNC_CONV_EXIT_NOT_FOUND - Could not find FM for conversion exit

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

ERROR_CONV_EXIT - Error after calling conversion exit

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

Copy and paste ABAP code example for CHAR_VALUE_CONVERSION_EXIT 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_atwrtshow_exp  TYPE CAWN-ATWRT, "   
lv_conv_mode_imp  TYPE SY-DATAR, "   
lv_wrong_conv_mode  TYPE SY, "   
lv_flg_char_data_provide_imp  TYPE FLAG, "   'X'
lv_necessary_params_not_given  TYPE FLAG, "   
lv_atinn_imp  TYPE CABN-ATINN, "   
lv_could_not_read_char_data  TYPE CABN, "   
lv_atkon_imp  TYPE CABN-ATKON, "   
lv_func_conv_exit_not_found  TYPE CABN, "   
lv_anzst_imp  TYPE CABN-ANZST, "   0
lv_error_conv_exit  TYPE CABN, "   
lv_atwrtshow_imp  TYPE CAWN-ATWRT. "   

  CALL FUNCTION 'CHAR_VALUE_CONVERSION_EXIT'  "Edititing CHAR Characteristic Value via Conversion Exit
    EXPORTING
         CONV_MODE_IMP = lv_conv_mode_imp
         FLG_CHAR_DATA_PROVIDE_IMP = lv_flg_char_data_provide_imp
         ATINN_IMP = lv_atinn_imp
         ATKON_IMP = lv_atkon_imp
         ANZST_IMP = lv_anzst_imp
         ATWRTSHOW_IMP = lv_atwrtshow_imp
    IMPORTING
         ATWRTSHOW_EXP = lv_atwrtshow_exp
    EXCEPTIONS
        WRONG_CONV_MODE = 1
        NECESSARY_PARAMS_NOT_GIVEN = 2
        COULD_NOT_READ_CHAR_DATA = 3
        FUNC_CONV_EXIT_NOT_FOUND = 4
        ERROR_CONV_EXIT = 5
. " CHAR_VALUE_CONVERSION_EXIT




ABAP code using 7.40 inline data declarations to call FM CHAR_VALUE_CONVERSION_EXIT

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_atwrtshow_exp).
 
"SELECT single DATAR FROM SY INTO @DATA(ld_conv_mode_imp).
 
 
DATA(ld_flg_char_data_provide_imp) = 'X'.
 
 
"SELECT single ATINN FROM CABN INTO @DATA(ld_atinn_imp).
 
 
"SELECT single ATKON FROM CABN INTO @DATA(ld_atkon_imp).
 
 
"SELECT single ANZST FROM CABN INTO @DATA(ld_anzst_imp).
 
 
"SELECT single ATWRT FROM CAWN INTO @DATA(ld_atwrtshow_imp).
 


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!