SAP MR_CHECK_TOLERANCE Function Module for NOTRANSL: Prüfung der Toleranzgrenzen
MR_CHECK_TOLERANCE is a standard mr check tolerance 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: Prüfung der Toleranzgrenzen 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 mr check tolerance FM, simply by entering the name MR_CHECK_TOLERANCE into the relevant SAP transaction such as SE37 or SE38.
Function Group: KONT
Program Name: SAPLKONT
Main Program: SAPLKONT
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MR_CHECK_TOLERANCE 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 'MR_CHECK_TOLERANCE'"NOTRANSL: Prüfung der Toleranzgrenzen.
EXPORTING
AKTUELLER_WERT = "Value for which the tolerance limit is to be checked
BUCHUNGSKREIS = "Company code of document header
* HSWAERS = ' ' "
* KURS = 0 "
TOLERANZ_SCHLUESSEL = "Key for table of tolerance limits
* UMRECHNUNG = 'X' "
VERGLEICHSWERT = "Value used to compare
* WAEHRUNG = ' ' "
* WERTSTELLUNG = ' ' "
IMPORTING
BETRAG = "Upper/lower tolerance limit as fixed value
PROZENTE = "Upper/lower tolerance limit in percent
RETURNCODE = "Return code
SPERRGRUND = "Indicator: set block criterion?
EXCEPTIONS
TOLERANCE_NOT_ACTIVE = 1
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLKONT_001 User Exit Before MR_CHECK_TOLERANCE
EXIT_SAPLKONT_002 Customer Exit: Change Tolerance Check - Conventional Invoice Verification
EXIT_SAPLKONT_011 Account Grouping for GR/IR Account Determination
EXIT_SAPLKONT_412 Brazil: User Exit to determination Acct Modif.for 3rd NF for F. Del.
IMPORTING Parameters details for MR_CHECK_TOLERANCE
AKTUELLER_WERT - Value for which the tolerance limit is to be checked
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
BUCHUNGSKREIS - Company code of document header
Data type: T001-BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
HSWAERS -
Data type: T001-WAERSDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
KURS -
Data type: BKPF-KURSFOptional: Yes
Call by Reference: No ( called with pass by value option)
TOLERANZ_SCHLUESSEL - Key for table of tolerance limits
Data type: T169G-TOLSLOptional: No
Call by Reference: No ( called with pass by value option)
UMRECHNUNG -
Data type:Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
VERGLEICHSWERT - Value used to compare
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WAEHRUNG -
Data type: BKPF-WAERSDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
WERTSTELLUNG -
Data type: BKPF-WWERTDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for MR_CHECK_TOLERANCE
BETRAG - Upper/lower tolerance limit as fixed value
Data type: BSEG-WRBTROptional: No
Call by Reference: No ( called with pass by value option)
PROZENTE - Upper/lower tolerance limit in percent
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RETURNCODE - Return code
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SPERRGRUND - Indicator: set block criterion?
Data type: BSEG-SPGRPOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
TOLERANCE_NOT_ACTIVE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MR_CHECK_TOLERANCE 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_betrag | TYPE BSEG-WRBTR, " | |||
| lv_aktueller_wert | TYPE BSEG, " | |||
| lv_tolerance_not_active | TYPE BSEG, " | |||
| lv_prozente | TYPE BSEG, " | |||
| lv_buchungskreis | TYPE T001-BUKRS, " | |||
| lv_hswaers | TYPE T001-WAERS, " ' ' | |||
| lv_returncode | TYPE T001, " | |||
| lv_kurs | TYPE BKPF-KURSF, " 0 | |||
| lv_sperrgrund | TYPE BSEG-SPGRP, " | |||
| lv_toleranz_schluessel | TYPE T169G-TOLSL, " | |||
| lv_umrechnung | TYPE T169G, " 'X' | |||
| lv_vergleichswert | TYPE T169G, " | |||
| lv_waehrung | TYPE BKPF-WAERS, " ' ' | |||
| lv_wertstellung | TYPE BKPF-WWERT. " ' ' |
|   CALL FUNCTION 'MR_CHECK_TOLERANCE' "NOTRANSL: Prüfung der Toleranzgrenzen |
| EXPORTING | ||
| AKTUELLER_WERT | = lv_aktueller_wert | |
| BUCHUNGSKREIS | = lv_buchungskreis | |
| HSWAERS | = lv_hswaers | |
| KURS | = lv_kurs | |
| TOLERANZ_SCHLUESSEL | = lv_toleranz_schluessel | |
| UMRECHNUNG | = lv_umrechnung | |
| VERGLEICHSWERT | = lv_vergleichswert | |
| WAEHRUNG | = lv_waehrung | |
| WERTSTELLUNG | = lv_wertstellung | |
| IMPORTING | ||
| BETRAG | = lv_betrag | |
| PROZENTE | = lv_prozente | |
| RETURNCODE | = lv_returncode | |
| SPERRGRUND | = lv_sperrgrund | |
| EXCEPTIONS | ||
| TOLERANCE_NOT_ACTIVE = 1 | ||
| . " MR_CHECK_TOLERANCE | ||
ABAP code using 7.40 inline data declarations to call FM MR_CHECK_TOLERANCE
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 WRBTR FROM BSEG INTO @DATA(ld_betrag). | ||||
| "SELECT single BUKRS FROM T001 INTO @DATA(ld_buchungskreis). | ||||
| "SELECT single WAERS FROM T001 INTO @DATA(ld_hswaers). | ||||
| DATA(ld_hswaers) | = ' '. | |||
| "SELECT single KURSF FROM BKPF INTO @DATA(ld_kurs). | ||||
| "SELECT single SPGRP FROM BSEG INTO @DATA(ld_sperrgrund). | ||||
| "SELECT single TOLSL FROM T169G INTO @DATA(ld_toleranz_schluessel). | ||||
| DATA(ld_umrechnung) | = 'X'. | |||
| "SELECT single WAERS FROM BKPF INTO @DATA(ld_waehrung). | ||||
| DATA(ld_waehrung) | = ' '. | |||
| "SELECT single WWERT FROM BKPF INTO @DATA(ld_wertstellung). | ||||
| DATA(ld_wertstellung) | = ' '. | |||
Search for further information about these or an SAP related objects