SAP CHECK_AND_CONVERT_NUMERICS Function Module for Checks whether a value is numeric and converts to a packed number
CHECK_AND_CONVERT_NUMERICS is a standard check and convert numerics SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Checks whether a value is numeric and converts to a packed number 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 check and convert numerics FM, simply by entering the name CHECK_AND_CONVERT_NUMERICS into the relevant SAP transaction such as SE37 or SE38.
Function Group: CCAD
Program Name: SAPLCCAD
Main Program: SAPLCCAD
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CHECK_AND_CONVERT_NUMERICS 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 'CHECK_AND_CONVERT_NUMERICS'"Checks whether a value is numeric and converts to a packed number.
EXPORTING
* DFELD = ' ' "Name of DDIC field
DMZEI = "Decimal points '.' or ','
DTYPE = "Data type of screen field
* DYPNO = ' ' "Screen number
EFELD = "Field with value in character format
* FNAME = ' ' "Screen field name
* PROGR = ' ' "Program name
* IMP_DECIMALS = '0' "Explicit entry of decimal places (without DFELD)
IMPORTING
ERROR = "Indicator for error message
IFELD = "Wert in packed format
MESSG = "Message
MSGLN = "Length of message
IMPORTING Parameters details for CHECK_AND_CONVERT_NUMERICS
DFELD - Name of DDIC field
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DMZEI - Decimal points '.' or ','
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DTYPE - Data type of screen field
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
DYPNO - Screen number
Data type: D020S-DNUMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EFELD - Field with value in character format
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FNAME - Screen field name
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PROGR - Program name
Data type: D020S-PROGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IMP_DECIMALS - Explicit entry of decimal places (without DFELD)
Data type:Default: '0'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CHECK_AND_CONVERT_NUMERICS
ERROR - Indicator for error message
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
IFELD - Wert in packed format
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MESSG - Message
Data type: MESSAGEOptional: No
Call by Reference: No ( called with pass by value option)
MSGLN - Length of message
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CHECK_AND_CONVERT_NUMERICS 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_dfeld | TYPE STRING, " SPACE | |||
| lv_error | TYPE STRING, " | |||
| lv_dmzei | TYPE STRING, " | |||
| lv_ifeld | TYPE STRING, " | |||
| lv_dtype | TYPE STRING, " | |||
| lv_messg | TYPE MESSAGE, " | |||
| lv_dypno | TYPE D020S-DNUM, " SPACE | |||
| lv_msgln | TYPE D020S, " | |||
| lv_efeld | TYPE D020S, " | |||
| lv_fname | TYPE D020S, " SPACE | |||
| lv_progr | TYPE D020S-PROG, " SPACE | |||
| lv_imp_decimals | TYPE D020S. " '0' |
|   CALL FUNCTION 'CHECK_AND_CONVERT_NUMERICS' "Checks whether a value is numeric and converts to a packed number |
| EXPORTING | ||
| DFELD | = lv_dfeld | |
| DMZEI | = lv_dmzei | |
| DTYPE | = lv_dtype | |
| DYPNO | = lv_dypno | |
| EFELD | = lv_efeld | |
| FNAME | = lv_fname | |
| PROGR | = lv_progr | |
| IMP_DECIMALS | = lv_imp_decimals | |
| IMPORTING | ||
| ERROR | = lv_error | |
| IFELD | = lv_ifeld | |
| MESSG | = lv_messg | |
| MSGLN | = lv_msgln | |
| . " CHECK_AND_CONVERT_NUMERICS | ||
ABAP code using 7.40 inline data declarations to call FM CHECK_AND_CONVERT_NUMERICS
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_dfeld) | = ' '. | |||
| "SELECT single DNUM FROM D020S INTO @DATA(ld_dypno). | ||||
| DATA(ld_dypno) | = ' '. | |||
| DATA(ld_fname) | = ' '. | |||
| "SELECT single PROG FROM D020S INTO @DATA(ld_progr). | ||||
| DATA(ld_progr) | = ' '. | |||
| DATA(ld_imp_decimals) | = '0'. | |||
Search for further information about these or an SAP related objects