Supply Chain Management Blogs by Members
Learn about SAP SCM software from firsthand experiences of community members. Share your own post and join the conversation about supply chain management.
cancel
Showing results for 
Search instead for 
Did you mean: 
Dang_Bao_Van
Participant

Introduction


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.

 

Note:



  • 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.




Specify Files

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.




Tcode /SCWM/ISU


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?
MANDT CLNT 3 Client R
POSTYPE CHAR 1 Item Category for Stock Data Transfer R
MATNR CHAR 40 Product R
OWNER CHAR 10 Owner R
OWNER_ROLE CHAR 2 Partner Role of Owner R
BATCH CHAR 10 Batch
CAT CHAR 2 Stock Type 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
STOCK_USAGE CHAR 1 Stock Usage
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
QUAN CHAR 32 Quantity R
UNIT UNIT 3 Base Unit of Measure R
HUTYP CHAR 4 Handling Unit Type
LGPLA CHAR 18 Storage Bin R
GR_DATE DATS 8 Goods Receipt Date
GR_TIME TIMS 6 Goods Receipt Time
VFDAT DATS 8 Shelf Life Expiration Date R
PMAT CHAR 40 Product
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
ROW CHAR 10 Row Identification
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
UNIT_GW UNIT 3 Weight Unit
T_WEIGHT CHAR 16 Tare Weight Handling Unit
UNIT_TW UNIT 3 Weight Unit
G_VOLUME CHAR 16 Total Volume of Handling Unit
N_VOLUME CHAR 16 Loading volume of handling unit
UNIT_GV UNIT 3 Volume Unit
T_VOLUME CHAR 16 Tare Volume of Handling Unit
UNIT_TV UNIT 3 Volume 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
LENGTH CHAR 16 Length
WIDTH CHAR 16 Width
HEIGHT CHAR 16 Height
UNIT_LWH UNIT 3 Unit of Dimension for Length/Width/Height
MAX_WEIGHT CHAR 16 Maximum Weight
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
SERID CHAR 30 Serial Number
CWQUAN CHAR 32
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
ZEUGN CHAR 10 Certificate Number

 

Thanks for your reading.

I would love to receive any Feedback/ Comment from you.

 

Regards,

Van Dang

 

Reference


Upload stock with /SCWM/ISU

https://blogs.sap.com/2014/05/19/initial-stock-upload-in-ewm/

Link to download Initial Stock upload for /SCWM/ISU - SAP Note 974852
https://launchpad.support.sap.com/#/notes/974852

SAP Best Practice for Initial Stock upload with data template - SAP Note 2483936

https://launchpad.support.sap.com/#/notes/2483936
5 Comments
maurojara3
Participant
0 Kudos
Excellent explanation Dang! Thanks!
anzipeng
Explorer
0 Kudos
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.
0 Kudos
hi can ho share the template file to upload stock this step
Anna_Strokova
Explorer
0 Kudos
Hello.  Is it possible to assign a movement type other than 561 for the TCode /SCWM/ISU ?

Thank you!
barys_mikhno
Explorer

Hi @Anna_Strokova , 
You can use Enhancement Spots /SCWM/ES_ERP_GOODSMVT  method /SCWM/IF_EX_ERP_GOODSMVT~CHANGE_MATDOC to change movement type.

Labels in this area