Is the quantity resync constantly syncing at the worst times? Here’s how you, Shut. It. Down…

3 minute read time.

Afternoon readers. Today’s topic will be (hopefully) shorter than the last one I did.  This post is going to be on STOWIPW and how to stop it. The STOWIPW is the automatic qty resync for STOCK module that is ran automatically by the system in the back end (like you don’t see it being ran). There is a way to turn it off so you can schedule it at a different time. Why would you want to do this? Well I can think of one good reason. If you have high volume of entries and a ton of product, running resyncs constantly while people are working might not be the best bet. If you don’t need it consistently updated and can wait, it might be best to turn it off, to increase performance efficiency, and run it when you know less people are in the system; like when people are on breaks and/or lunches. I mean, this won’t be for everyone. Most people probably don’t even know its running. But if you have a lot of stuff and a lot of moving parts, it might be worth looking into. Even if it saves like a ½ a second. Over the course of 100,000 entries or product movements or whatever else you use products for. That’s 100,000 ½ seconds saved… you can figure out the rest of the math stuff. The downside to turning it off, is now you have to create a batch task and schedule it to run. The hard part is finding the right time schedule to run it.

Let’s get down to it.

Before we begin, you need to know that we have to use an entry point to do this. The automatic resync is hard coded, so we have to tell the code to not use it. So,  you’re going to want to check out this link HERE. This is a link to the online help where the STOWIPW code is to stop it. We are going to have to utilize that entry point. That entry point is called STOWIPW. It is found in the STKALL code (you just have to remember the name; yawl don’t need to have the code handy).

If you still have that online help page open, you are going to want to copy/paste the example code out. Which is this below:

Case ACTION

  When "STOWIPW":

    WSTOWIPW=0 # Disable real-time WIP resync

Endcase

 

Next, your going to take that code, copy it to a notepad (or notepad++ if you got it) and save it as ZSTKALL.src. like so:

After all of that is done, the next step is to copy this file to the “Endpoint folder of choice” TRT directory.  For my example, I am using the Demo data SEED. You can see the location I am using as ..Folders\SEED\TRT. Note, your directory will most likely be different.

 

Now that we have our entry point code ready; it is time to log in and compile it.  Your going to want to go to development, script dictionary, scripts, script editor (as show below). Make sure you are logged into the right endpoint folder. Coding is always folder specific.

Here you are going to type in the name of the src file, which we called it ZSTKALL. It should look like this:

Click the compile button and your all set. You can double check if it created the adx file by checking the same TRT directory.

So, now we have to add it to the entry point function. That function is in the came place as the script editor I mentioned above but just a couple down.

When you’re in the entry point function you will want it to look like mine. The standard script will be STKALL (as I mentioned at the beginning of the blog) and the specific script is the name of the one we just made, ZSTKALL. You can label a module if you like but you don’t have to. Then click save and you’re done.

Once that is in place, the STOWIPW auto resync should stop happening. Do not forget that you will now have to schedule the FUNSTOWIPW function to run on a scheduled task. I’m not going to demo that here, that will be for another day… muhahaha.

 

A little hint

 

 

Until next time.

  • The downside is that the resync is not done automatically upon saving, or modifying entries. The STOWIPW can cause hanging or locking when large quantities are processed. so therefore you can stop the auto resync to help with performance issues. There would be no resync function ran, hints the reason to run the FUNSTOWIPW. The FUNSTOWIPW is just a manual way to run the STOWIPW they do relatively the same function (can't say exact because of minor coding differences). STOWIPW is by individual saved entries where FUNSTOWIPW is a scheduled/manual process you can run for a more broad collection. The overall outcome is the same, resync stock

  • Hey Chris,

    I'd like to know the down side of disabling this. My understanding is that under the regular process, the system adjust CUMWIPQTYA in the stock table and write a record in STOWIPW table to log who is locking the quantity when someone is in the stock selection screen. After the user finished the transaction, the system removes the STOWIPW record and re-adjust the CUMWIPQTYA in STOCK table. We run FUNSTOWIPW when STOWIPW table and CUMWIPQTYA field is out of sync. And the result of doing this is that the system would release the quantity that previously thought was locked. 

    So by disabling the process in your post, what step(s) are we skipping? Are we running the risk that the inventory may be locked until FUNSTOWIPW is run?