WM
BAPI
RFC
Used the same way in S/4HANA
BAPI_WHSE_TO_CREATE_STOCK Create Transfer Order for Stock Movement
Creates warehouse transfer orders for stock movements based on the items in IMPORTDATA, with a WM movement type and optional requirement reference. It is used in interfaces from external systems that trigger stock transfers inside the warehouse. Check RETURN and read the created transfer order numbers from CREATEDATA.
- Function group
- L2018
- Remote-enabled (RFC)
- Yes
- Type
- BAPI
Importing parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| WHSENUMBER | BAPI2018E-WHSENUMBER | Warehouse number | Yes |
| WHSEMVMT | BAPI2018E-WHSE_MVMT | WM movement type | Yes |
| REQTYPE | BAPI2018E-REQ_TYPE | Requirement type | — |
| REQNUMBER | BAPI2018E-REQ_NUMBER | Requirement number | — |
| ADDREFNO | BAPI2018E-ADD_REF_NO | Additional reference number | — |
Tables parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| IMPORTDATA | BAPI2018D | Transfer order items to create | Yes |
| CREATEDATA | BAPICR2018RET | Created transfer orders | Yes |
| RETURN | BAPIRET2 | Return messages | Yes |
Call template (ABAP)
A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.
CALL FUNCTION 'BAPI_WHSE_TO_CREATE_STOCK'
EXPORTING
whsenumber = lv_whsenumber
whsemvmt = lv_whsemvmt
TABLES
importdata = lt_importdata
createdata = lt_createdata
return = lt_return.Related tables
Can't find the report you need?
We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.