Blog Post

MAR
17
2016
Replenishment Process

Trick to create inventory replenishment in SAP Business One

A common business process within any company that needs to deal with inventory movements between multiple warehouses is managing replenishment.

If you don’t want the users to have to run MRP every time that they need to take in consideration the demand between warehouses to create inventory transfer requests, check it out.

This post will show you a simple way to automate this task in SAP Business One. It will only require some basic knowledge of programming using SAP DI-API SDK.

SCENARIO:

Create Inventory Transfer Requests between Warehouse1 and Warehouse2.



TOP

SETUP:

  • Create an UDF for the Min Quantity to Order under Items - Warehouse;
Replen2
  • Enter the Min Stock, Max Stock and Min Qty to Order per Item and per Warehouse under the Inventory Master Data screen;
Replen1
  • Create a query that will pull the: Item Code, Quantity to Order, From Warehouse and To Warehouse. I recommend creating a View, since that would make easier to change the logic if needed, without having to recompiling the program.
  • Create a program to run the query previous developed and create the Inventory Transfer Requests;
  • Use the Windows Task Scheduler to setup the program to run every X minutes.

 

TOP


The Program

The C# program has only 4 classes:

  • Program.cs (main class);
  • Database.cs (class to write logs as the inventory transfer requests get created);
  • global.cs (class to connect and disconnect from the SAP Business One database);
  • ITR.cs (class to create the Inventory Transfer Requests)
Replen3

Main program

Note
The purpose of this post is not teaching C# programming with SAP DI-API. For that reason, I'm not sharing the code here. If you have any questions, please send me a message.

TOP

Task Scheduler

Once the program is created, all you have to do is use the Windows Task scheduler to run it every X minutes.

Replen4

Please send me a message if you have any questions.

 




Leave a Reply

*

captcha *