SAP VB_CP_BUF_READ_CREATE Function Module for NOTRANSL: Selektion Chargen -> Selektion Aufträge









VB_CP_BUF_READ_CREATE is a standard vb cp buf read create 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: Selektion Chargen -> Selektion Aufträge 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 cp buf read create FM, simply by entering the name VB_CP_BUF_READ_CREATE into the relevant SAP transaction such as SE37 or SE38.

Function Group: VBP_EBR
Program Name: SAPLVBP_EBR
Main Program: SAPLVBP_EBR
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function VB_CP_BUF_READ_CREATE 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_CP_BUF_READ_CREATE'"NOTRANSL: Selektion Chargen -> Selektion Aufträge
EXPORTING
* I_CHARG_LOW = "Batch Number
* I_CHARG_HIGH = "Batch Number
* I_MATNR_LOW = "Material Number
* I_MATNR_HIGH = "Material Number
* I_WERKS_LOW = "Plant
* I_WERKS_HIGH = "Plant
* I_SELECTION_LIMIT = "Maximum Number of Batch Records to be Selected
* I_CHECK_EXIST_ON_DB = "

TABLES
* E_MCHP = "Batch Record: Buffer Table for Header
* E_VERS = "Batch Record: Buffer Table for Versions
* E_MATNR = "Batch Record: Plant-Specific Materials in Selection Range
* E_WERKS = "Batch Records: Plants in Selection Range
* I_SEL_CHARG = "Transfer Batch Selection Criteria to Read MCHP
* I_SEL_MATNR = "Transfer Batch Selection Criteria to Read MCHP
* I_SEL_WERK = "Transfer Batch Selection Criteria to Read MCHP

EXCEPTIONS
NO_BATCH_FOR_SELECTION = 1 NO_AUTH = 2 EBR_ALREADY_EXISTS = 3 ORDER_ERROR = 4 ENQUEUE_ERROR = 5 SCM_ADDON_ERROR = 6
.



IMPORTING Parameters details for VB_CP_BUF_READ_CREATE

I_CHARG_LOW - Batch Number

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

I_CHARG_HIGH - Batch Number

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

I_MATNR_LOW - Material Number

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

I_MATNR_HIGH - Material Number

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

I_WERKS_LOW - Plant

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

I_WERKS_HIGH - Plant

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

I_SELECTION_LIMIT - Maximum Number of Batch Records to be Selected

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

I_CHECK_EXIST_ON_DB -

Data type: FLAG
Optional: Yes
Call by Reference: Yes

TABLES Parameters details for VB_CP_BUF_READ_CREATE

E_MCHP - Batch Record: Buffer Table for Header

Data type: VBCP0
Optional: Yes
Call by Reference: Yes

E_VERS - Batch Record: Buffer Table for Versions

Data type: VBCP8
Optional: Yes
Call by Reference: Yes

E_MATNR - Batch Record: Plant-Specific Materials in Selection Range

Data type: VBCP15
Optional: Yes
Call by Reference: Yes

E_WERKS - Batch Records: Plants in Selection Range

Data type: VBCP14
Optional: Yes
Call by Reference: Yes

I_SEL_CHARG - Transfer Batch Selection Criteria to Read MCHP

Data type: SEL_CHARG
Optional: Yes
Call by Reference: Yes

I_SEL_MATNR - Transfer Batch Selection Criteria to Read MCHP

Data type: SEL_MATNR
Optional: Yes
Call by Reference: Yes

I_SEL_WERK - Transfer Batch Selection Criteria to Read MCHP

Data type: SEL_WERKS
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

NO_BATCH_FOR_SELECTION -

Data type:
Optional: No
Call by Reference: Yes

NO_AUTH - No Authorization

Data type:
Optional: No
Call by Reference: Yes

EBR_ALREADY_EXISTS -

Data type:
Optional: No
Call by Reference: Yes

ORDER_ERROR -

Data type:
Optional: No
Call by Reference: Yes

ENQUEUE_ERROR - Error when setting the lock

Data type:
Optional: No
Call by Reference: Yes

SCM_ADDON_ERROR -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for VB_CP_BUF_READ_CREATE 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:
lt_e_mchp  TYPE STANDARD TABLE OF VBCP0, "   
lv_i_charg_low  TYPE MCHP-CHARG, "   
lv_no_batch_for_selection  TYPE MCHP, "   
lt_e_vers  TYPE STANDARD TABLE OF VBCP8, "   
lv_no_auth  TYPE VBCP8, "   
lv_i_charg_high  TYPE MCHP-CHARG, "   
lt_e_matnr  TYPE STANDARD TABLE OF VBCP15, "   
lv_i_matnr_low  TYPE MCHP-MATNR, "   
lv_ebr_already_exists  TYPE MCHP, "   
lt_e_werks  TYPE STANDARD TABLE OF VBCP14, "   
lv_order_error  TYPE VBCP14, "   
lv_i_matnr_high  TYPE MCHP-MATNR, "   
lt_i_sel_charg  TYPE STANDARD TABLE OF SEL_CHARG, "   
lv_i_werks_low  TYPE MCHP-WERKS, "   
lv_enqueue_error  TYPE MCHP, "   
lt_i_sel_matnr  TYPE STANDARD TABLE OF SEL_MATNR, "   
lv_i_werks_high  TYPE MCHP-WERKS, "   
lv_scm_addon_error  TYPE MCHP, "   
lt_i_sel_werk  TYPE STANDARD TABLE OF SEL_WERKS, "   
lv_i_selection_limit  TYPE VBCP_SEL-SELECT_LIMIT, "   
lv_i_check_exist_on_db  TYPE FLAG. "   

  CALL FUNCTION 'VB_CP_BUF_READ_CREATE'  "NOTRANSL: Selektion Chargen -> Selektion Aufträge
    EXPORTING
         I_CHARG_LOW = lv_i_charg_low
         I_CHARG_HIGH = lv_i_charg_high
         I_MATNR_LOW = lv_i_matnr_low
         I_MATNR_HIGH = lv_i_matnr_high
         I_WERKS_LOW = lv_i_werks_low
         I_WERKS_HIGH = lv_i_werks_high
         I_SELECTION_LIMIT = lv_i_selection_limit
         I_CHECK_EXIST_ON_DB = lv_i_check_exist_on_db
    TABLES
         E_MCHP = lt_e_mchp
         E_VERS = lt_e_vers
         E_MATNR = lt_e_matnr
         E_WERKS = lt_e_werks
         I_SEL_CHARG = lt_i_sel_charg
         I_SEL_MATNR = lt_i_sel_matnr
         I_SEL_WERK = lt_i_sel_werk
    EXCEPTIONS
        NO_BATCH_FOR_SELECTION = 1
        NO_AUTH = 2
        EBR_ALREADY_EXISTS = 3
        ORDER_ERROR = 4
        ENQUEUE_ERROR = 5
        SCM_ADDON_ERROR = 6
. " VB_CP_BUF_READ_CREATE




ABAP code using 7.40 inline data declarations to call FM VB_CP_BUF_READ_CREATE

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 MCHP INTO @DATA(ld_i_charg_low).
 
 
 
 
"SELECT single CHARG FROM MCHP INTO @DATA(ld_i_charg_high).
 
 
"SELECT single MATNR FROM MCHP INTO @DATA(ld_i_matnr_low).
 
 
 
 
"SELECT single MATNR FROM MCHP INTO @DATA(ld_i_matnr_high).
 
 
"SELECT single WERKS FROM MCHP INTO @DATA(ld_i_werks_low).
 
 
 
"SELECT single WERKS FROM MCHP INTO @DATA(ld_i_werks_high).
 
 
 
"SELECT single SELECT_LIMIT FROM VBCP_SEL INTO @DATA(ld_i_selection_limit).
 
 


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!