This article describes how to generate custom Replenishment orders using the default bin location per item and warehouse.
That's an alternative from standard replenishment robot provided with WMS that allows then to customize and adapt the logic of that functionality.
You can automate this task with the following script configured for Produmex Robot tool.
In this example I am going to create a Replenishment order for every items with a default location that is a picking location.
I will also use PMX WMS field "Replenishment : Quantity on Pick Locations" as my Minimum Stock Level so it will be the replenishment trigger.
I also defined simple rules on purpose that should be adapted to each case :
R1 : I am creating replenishment orders only if I got available stock in bulk location and on a SSCC.
R2 : I don't calculate a replenishment quantity. I am transferring the whole SSCC from bulk to picking when replenishment is needed.
The script is named Replenishment_Based_Default_Location.cs and is attached.
That script will use three views to identify the item + location that requires a replenishment.
Based on that it will create a move order and complete the source LUID and location information from second view applying FEFO on the BBD.
Save that script as Replenishment_Based_Default_Location.cs into folder C:\Program Files\Produmex\Produmex Tools\CsScript\
The script can be explained in 3 steps :
STEP 1 : GET OPENED MOVES AND CLOSE THEM : OPTIONAL
string queryOldMO = @"SELECT ""DocEntry"" FROM PMX_MOHE WHERE ""DocStatus"" = 'O' AND ""MoveOrderType"" = 'R'";
I start my script by closing every open move orders.
I consider that if a move order is not done, I prefer to re-initialize calculation and start again from scratch.
STEP 2 : IDENTIFY THE BINS THAT NEED TO BE REPLENISHED
string queryDemandByItem = @"SELECT DISTINCT T0.""ItemCode"", T0.""QtyToMove"", T0.""StorLocCode"", T0.""PmxWhsCode"" FROM PMX_REPLENISH_PICKLOC_DEMAND_BASED_DEFAULT_LOCATION T0 WITH(NOLOCK) INNER JOIN PMX_REPLENISH_AVAILABLE_BULK_STOCK_CHECK T1 WITH(NOLOCK) ON T0.""ItemCode"" = T1.""ItemCode"" AND T0.""PmxWhsCode"" = T1.""PmxWhsCode""";
In that query, I am looking in the view PMX_REPLENISH_PICKLOC_DEMAND_BASED_DEFAULT_LOCATION to identify then pick location that requires replenishment.
I simply add current stock + open move orders and compare it with the minimum stock I should have.
There is the possibility to consider maximum stock at the location, calculate replenishment quantity (QtyToMove) and also open picklist if you want to anticipate the replenishment.
I also link the result with PMX_REPLENISH_AVAILABLE_BULK_STOCK_CHECK, it allows me to create move orders only if I got stock available on SSCC in my warehouse.
This way I avoid to create empty move order with no possibility to proceed to replenishment.
STEP 3 : GET BULK STOCK OVERVIEW PER EACH ITEM
string bulkStockQuery = @"SELECT * FROM PMX_REPLENISH_BULK_STOCK WHERE ""ItemCode"" = '"+ itemCode + @"' AND ""PmxWhsCode"" = '"+ PmxWhsCode + @"' ORDER BY ""BestBeforeDate"" ";
Using the view PMX_REPLENISH_BULK_STOCK, I will now allocate a source bulk location to every pick location that need replenishment.
It is considering the quality status and also the LUID's that are already in a picklist or in another move order.
As a result, that list will be used then in the script to select the right LUID.
Then you need to use that script in a .bat file that can be triggered manually, by a windows task, by the Notification Listener or through a button in SAP or on the fat client.
"C:\Program Files\Produmex\Produmex Tools\Produmex.Sbo.Logex.Tools.Robot.exe" /t:csscript /a1:"C:\ProgramFiles\Produmex\ProdumexTools\CsScript\Replenishment_Based_Default_Location.cs" /cs:yourconnectionstring
Pause
Comments
0 comments
Please sign in to leave a comment.