SAP ESR_NUMBER_CHECK Function Module for Check of PBC/POR number









ESR_NUMBER_CHECK is a standard esr number check SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Check of PBC/POR 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 esr number check FM, simply by entering the name ESR_NUMBER_CHECK into the relevant SAP transaction such as SE37 or SE38.

Function Group: SSRV
Program Name: SAPLSSRV
Main Program: SAPLSSRV
Appliation area:
Release date: 14-Apr-1998
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function ESR_NUMBER_CHECK 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 'ESR_NUMBER_CHECK'"Check of PBC/POR number
EXPORTING
* AMOUNT = 0 "Amount
* CASH_DISCOUNT = 0 "Cash discount amount
COUNTRY = "Country Key
* ESR_CHECK_DIGIT = ' ' "Check digit
* ESR_NUMBER = ' ' "ISR number
* ESR_REF_NUMBER = ' ' "POR reference number
* PAYMENT_TERMS1 = 0 "Payment term 1

IMPORTING
ESR_CHECK_DIGIT = "Check digit

EXCEPTIONS
NOT_VALID = 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_SAPLSSRV_001 Check of bank account number: User exit for checking entries
EXIT_SAPLSSRV_002 Check of bank account number: User exit for checking entries
EXIT_SAPLSSRV_003 User Exit: Bank Data Checks (SAPLSSRV)

IMPORTING Parameters details for ESR_NUMBER_CHECK

AMOUNT - Amount

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

CASH_DISCOUNT - Cash discount amount

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

COUNTRY - Country Key

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

ESR_CHECK_DIGIT - Check digit

Data type: FIINTERFACE-ESRPZ
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

ESR_NUMBER - ISR number

Data type: FIINTERFACE-ESRNR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

ESR_REF_NUMBER - POR reference number

Data type: FIINTERFACE-ESRRE
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

PAYMENT_TERMS1 - Payment term 1

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

EXPORTING Parameters details for ESR_NUMBER_CHECK

ESR_CHECK_DIGIT - Check digit

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

EXCEPTIONS details

NOT_VALID - Check not successful

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

Copy and paste ABAP code example for ESR_NUMBER_CHECK 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_amount  TYPE FIINTERFACE-DMBTR, "   0
lv_not_valid  TYPE FIINTERFACE, "   
lv_esr_check_digit  TYPE FIINTERFACE-ESRPZ, "   
lv_cash_discount  TYPE FIINTERFACE-SKNTO, "   0
lv_country  TYPE T005-LAND1, "   
lv_esr_check_digit  TYPE FIINTERFACE-ESRPZ, "   SPACE
lv_esr_number  TYPE FIINTERFACE-ESRNR, "   SPACE
lv_esr_ref_number  TYPE FIINTERFACE-ESRRE, "   SPACE
lv_payment_terms1  TYPE FIINTERFACE-ZBDXP. "   0

  CALL FUNCTION 'ESR_NUMBER_CHECK'  "Check of PBC/POR number
    EXPORTING
         AMOUNT = lv_amount
         CASH_DISCOUNT = lv_cash_discount
         COUNTRY = lv_country
         ESR_CHECK_DIGIT = lv_esr_check_digit
         ESR_NUMBER = lv_esr_number
         ESR_REF_NUMBER = lv_esr_ref_number
         PAYMENT_TERMS1 = lv_payment_terms1
    IMPORTING
         ESR_CHECK_DIGIT = lv_esr_check_digit
    EXCEPTIONS
        NOT_VALID = 1
. " ESR_NUMBER_CHECK




ABAP code using 7.40 inline data declarations to call FM ESR_NUMBER_CHECK

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 DMBTR FROM FIINTERFACE INTO @DATA(ld_amount).
 
 
"SELECT single ESRPZ FROM FIINTERFACE INTO @DATA(ld_esr_check_digit).
 
"SELECT single SKNTO FROM FIINTERFACE INTO @DATA(ld_cash_discount).
 
"SELECT single LAND1 FROM T005 INTO @DATA(ld_country).
 
"SELECT single ESRPZ FROM FIINTERFACE INTO @DATA(ld_esr_check_digit).
DATA(ld_esr_check_digit) = ' '.
 
"SELECT single ESRNR FROM FIINTERFACE INTO @DATA(ld_esr_number).
DATA(ld_esr_number) = ' '.
 
"SELECT single ESRRE FROM FIINTERFACE INTO @DATA(ld_esr_ref_number).
DATA(ld_esr_ref_number) = ' '.
 
"SELECT single ZBDXP FROM FIINTERFACE INTO @DATA(ld_payment_terms1).
 


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!