SAP VB_BATCH_READ_BUFFER_DB Function Module for Read batch from buffer / db









VB_BATCH_READ_BUFFER_DB is a standard vb batch read buffer db SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read batch from buffer / db 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 vb batch read buffer db FM, simply by entering the name VB_BATCH_READ_BUFFER_DB into the relevant SAP transaction such as SE37 or SE38.

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



Function VB_BATCH_READ_BUFFER_DB 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_BATCH_READ_BUFFER_DB'"Read batch from buffer / db
EXPORTING
MATNR = "Reference Material
CHARG = "
* WERKS = "Reference Plant
* LGORT = "
* READ_FROM_BUFFER = X "
* READ_FROM_DB = "
* LOCK_BATCH = ' ' "Lock Mode

IMPORTING
BATCH_BUFFER = "
RC_MCH1_DB = "
MCHA_BUFFER = "
RC_MCHA_BUFFER = "
MCHA_DB = "
RC_MCHA_DB = "
MCHB_BUFFER = "
RC_MCHB_BUFFER = "
MCHB_DB = "
RC_MCHB_DB = "
BATCH_CUOBJ = "Configuration (Internal Object Number)
RC_BATCH_BUFFER = "
BATCH_OBJEK = "Key of Object to Be Classified
BATCH_CLASS = "Class Number
EXIST_IN_C_BUFFER = "Checkbox
BATCH_DB = "
RC_BATCH_DB = "
BATCH_DEL_FLAGS_BUFFER = "
BATCH_DEL_FLAGS_DB = "
MCH1_BUFFER = "
RC_MCH1_BUFFER = "
MCH1_DB = "

EXCEPTIONS
NO_MATERIAL = 1 NO_BATCH = 2 NO_PLANT = 3 LOCK_ON_BATCH = 4
.




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_SAPLV01P_001 Initiator for Batch Status Change

IMPORTING Parameters details for VB_BATCH_READ_BUFFER_DB

MATNR - Reference Material

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

CHARG -

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

WERKS - Reference Plant

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

LGORT -

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

READ_FROM_BUFFER -

Data type: AM07M-XSELK
Default: X
Optional: Yes
Call by Reference: Yes

READ_FROM_DB -

Data type: AM07M-XSELK
Optional: Yes
Call by Reference: Yes

LOCK_BATCH - Lock Mode

Data type: ENQMODE
Default: SPACE
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for VB_BATCH_READ_BUFFER_DB

BATCH_BUFFER -

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

RC_MCH1_DB -

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

MCHA_BUFFER -

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

RC_MCHA_BUFFER -

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

MCHA_DB -

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

RC_MCHA_DB -

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

MCHB_BUFFER -

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

RC_MCHB_BUFFER -

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

MCHB_DB -

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

RC_MCHB_DB -

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

BATCH_CUOBJ - Configuration (Internal Object Number)

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

RC_BATCH_BUFFER -

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

BATCH_OBJEK - Key of Object to Be Classified

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

BATCH_CLASS - Class Number

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

EXIST_IN_C_BUFFER - Checkbox

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

BATCH_DB -

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

RC_BATCH_DB -

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

BATCH_DEL_FLAGS_BUFFER -

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

BATCH_DEL_FLAGS_DB -

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

MCH1_BUFFER -

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

RC_MCH1_BUFFER -

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

MCH1_DB -

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

EXCEPTIONS details

NO_MATERIAL -

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

NO_BATCH -

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

NO_PLANT -

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

LOCK_ON_BATCH -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for VB_BATCH_READ_BUFFER_DB 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_matnr  TYPE MARA-MATNR, "   
lv_no_material  TYPE MARA, "   
lv_batch_buffer  TYPE MCHA, "   
lv_rc_mch1_db  TYPE SY-SUBRC, "   
lv_mcha_buffer  TYPE MCHA, "   
lv_rc_mcha_buffer  TYPE SY-SUBRC, "   
lv_mcha_db  TYPE MCHA, "   
lv_rc_mcha_db  TYPE SY-SUBRC, "   
lv_mchb_buffer  TYPE MCHB, "   
lv_rc_mchb_buffer  TYPE SY-SUBRC, "   
lv_mchb_db  TYPE MCHB, "   
lv_rc_mchb_db  TYPE SY-SUBRC, "   
lv_batch_cuobj  TYPE INOB-CUOBJ, "   
lv_charg  TYPE MCH1-CHARG, "   
lv_no_batch  TYPE MCH1, "   
lv_rc_batch_buffer  TYPE SY-SUBRC, "   
lv_batch_objek  TYPE INOB-OBJEK, "   
lv_batch_class  TYPE RMCLF-CLASS, "   
lv_exist_in_c_buffer  TYPE XFELD, "   
lv_werks  TYPE T001W-WERKS, "   
lv_batch_db  TYPE MCHA, "   
lv_no_plant  TYPE MCHA, "   
lv_lgort  TYPE T001L-LGORT, "   
lv_rc_batch_db  TYPE SY-SUBRC, "   
lv_lock_on_batch  TYPE SY, "   
lv_read_from_buffer  TYPE AM07M-XSELK, "   X
lv_batch_del_flags_buffer  TYPE BATCHDELFLG, "   
lv_read_from_db  TYPE AM07M-XSELK, "   
lv_batch_del_flags_db  TYPE BATCHDELFLG, "   
lv_lock_batch  TYPE ENQMODE, "   SPACE
lv_mch1_buffer  TYPE MCH1, "   
lv_rc_mch1_buffer  TYPE SY-SUBRC, "   
lv_mch1_db  TYPE MCH1. "   

  CALL FUNCTION 'VB_BATCH_READ_BUFFER_DB'  "Read batch from buffer / db
    EXPORTING
         MATNR = lv_matnr
         CHARG = lv_charg
         WERKS = lv_werks
         LGORT = lv_lgort
         READ_FROM_BUFFER = lv_read_from_buffer
         READ_FROM_DB = lv_read_from_db
         LOCK_BATCH = lv_lock_batch
    IMPORTING
         BATCH_BUFFER = lv_batch_buffer
         RC_MCH1_DB = lv_rc_mch1_db
         MCHA_BUFFER = lv_mcha_buffer
         RC_MCHA_BUFFER = lv_rc_mcha_buffer
         MCHA_DB = lv_mcha_db
         RC_MCHA_DB = lv_rc_mcha_db
         MCHB_BUFFER = lv_mchb_buffer
         RC_MCHB_BUFFER = lv_rc_mchb_buffer
         MCHB_DB = lv_mchb_db
         RC_MCHB_DB = lv_rc_mchb_db
         BATCH_CUOBJ = lv_batch_cuobj
         RC_BATCH_BUFFER = lv_rc_batch_buffer
         BATCH_OBJEK = lv_batch_objek
         BATCH_CLASS = lv_batch_class
         EXIST_IN_C_BUFFER = lv_exist_in_c_buffer
         BATCH_DB = lv_batch_db
         RC_BATCH_DB = lv_rc_batch_db
         BATCH_DEL_FLAGS_BUFFER = lv_batch_del_flags_buffer
         BATCH_DEL_FLAGS_DB = lv_batch_del_flags_db
         MCH1_BUFFER = lv_mch1_buffer
         RC_MCH1_BUFFER = lv_rc_mch1_buffer
         MCH1_DB = lv_mch1_db
    EXCEPTIONS
        NO_MATERIAL = 1
        NO_BATCH = 2
        NO_PLANT = 3
        LOCK_ON_BATCH = 4
. " VB_BATCH_READ_BUFFER_DB




ABAP code using 7.40 inline data declarations to call FM VB_BATCH_READ_BUFFER_DB

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 MATNR FROM MARA INTO @DATA(ld_matnr).
 
 
 
"SELECT single SUBRC FROM SY INTO @DATA(ld_rc_mch1_db).
 
 
"SELECT single SUBRC FROM SY INTO @DATA(ld_rc_mcha_buffer).
 
 
"SELECT single SUBRC FROM SY INTO @DATA(ld_rc_mcha_db).
 
 
"SELECT single SUBRC FROM SY INTO @DATA(ld_rc_mchb_buffer).
 
 
"SELECT single SUBRC FROM SY INTO @DATA(ld_rc_mchb_db).
 
"SELECT single CUOBJ FROM INOB INTO @DATA(ld_batch_cuobj).
 
"SELECT single CHARG FROM MCH1 INTO @DATA(ld_charg).
 
 
"SELECT single SUBRC FROM SY INTO @DATA(ld_rc_batch_buffer).
 
"SELECT single OBJEK FROM INOB INTO @DATA(ld_batch_objek).
 
"SELECT single CLASS FROM RMCLF INTO @DATA(ld_batch_class).
 
 
"SELECT single WERKS FROM T001W INTO @DATA(ld_werks).
 
 
 
"SELECT single LGORT FROM T001L INTO @DATA(ld_lgort).
 
"SELECT single SUBRC FROM SY INTO @DATA(ld_rc_batch_db).
 
 
"SELECT single XSELK FROM AM07M INTO @DATA(ld_read_from_buffer).
DATA(ld_read_from_buffer) = X.
 
 
"SELECT single XSELK FROM AM07M INTO @DATA(ld_read_from_db).
 
 
DATA(ld_lock_batch) = ' '.
 
 
"SELECT single SUBRC FROM SY INTO @DATA(ld_rc_mch1_buffer).
 
 


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!