cancel
Showing results for 
Search instead for 
Did you mean: 

Updating MinStock for a specific warehouse using DTW

Former Member
0 Kudos
1,375

I have found similar discussions, but can't find an answer. Using DTW, I want to update the MinStock value for a number of items, but for just a specific warehouse. The items are set to Manage Inventory by Warehouse. I have no problem when I update with LineNum in my OITW template, but when I use WhsCode instead of LineNum, I receive the following error from DTW: This entry already exists in the following tables (ODBC - 2035) Application-defined or object-defined error65171. Can't I update this based on WhsCode? I don't want to use LineNum because I don't think I can gaurantee that the LineNum, for the Warehouse I want to update, will always be the same. I don't want to ask the users to maintain a list of items and the appropriate LineNums associated with the specific Warehouse.

I would like something like this...

ParentKey   WarehouseCode     MinimalStock

ItemCode     WhsCode              MinStock

00000136     621sto                  12345

00000137     621sto                  98765

Rather than something like this...

ParentKey    LineNum     MinimalStock

ItemCode      LineNum     MinStock

00000136      7                12345

00000137      6                98765

Is this possible? I have tried with and without including OITM in the data source (with OITW). I have tried the 'Updating Existing Data' option and the 'Add New Data and Update Existing Data' option.

Thanks for any help and let me know if you would like more details.

View Entire Topic
Former Member
0 Kudos

Hi All...

Where to get the field LineNumber from? I'm checking OITW and there is not LineNum field.

Former Member
0 Kudos

I do this process on a twice yearly basis.  To date I have not found this line number value in SAP.  I always have to export to excel then manually calculate what the line value is in SAP.  Yet another bonus feature, bit painful w/ 54 warehouses..

Former Member
0 Kudos

Ohh. i see.

Well, I just did 1 by 1.

200 items 1 whs is not a big deal.

I finished already.

I'll keep this post following up if another solution comes up....

Thanks.

JUAN

Connor_L
Discoverer
0 Kudos

Don't know how you have made it work without the LineNum, certainly doesn't for me. But for me the Linenum turned out to be the row number of the whs when sorting the whscode's alphabetically and counting from 0.

So:

SELECT T0."WhsCode", ROW_NUMBER() OVER (ORDER BY T0."WhsCode") -1 AS "RowNumber" FROM OWHS T0 ORDER BY T0."WhsCode"

Gives me a table of the corresponding line num to each warehouse. I can then VLOOKUP this in excel while creating the file to populate the linenum column. 

Hope this helps 🙂 Connor