EWM – Initial Stock Upload by LSMW vs /SCWM/ISU
SAP offers Tcode /SCWM/ISU for EWM Initial Stock Upload. However, you can use LSMW as well. In this blogs I will explain detail step by step how to use LSMW and note down some errors you may face. By the end of this Blogs I also give detail field name of /SCWM/ISU template fields provided by SAP.
My example case that I want to upload Initial Stock with Batch Management, Quantity in decimals, but without HU Management. SAP Version: SAP S/4HANA 1909 – Embedded EWM.
- If stock is Batch managed, you muss created Batch Master data before Initial Stock upload. Batch Master data can be uploaded with supported from LTMC.
- EWM only can upload Quantity but without Value. The step to upload Value for initial stock can be carry later on with Tcode MR21/ MR22.
Step by Step to run LSMW
First step to create your own Project and Object.
Define Object Attributes
Select Program name as /SCWM/R_INITIALSTOCKUPLOAD
Define Source Structures
Define Source Fields
You can create source field to those field you have data to upload.
Note: you should put the source field name the same as original field name in Structure, so later you can auto mapping the source field with the field in structure to saving time.
Quantity field if you want to upload quantity in decimals, choose Field Type as “C” Characteristic and Tick as below.
Define Structure Relations
Define Field Mapping and Conversion Rules
If the source field name is the same as original field name in Structure, you can use Auto Mapping Field.
Define Fixed Values, Translations, User-Defined Routines
Here I define to to convert data for Quantity to able to upload quantity in decimals. The source and Target type of Quantity are both Characteristic.
You muss use Converted data as Standard one as below, else you will face error.
If the Standard one not available, you muss create new one with the same name.
Example data in the uploaded file, VFDAT is expiration date, which must be the same date in Batch master data. If Batch master data doesn’t have expiration date, you must set in the file as 0000000 but cannot let it empty as this is required field.
See the quantity here is in decimals.
Below steps you can simply run through
– Assign Files
– Read Data
– Display Read Data
– Convert Data
– Display Converted Data
Start Direct Input Program
Click “Upload”, if all lines are green. You can go ahead to click on “Execute” and post the transaction.
Display Material Document with Mvt 561 is created from EWM. Check the Quantity Tab you can see only quantity without Ext. Amount LC.
Compare with Initial stock upload from IM with MIGO, you can either put Batch number and Ext. Amount LC in MIGO, along with initial stock upload.
SAP offers a template for initial stock upload, however it’s only technical field name without description. Here I list down in detail field by field for you to easier understand.
|Technical field name||Data Type||Field Lenghth||Description||Optional/ Required?|
|POSTYPE||CHAR||1||Item Category for Stock Data Transfer||R|
|OWNER_ROLE||CHAR||2||Partner Role of Owner||R|
|STOCK_DOCCAT||CHAR||3||Type: Sales Order Stock or Project Stock|
|STOCK_DOCNO||CHAR||35||External Number of Sales Order/Project (Special Stock)|
|STOCK_ITMNO||NUMC||10||Sales Order Item for Sales Order Stock|
|ENTITLED||CHAR||10||Party Entitled to Dispose||R|
|ENTITLED_ROLE||CHAR||2||Partner Role of Party Entitled to Dispose||R|
|COO||CHAR||3||Country of Origin|
|UNIT||UNIT||3||Base Unit of Measure||R|
|HUTYP||CHAR||4||Handling Unit Type|
|GR_DATE||DATS||8||Goods Receipt Date|
|GR_TIME||TIMS||6||Goods Receipt Time|
|VFDAT||DATS||8||Shelf Life Expiration Date||R|
|EXTNO||CHAR||1||HU Numbers from External Number Range|
|HUIDENT||CHAR||20||Handling Unit Identification|
|PARHUIDENT||CHAR||20||Higher-Level Handling Unit|
|TOPHUIDENT||CHAR||20||Highest-Level Handling Unit|
|REFROW||CHAR||10||Identification of Line to Which is Referred|
|G_WEIGHT||CHAR||16||Total Weight of Handling Unit|
|N_WEIGHT||CHAR||16||Loading Weight of Handling Unit|
|T_WEIGHT||CHAR||16||Tare Weight Handling Unit|
|G_VOLUME||CHAR||16||Total Volume of Handling Unit|
|N_VOLUME||CHAR||16||Loading volume of handling unit|
|T_VOLUME||CHAR||16||Tare Volume of Handling Unit|
|G_CAPA||CHAR||16||Total Capacity Key Figure|
|N_CAPA||CHAR||16||Net Capacity Key Figure|
|T_CAPA||CHAR||16||Tare Capacity Key Figure for Packaging|
|UNIT_LWH||UNIT||3||Unit of Dimension for Length/Width/Height|
|TOLW||CHAR||4||Excess Weight Tolerance for Handling unit|
|TARE_VAR||CHAR||1||Tare Weight Variable|
|MAX_VOLUME||CHAR||16||Maximum Allowed Volume|
|TOLV||CHAR||4||Excess Volume Tolerance of the Handling Unit|
|CLOSED_PACKAGE||CHAR||1||Closed Packaging Material|
|MAX_CAPA||CHAR||16||Maximum Permitted Capacity for Packaging Material|
|MAX_LENGTH||CHAR||16||Maximum Packing Length of a Packaging Material|
|MAX_WIDTH||CHAR||16||Maximum Allowed Packing Width of a Packaging Material|
|MAX_HEIGHT||CHAR||16||Maximum Packing Height of a Packaging Material|
|UNIT_MAX_LWH||UNIT||3||Unit of Measure for Maximum Packing Length/Width/Height|
|CWUNIT||UNIT||3||Unit for Valuation Quantity|
|CWEXACT||CHAR||1||Status of Valuation Quantity|
|LOGPOS||CHAR||2||Logical Position of Handling Unit|
|UII||CHAR||72||Unique Item Identifier|
|.INCLUDE||0||Customer Status for Stock Data Transfer|
|DUMMY_ISU||CHAR||1||Dummy function in length 1|
Thanks for your reading.
I would love to receive any Feedback/ Comment from you.
Upload stock with /SCWM/ISU
Link to download Initial Stock upload for /SCWM/ISU – SAP Note 974852
SAP Best Practice for Initial Stock upload with data template – SAP Note 2483936
Excellent explanation Dang! Thanks!
LSMW file seems one level. Is it possible to upload HU with stock? You know ISU can upload stock with HU, but they are in different lines of the file.
hi can ho share the template file to upload stock this step