SAP VB_CHANGE_STATUS_CHECK Function Module for
VB_CHANGE_STATUS_CHECK is a standard vb change status check 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 change status check FM, simply by entering the name VB_CHANGE_STATUS_CHECK 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_CHANGE_STATUS_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 'VB_CHANGE_STATUS_CHECK'".
EXPORTING
MATNR = "
CHARG = "
* WERKS = "
ZUSTD_NEW = "Batch in Restricted-Use Stock
* X_BNCOM = "
EXCEPTIONS
BATCH_NOT_FOUND = 1 NO_STATUS_TO_CHANGE = 2 CHANGE_NOT_ALLOWED = 3
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_CHANGE_STATUS_CHECK
MATNR -
Data type: MARA-MATNROptional: No
Call by Reference: Yes
CHARG -
Data type: MCHA-CHARGOptional: No
Call by Reference: Yes
WERKS -
Data type: T001W-WERKSOptional: Yes
Call by Reference: Yes
ZUSTD_NEW - Batch in Restricted-Use Stock
Data type: MCHA-ZUSTDOptional: No
Call by Reference: Yes
X_BNCOM -
Data type: BNCOMOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
BATCH_NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
NO_STATUS_TO_CHANGE -
Data type:Optional: No
Call by Reference: Yes
CHANGE_NOT_ALLOWED -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for VB_CHANGE_STATUS_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_matnr | TYPE MARA-MATNR, " | |||
| lv_batch_not_found | TYPE MARA, " | |||
| lv_charg | TYPE MCHA-CHARG, " | |||
| lv_no_status_to_change | TYPE MCHA, " | |||
| lv_werks | TYPE T001W-WERKS, " | |||
| lv_change_not_allowed | TYPE T001W, " | |||
| lv_zustd_new | TYPE MCHA-ZUSTD, " | |||
| lv_x_bncom | TYPE BNCOM. " |
|   CALL FUNCTION 'VB_CHANGE_STATUS_CHECK' " |
| EXPORTING | ||
| MATNR | = lv_matnr | |
| CHARG | = lv_charg | |
| WERKS | = lv_werks | |
| ZUSTD_NEW | = lv_zustd_new | |
| X_BNCOM | = lv_x_bncom | |
| EXCEPTIONS | ||
| BATCH_NOT_FOUND = 1 | ||
| NO_STATUS_TO_CHANGE = 2 | ||
| CHANGE_NOT_ALLOWED = 3 | ||
| . " VB_CHANGE_STATUS_CHECK | ||
ABAP code using 7.40 inline data declarations to call FM VB_CHANGE_STATUS_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 MATNR FROM MARA INTO @DATA(ld_matnr). | ||||
| "SELECT single CHARG FROM MCHA INTO @DATA(ld_charg). | ||||
| "SELECT single WERKS FROM T001W INTO @DATA(ld_werks). | ||||
| "SELECT single ZUSTD FROM MCHA INTO @DATA(ld_zustd_new). | ||||
Search for further information about these or an SAP related objects