SAP Batch Management: User-exits and BAdIs

In this article, we will discuss in detail the different methods to enhance the standard process in SAP Batch Management.

The list of SAP Batch Exit and BAdIs will be classified by Business functionalities:

Batch Master, Batch Classification, Batch Numbering, Internal and external, Batch Status, SLED Management, Batch Information Cockpit Exit, Derivation and Batch Determination User-Exit and BAdI’s.

Read also SAP Batch Management Tcodes, Tables and Customizing (SAP Batch Management).

SAP Batch Master User-Exists and BAdIs


BATCH_MASTER: Enhancements for Batch Master Transactions
It is called in MSC1N and MSC2N to validate user’s input.

There is 4 methods for BATCH_MASTER BAdI:

  • CHECK_DATA_BEFORE_SAVE Check Batch Data at Save
  • CHECK_CLASSIF_BEFORE_SAVE Batch Classification Check When Saving
  • SINGLE_FIELD_CONTROL Field Selection Control
  • LOCK_BATCH_MASTER_IN_MIGO Influence Lock of Batch Master Record in MIGO


It is called in Function Modules VB_CREATE_BATCH and VB_CHANGE_BATCH to set/change master data.

It is also called in transaction MIGO.


It is called in MM coding (MB1A, MB1B, MB1C, etc) but only for new batches.

Batch Classification


It is called in Function Modules VB_CREATE_BATCH and VB_CHANGE_BATCH to determine whether classification and exits should be executed.

In other words, it’s possible make the system ignore the classification routines. Just set the parameters TYPE_OF_CLASSIFYING and EXTENDED_CLASSIFYING accordingly.


It’s called in VB_CREATE_BATCH and VB_CHANGE_BATCH to set/change?free characteristics.

Free characteristics are those that do not begin with ‘LOBM_’.

Check this scn thread about EXIT_SAPLV01Z_014. Changing characteristic values at Batch creation.


It is used to fill the classification data in MM transactions.

Batch Numbering – Internal


Replacement of the number range, decision for internal or external numbering.

For more information, check the page about Further information and examples for EXIT_SAPLV01Z_001 and EXIT_SAPLV01Z_002


Assignment of customer-specific batch number. Also used to assign an existing batch (allow_existing_batch) via VB_CREATE_BATCH.

Further information and examples for EXIT_SAPLV01Z_001 and EXIT_SAPLV01Z_002


Called in MM coding to assign existing batches.

Batch numbering – External


Replacement of the number range, decision customer-specific check.


Check of batch number based on customer rules.

SAP Batch Management Status

The SAP Batch Management Status exis EXIT_SAPLV01D_001 is used for Determination of the initial status of a batch.

SLED (shelf life expiration date)


VB_SLED_MANAGEMENT: Control of Shelf Life Expiration Date Processing

It’s used to set VFDAT/HSDAT and switch off SLED management
(method:?MAINTAIN_SLED_PARAMETERS:?Change Parameters of Minimum Shelf Life Processing)

SAP Batch Management SLED EXIT_SAPLVBMD_001 Userexit

It is typically based on similar functionality as BAdI VB_SLED_MANAGEMENT

Batch Information Cockpit


BIC_ADDITIONAL_DATA: BAdI: Batch Information Cockpit – Additional Data/Columns

Add additional columns to selection result master and selection result stock.

You will find the following methods :

  • MASTER_COLUMNS_ADD Add Columns for Additional Data for Selection Result:Batches
  • STOCK_COLUMNS_ADD Add Columns for Additional Data for Selection Result: Stock
  • MASTER_ADD_DATA_FILL_IN Add Additional Data to Selection Result: Batches
  • STOCK_ADD_DATA_FILL_IN Add Additional Data to Selection Result: Stock
  • MASTER_ADD_DATA_SELECT Select Additional Data for Selection Result: Batches
  • STOCK_ADD_DATA_SELECT Select Additional Data for Selection Result: Stock


BIC_FOLLOW_UP_ACTION: Follow-On Actions in the Batch Information Cockpit

Allows defining actions for SAP Batch Management in the selection result (for example, change of batch status):

  • PASS_BATCHES_FOR_ACTION Transfers selected batches to follow-up actions
  • BUILD_LOG_PROFILE Constructs the field catalog for the application log
  • ADD_MSG_TO_LOG Adds a message to the application log
  • SAVE_LOG_TO_DB Saves the application log to the database


BIC_SELECTION: Selection Enhancement in the SAP Batch Management Information Cockpit

Definition of custom selection screen and selection logic.

The Methods of?BIC_SELECTION Batch BaDi are:

  • DEFINE_SUBSCREEN Definition of a free selection tab page
  • CHECK_SUBSCREEN_FOR_INPUT Checks free selection tab pages for user entries
  • RESET_SUBSCREEN Resets the selection criteria for the selection tab page
  • PRESELECT_BATCHES Customer-specific preselection of batches
  • REFINE_SELECTION_RESULT Deletes entries from the ‘Selection Results Batches’
  • ENRICH_MASTER_RESULT More details for the ‘Selection Results Batches’
  • ACTION_WITH_INFO_OBJECT Executes an action for a customer-specific info object
  • GET_SELID_FOR_ENHANCEMENT Procures ID of Selection Enhancement from Customizing
  • GET_SELID_FOR_ENHANCEMENT Procures ID of Selection Enhancement from Customizing
  • CHECK_FOR_OBLIGATORY_INPUT Check on Mandatory Entries for “Execute Selection”

Batch Where-Used List


Allows fine-tuning the selection for each object (batch, PO, production order).

The BADi BAdI VB_BWUL_EXPLOSION offers 5 methods :

  • BWUL_REF_TO_ORDER_MAINTAIN Process Batch Where-Used Records with Reference to Order
  • BWUL_REF_TO_PO_MAINTAIN Process Batch Where-Used Records with Ref. to Purchase Order
  • BWUL_REF_TO_BATCH_MAINTAIN Process Batch Where-Used Records with Reference to Batch
  • SELECTION_PARAMETER_ACTIVATE Activate Parameters for Extended Selection
  • COMPLETE_BWUL_MAINTAIN Process Complete Batch Where-Used List


Pre-determines plant for the selection screen of BWUL.
VB_GET_POS_PLANT: Enhancement of Automatic Plant Determination in transaction Code MB56.

The unique method for the BAdI VB_GET_POS_PLANT is GET_PLANT.

The signature of VB_GET_POS_PLANT->GET_PLANT is

  • I_EXPTP TYPE EXPTP Expansion category f. batch where-used list display
  • I_MATNR TYPE MATNR Material Number
  • I_CHARG TYPE CHARG_D Batch Numbervalue
  • ( E_WERKS ) TYPE WERKS_D Plant


VB_GET_EXT_BATCHES: Access to Customer-Specific Batch Usage Data
Allows reading external batches for a subcontracting process.

In this BADi VB_GET_BATCHES, there is 3 differents methods:

  • GET_BATCH_USAGE_A: Determine Batch Usage for Order
  • GET_BATCH_USAGE_B: Determine Batch Usage for Purchase Order
  • GET_BATCH_USAGE_C: Determine Batch Usage for Batch


Allows filling additional columns into Batch Where-Used List.

SAP Batch Determination BADis and Exit


VB_BD_SELECTION: Preselection of Batches Within Batch Determination within SAP Batch Management

Can be used instead of the standard selection to select batches from stock. It?s important to point out that the standard batch selection won?t work after the BAdI activation.

You can use depending on your requirement one of these methods:

  • PRESELECT_BATCHES Preselection of Batches
  • PRESELECT_BATCHES Preselection of Batches
  • PRESELECT_STOCKS Preselection of Batch Stock Records
  • RESTRICT_CONF_CHARS Restrict Characteristics of Configuration
  • SET_CHAR_EXCLUDING Characteristic to Be Interpreted Exclusively


VB_BD_SELECTION_CRITERIA: SAP Batch Management: Batch Determination Selection Criteria

It is used to change the selection criteria (it will generate a new CUOBJ) using the method

  • SEL_CRIT_CHANGE Change Selection Criteria for Batch Determination in SAP Batch Management


It is used to change the selection criteria (will generate a new CUOBJ)


Allows changing the communication structures BDCOM, KOMKH, KOMPH used in function module VB_BATCH_DETERMINATION. For more information you can access document

Source: Userexits and BAdIs – Batch Management