BAPI_WHSE_TO_CREATE_STOCK is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name BAPI_WHSE_TO_CREATE_STOCK into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
L2018
Released Date:
Not Released
Processing type: Remote-Enabled
CALL FUNCTION 'BAPI_WHSE_TO_CREATE_STOCK' "BAPI for Stock Data per Quant
EXPORTING
whsenumber = " bapi2018e-whsenumber Warehouse number / warehouse complex
whsemvmt = " bapi2018e-whse_mvmt Movement type for Warehouse Management
* reqnumber = SPACE " bapi2018e-req_number Requirement Tracking Number
* reqtype = SPACE " bapi2018e-req_type Requirement Type
* addrefno = SPACE " bapi2018e-add_ref_no Additional number for transfer requirement
* notpriind = SPACE " bapi2018e-not_pri_ind Do not print transfer order
* prictlind = SPACE " bapi2018e-pri_ctl_ind Indicator: form and sort code for printing transfer orders
* minwmind = SPACE " bapi2018e-min_wm_ind Transfer order transfers no real storage bin stock
* addrem = SPACE " bapi2018e-add_rem TO processing comment (code)
TABLES
importdata = " bapi2018d Import Structure D for Business Object WhseTransOrder
createdata = " bapicr2018ret BAPI Export Fields for Data Transmission BO 2018
return = " bapiret2 Return parameter
. " BAPI_WHSE_TO_CREATE_STOCK
The ABAP code below is a full code listing to execute function module BAPI_WHSE_TO_CREATE_STOCK including all data declarations. The code uses 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 original method of declaring data variables up front. 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).
| it_importdata | TYPE STANDARD TABLE OF BAPI2018D,"TABLES PARAM |
| wa_importdata | LIKE LINE OF it_importdata , |
| it_createdata | TYPE STANDARD TABLE OF BAPICR2018RET,"TABLES PARAM |
| wa_createdata | LIKE LINE OF it_createdata , |
| it_return | TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM |
| wa_return | LIKE LINE OF it_return . |
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_whsenumber | TYPE BAPI2018E-WHSENUMBER , |
| it_importdata | TYPE STANDARD TABLE OF BAPI2018D , |
| wa_importdata | LIKE LINE OF it_importdata, |
| ld_whsemvmt | TYPE BAPI2018E-WHSE_MVMT , |
| it_createdata | TYPE STANDARD TABLE OF BAPICR2018RET , |
| wa_createdata | LIKE LINE OF it_createdata, |
| ld_reqnumber | TYPE BAPI2018E-REQ_NUMBER , |
| it_return | TYPE STANDARD TABLE OF BAPIRET2 , |
| wa_return | LIKE LINE OF it_return, |
| ld_reqtype | TYPE BAPI2018E-REQ_TYPE , |
| ld_addrefno | TYPE BAPI2018E-ADD_REF_NO , |
| ld_notpriind | TYPE BAPI2018E-NOT_PRI_IND , |
| ld_prictlind | TYPE BAPI2018E-PRI_CTL_IND , |
| ld_minwmind | TYPE BAPI2018E-MIN_WM_IND , |
| ld_addrem | TYPE BAPI2018E-ADD_REM . |
With this method, you can execute the transfer of initial stock data
into a warehouse.
...See here for full SAP fm documentation
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name BAPI_WHSE_TO_CREATE_STOCK or its description.
BAPI_WHSE_TO_CREATE_STOCK - BAPI for Stock Data per Quant BAPI_WHSE_STOCK_GET_LIST - BAPI for Details of Stock per Material BAPI_WHSE_STOCK_GET_DETAIL - BAPI for Stock Data per Quant BAPI_WFRES_CHANGEAVAILMULTI - Change Availability Period of a WFM Resource BAPI_WELLID_GETDETAIL - Gets Well ID detail BAPI_WELLID_DELETE - Deletes well ID