SAP LE_CHECK_DIGIT_CALCULATION Function Module for NOTRANSL: Berechnung von Prüfziffern
LE_CHECK_DIGIT_CALCULATION is a standard le check digit calculation SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Berechnung von Prüfziffern 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 le check digit calculation FM, simply by entering the name LE_CHECK_DIGIT_CALCULATION into the relevant SAP transaction such as SE37 or SE38.
Function Group: LE_BARCODE
Program Name: SAPLLE_BARCODE
Main Program: SAPLLE_BARCODE
Appliation area: V
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function LE_CHECK_DIGIT_CALCULATION 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 'LE_CHECK_DIGIT_CALCULATION'"NOTRANSL: Berechnung von Prüfziffern.
EXPORTING
IF_NUMBER_WO_CHECK_DIGIT = "Generic Type
* IF_CALC_METHOD = 'A' "Check digit proced.
* IF_USER_CALC_METHOD = "Generic Type
* IF_ONLY_CHECKING = ' ' "Data element for domain BOOLE: TRUE (='X') and FALSE (=' ')
IMPORTING
EF_NUMBER_W_CHECK_DIGIT = "Generic Type
EF_CHECK_DIGIT_OK = "Data element for domain BOOLE: TRUE (='X') and FALSE (=' ')
EF_CHECK_DIGIT = "Check Digit
EXCEPTIONS
INVALID_PARAMETER = 1
IMPORTING Parameters details for LE_CHECK_DIGIT_CALCULATION
IF_NUMBER_WO_CHECK_DIGIT - Generic Type
Data type: COptional: No
Call by Reference: No ( called with pass by value option)
IF_CALC_METHOD - Check digit proced.
Data type: LE_CHECK_DIGIT_METHODDefault: 'A'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IF_USER_CALC_METHOD - Generic Type
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
IF_ONLY_CHECKING - Data element for domain BOOLE: TRUE (='X') and FALSE (=' ')
Data type: BOOLE_DDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for LE_CHECK_DIGIT_CALCULATION
EF_NUMBER_W_CHECK_DIGIT - Generic Type
Data type: COptional: No
Call by Reference: Yes
EF_CHECK_DIGIT_OK - Data element for domain BOOLE: TRUE (='X') and FALSE (=' ')
Data type: BOOLE_DOptional: No
Call by Reference: Yes
EF_CHECK_DIGIT - Check Digit
Data type: COptional: No
Call by Reference: Yes
EXCEPTIONS details
INVALID_PARAMETER - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for LE_CHECK_DIGIT_CALCULATION 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_invalid_parameter | TYPE STRING, " | |||
| lv_ef_number_w_check_digit | TYPE C, " | |||
| lv_if_number_wo_check_digit | TYPE C, " | |||
| lv_if_calc_method | TYPE LE_CHECK_DIGIT_METHOD, " 'A' | |||
| lv_ef_check_digit_ok | TYPE BOOLE_D, " | |||
| lv_ef_check_digit | TYPE C, " | |||
| lv_if_user_calc_method | TYPE C, " | |||
| lv_if_only_checking | TYPE BOOLE_D. " ' ' |
|   CALL FUNCTION 'LE_CHECK_DIGIT_CALCULATION' "NOTRANSL: Berechnung von Prüfziffern |
| EXPORTING | ||
| IF_NUMBER_WO_CHECK_DIGIT | = lv_if_number_wo_check_digit | |
| IF_CALC_METHOD | = lv_if_calc_method | |
| IF_USER_CALC_METHOD | = lv_if_user_calc_method | |
| IF_ONLY_CHECKING | = lv_if_only_checking | |
| IMPORTING | ||
| EF_NUMBER_W_CHECK_DIGIT | = lv_ef_number_w_check_digit | |
| EF_CHECK_DIGIT_OK | = lv_ef_check_digit_ok | |
| EF_CHECK_DIGIT | = lv_ef_check_digit | |
| EXCEPTIONS | ||
| INVALID_PARAMETER = 1 | ||
| . " LE_CHECK_DIGIT_CALCULATION | ||
ABAP code using 7.40 inline data declarations to call FM LE_CHECK_DIGIT_CALCULATION
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_if_calc_method) | = 'A'. | |||
| DATA(ld_if_only_checking) | = ' '. | |||
Search for further information about these or an SAP related objects