Storage Unit Import with Powershell
Usage
-
Download the files from here.
-
Copy the net45 directory to C:\
-
Run Powershell ISE (x64) as Administrator:
-
Open the ImportSU file in Notepad, copy and paste it to the Windows Powershell ISE:
-
Enter correct credentials (login and password from CompuTec WMS):
-
Enter database server type:
dst_MSSQL = 1,
dst_DB_2 = 2,
dst_SYBASE = 3,
dst_MSSQL2005 = 4,
dst_MAXDB = 5,
dst_MSSQL2008 = 6,
dst_MSSQL2012 = 7,
dst_MSSQL2014 = 8,
dst_HANADB = 9,
dst_MSSQL2016 = 10,
dst_MSSQL2017 = 11,
dst_MSSQL2019 = 15
-
Enter the proper path to the .csv files:
-
Copy BusinessObjects folder from CompuTec WMS to C:\Windows\System32\WindowsPowerShell\v1.0:
-
Run the script.
CSV Files Preparation
-
Download the CSV Files from here.
-
Open Microsoft Excel.
-
Go to Data tab and open From text/CS:
-
Open SUHeader.csv / SULines.csv.
-
From the drop-down menu: Data Type Detection select Do not detect data types. Then press:
-
Right-click on the following columns: U_Code, U_WhsCode, U_BinCode, U_SSCC (U_Parent as well, if you create SU in SU) and change the type from General to Text:
-
Enter proper data: new, different U_Code and U_SSCC, correct warehouse and bin codes. Check the U_BinAbs (AbsEntry from OBIN)
-
Enter the proper data for the following SULines: ItemCode, Quantity, Manage Type, Item Type and DistNumber. Remember, that the Code must be the same as U_Code from SUHeader.
-
Save the files as CSV UTF-8 (comma delimited): XYZ depends on your region. It may be ; or ,. Remember about setting it in the script:
-
Open the files in Notepad and remove the first row: