SAP VB_CHECK_BATCH_NUMBER Function Module for









VB_CHECK_BATCH_NUMBER is a standard vb check batch number SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 vb check batch number FM, simply by entering the name VB_CHECK_BATCH_NUMBER into the relevant SAP transaction such as SE37 or SE38.

Function Group: V01Z
Program Name: SAPLV01Z
Main Program: SAPLV01Z
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function VB_CHECK_BATCH_NUMBER 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 'VB_CHECK_BATCH_NUMBER'"
EXPORTING
NEW_CHARG = "
* X_BNCOM = "
* CHECK_EXTERNAL = 'X' "
* CHECK_CUSTOMER = 'X' "

EXCEPTIONS
NO_BATCH = 1 INTERVAL_NOT_FOUND = 2 NUMBER_RANGE_NOT_EXTERN = 3 OBJECT_NOT_FOUND = 4 ERROR_CHECK_BATCH_NUMBER = 5 NO_EXTERNAL_NUMBER = 6 NO_CUSTOMER_NUMBER = 7
.




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_SAPLV01Z_001 Determination of Internal Number Ranges for Automatic Batch Number
EXIT_SAPLV01Z_002 Modification of New Batch Numbers (from Internal Assignment)
EXIT_SAPLV01Z_003 Determination of External Number Ranges for Batch Number
EXIT_SAPLV01Z_004 Check New Batch Number According to Customer Rule
EXIT_SAPLV01Z_005 Check Batch Status if Change Carried Out
EXIT_SAPLV01Z_006 Check Batch Valuation if Change Carried Out
EXIT_SAPLV01Z_011 Create Determination of Source Batch
EXIT_SAPLV01Z_012 Type of Batch Classification
EXIT_SAPLV01Z_013 Master Data Maintenance for Batches
EXIT_SAPLV01Z_014 Enhanced Classification for Batches

IMPORTING Parameters details for VB_CHECK_BATCH_NUMBER

NEW_CHARG -

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

X_BNCOM -

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

CHECK_EXTERNAL -

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

CHECK_CUSTOMER -

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

EXCEPTIONS details

NO_BATCH -

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

INTERVAL_NOT_FOUND -

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

NUMBER_RANGE_NOT_EXTERN -

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

OBJECT_NOT_FOUND -

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

ERROR_CHECK_BATCH_NUMBER -

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

NO_EXTERNAL_NUMBER -

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

NO_CUSTOMER_NUMBER -

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

Copy and paste ABAP code example for VB_CHECK_BATCH_NUMBER 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_no_batch  TYPE STRING, "   
lv_new_charg  TYPE MCHA-CHARG, "   
lv_x_bncom  TYPE BNCOM, "   
lv_interval_not_found  TYPE BNCOM, "   
lv_check_external  TYPE AM07M-XSELK, "   'X'
lv_number_range_not_extern  TYPE AM07M, "   
lv_check_customer  TYPE AM07M-XSELK, "   'X'
lv_object_not_found  TYPE AM07M, "   
lv_error_check_batch_number  TYPE AM07M, "   
lv_no_external_number  TYPE AM07M, "   
lv_no_customer_number  TYPE AM07M. "   

  CALL FUNCTION 'VB_CHECK_BATCH_NUMBER'  "
    EXPORTING
         NEW_CHARG = lv_new_charg
         X_BNCOM = lv_x_bncom
         CHECK_EXTERNAL = lv_check_external
         CHECK_CUSTOMER = lv_check_customer
    EXCEPTIONS
        NO_BATCH = 1
        INTERVAL_NOT_FOUND = 2
        NUMBER_RANGE_NOT_EXTERN = 3
        OBJECT_NOT_FOUND = 4
        ERROR_CHECK_BATCH_NUMBER = 5
        NO_EXTERNAL_NUMBER = 6
        NO_CUSTOMER_NUMBER = 7
. " VB_CHECK_BATCH_NUMBER




ABAP code using 7.40 inline data declarations to call FM VB_CHECK_BATCH_NUMBER

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 CHARG FROM MCHA INTO @DATA(ld_new_charg).
 
 
 
"SELECT single XSELK FROM AM07M INTO @DATA(ld_check_external).
DATA(ld_check_external) = 'X'.
 
 
"SELECT single XSELK FROM AM07M INTO @DATA(ld_check_customer).
DATA(ld_check_customer) = 'X'.
 
 
 
 
 


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!