cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Updating MinStock for a specific warehouse using DTW

Former Member
0 Kudos
1,834

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.

Accepted Solutions (0)

Answers (3)

Answers (3)

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

Former Member
0 Kudos

Hi,

The answer is: NO. You have to include linenum. It is more important than wharehouse code.

Thanks,

Gordon

KennedyT21
SAP Champion
SAP Champion
0 Kudos

HI Vaughn,

If you want to upload the minimum/max inventory, you can create only 1 template for OITW and select this template at ItemWareHouseInfo on step 4.

There is no need to select items template.

The mode I selected was Add new and update existing and it works fine.

ItemCode  LineNum  MinStock  Warehouse

Required these four column in oitw.

Regards

Kennedy

Former Member

Kennedy,

As I stated above, I have tried with and without OITM as part of the data source and it doesn't work either way. I also stated that I tried the option (mode) 'Add New Data and Update Existing Data' and it doesn't work. I also mentioned that I can get it to work with LineNum and without Warehouse, but not with Warehouse and without LineNum. My question is, can I do this using Warehouse instead of Linenum? Does your response say No I can't or does it say that I can do it using those four fields?

Thanks for the response

KennedyT21
SAP Champion
SAP Champion
0 Kudos

Yes you can do with those four fields,

ex

Itemcode      lineno     minqty     whscode

cv43               1          1234          01

Kennedy

Former Member
0 Kudos

That doesn't answer my question. Can I do it without the LineNo. I want to be able to update it with ItemCode, WhsCode and MinStock.

It will be a pain to get all the correct line numbers for all of the items they will be updating. They have many items with many warehouses and the linenum for those warehouses won't always be the same, but the warehouse code will.

KennedyT21
SAP Champion
SAP Champion

HI ,

It is not possible without using lineno in DTW.

Through SDK you can devlop on own..

You can use the Query to find the Line number,

SELECT T0.ItemCode, WhsCode,
ROW_NUMBER() OVER(PARTITION BY T0.ItemCode ORDER BY T0.ItemCode),

FROM OITW T0

ORDER BY T0.ItemCode

Hope helpfull,

Regards

Kennedy