SAP Batch Management Tcodes, Tables and User Exits, BADI

SAP Batch Management: Userexits and BAdIs

In this articles, 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 functionnalities: Batch Master, Batch Classification, Batch Numbering – Internal and external, Batch Status, SLED Management, Batch Information Cockpit Exit, Derivation and Batch Determination UserExit and BAdI’s.

SAP Batch Master Userexists and BAdIs

BAdI BATCH_MASTER

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

EXIT_SAPLV01Z_013

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.

EXIT_SAPMM07M_003

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

Batch Classification

EXIT_SAPLV01Z_012

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.

EXIT_SAPLV01Z_014

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 also   SAP Incoterms Overview in SAP MM and SAP SD: Tables, Tcodes, Exit ...

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

EXIT_SAPMM07M_004

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

Batch Numbering – Internal

EXIT_SAPLV01Z_001

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

For more information, check the help.sap.com page about Further information and examples for EXIT_SAPLV01Z_001 and EXIT_SAPLV01Z_002

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

EXIT_SAPMM07M_010

Called in MM coding to assign existing batches.

Check also   MVKE Table in SAP MM (Material Sales Data Table)

Batch numbering – External

EXIT_SAPLV01Z_003

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

EXIT_SAPLV01Z_004

Check of batch number based on customer rules.

Batch Status Management

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)

BAdI VB_SLED_MANAGEMENT

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 )

SLED EXIT_SAPLVBMD_001 Userexit

It is typically based on similar functionality as BAdI VB_SLED_MANAGEMENT

Batch Information Cockpit

BIC_ADDITIONAL_DATA

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

BIC_FOLLOW_UP_ACTION:Follow-On Actions in the Batch Information Cockpit
Allows defining actions for batches 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
Check also   How To find SAP BADI and User exit for any SAP transaction

BIC_SELECTION

BIC_SELECTION: Selection Enhancement in the Batch 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

BAdI VB_BWUL_EXPLOSION

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

BAdI VB_GET_POS_PLANT

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

BAdI VB_GET_EXT_BATCHES

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

EXIT_SAPLCHVW_001

Allows filling additional columns into Batch Where-Used List.

SAP Batch Determination BADis and Exit

BAdI VB_BD_SELECTION

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

BAdI VB_BD_SELECTION_CRITERIA

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

EXIT_SAPLV01F_001

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

EXIT_SAPLV01F_002

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

Source: Userexits and BAdIs – Batch Management

Leave a Reply

Your email address will not be published. Required fields are marked *