Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Move data from one warehouse to other in SAP MM
You can perform warehouse-to-warehouse transfer in SAP MM using the existing function module BAPI_GOODSMVT_CREATE. This BAPI allows you to create goods movements for transferring materials between different storage locations or warehouses efficiently.
Using BAPI_GOODSMVT_CREATE for Warehouse Transfer
The BAPI_GOODSMVT_CREATE function module is designed to handle various types of goods movements in SAP MM, including transfers between warehouses. This BAPI provides a programmatic way to execute material movements that would typically be done through transaction codes like MIGO or MB1B.
Key Parameters
When using this BAPI for warehouse transfers, you need to configure the following essential parameters ?
* Movement Type: 311 (Transfer Posting) * Plant: Source and destination plant * Storage Location: Source and destination storage location * Material: Material number to be transferred * Quantity: Transfer quantity * Unit of Measure: Base unit of measure
Example Implementation
Here's how you can implement the warehouse transfer using the BAPI ?
DATA: ls_header TYPE bapi2017_gm_head_01,
lt_item TYPE TABLE OF bapi2017_gm_item_create,
ls_item TYPE bapi2017_gm_item_create,
lt_return TYPE TABLE OF bapiret2.
* Fill header data
ls_header-pstng_date = sy-datum.
ls_header-doc_date = sy-datum.
* Fill item data for transfer
ls_item-material = 'MATERIAL_NUMBER'.
ls_item-plant = 'PLANT_CODE'.
ls_item-stge_loc = 'SOURCE_SLOC'.
ls_item-move_type = '311'.
ls_item-entry_qnt = 10.
ls_item-entry_uom = 'EA'.
ls_item-move_plant = 'PLANT_CODE'.
ls_item-move_stloc = 'TARGET_SLOC'.
APPEND ls_item TO lt_item.
* Call BAPI
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = ls_header
goodsmvt_code = '04'
TABLES
goodsmvt_item = lt_item
return = lt_return.
This approach provides flexibility and can be easily integrated into custom programs or batch jobs for automated warehouse transfers.
Conclusion
The BAPI_GOODSMVT_CREATE function module offers an efficient solution for moving data between warehouses in SAP MM, providing programmatic control over material transfers while maintaining proper SAP business logic and validations.
