Professional Documents
Culture Documents
SAP Batch Determination made easy
SAP Batch Determination made easy
SAP Batch Determination made easy
http://www.renet-web.net/2008/09/05/sap-batch-determination-made-easy/
Recently a colleague encountered the following problem:
His customer tracks perishable products that are bought / inventory managed / sold using the SAP functionality Batch Management (LO-BM). The
products have a shelf life and therefore a “Use by/Expiration” date. His problem was that he was able to correctly update the characteristic “Expiration
date” of the batch, but was not able to select batches during the delivery stage, based on the “Expiration date” – i.e batches that were still fit for use.
So here is a tutorial on how to select batches during the delivery (but it could be applied to any batch search requirement) for which the shelf life has not
expired. It has to be noted that SAP covers all kinds of scenario.
- It might be company practice to ship out the door products with a minimum shelf life of X days
- It might be that a specific customer requires a product with a different, longer minimum remaining shelf life
- It might also be that products that are shipped to a specific country require a yet again different minimum shelf life
It might be that you require all three or a logical combination of all three. SAP will easily cover all those requirements and more.
This tutorial only covers the batch determination process in SD, but once you get the jist of it you should be able to apply this to any other module where
that function is covered. I also assume that you have set up your system in such way that you are able to have products batch managed.
If a list of values such as the one below is returned then it means that you are all set to go to Step 2 – Create and assign Batch class to products.
If not it means that you need to copy them from client 000. To do that go to customizing and follow the path indicated: Customizing / Logistics – General /
Batch Management / Batch Valuation / Updates Standard Characteristics (or transaction BMSM)
Why do I need to do that do you ask? Well for one thing all the work is done for you. Secondly and more importantly the standard SAP functions that will
enable us to dynamically calculate the “Expiration date” based on minimum remaining shelf life, makes use of these standard characteristics – they are hard
coded in the ABAP functions.
So if we look at the shelf life list report (transaction MB5M) we see that this information concurs with that contained in the classification of our batches.
If we go back to basics, what we will want to do, is find batches that have a remaining shelf life of X days. If we view this requirement in a different way,
we can say that we will want to find batches that have an expiry date that is equal or greater to “delivery date + X days” . My class will therefore use the
following characteristics:
- LOBM-VFDAT : The expiration date of the batch – that value SAP will calculate.
- LOBM-LFDAT : The delivery date – that value will be automatically updated by SAP with the delivery date from the delivery
All we need is a characteristic where we will be able to input the value corresponding to X (minimum remaining shelf life required). Again, we do not need
to do anything, SAP provides the characteristic “LOBM_RLZ – Remaining Shelf Life for Batch”, to do just that. We therefore have a class (also of
technical type 023 – batches) that looks like this.
Step 4 – Create a sort rule you will do
It’s all good to build a batch search class to find batches, but assuming SAP finds numerous batches, how should they be sorted (i.e which should be the
first one used?) ? By batch number? Of course not, we want to sort batches based on the expiration date in ascending order (the batches with the date
closest to the present should be the first to go).
Give your sort sequence a name and in the following screen, give it a description as well.
Then click on the characteristics button and assign the characteristic LOBM-VFDAT to it. Also select/amend the sort order that you want.
Click on the “selection Criteria” button to assign the search class. In this case we indicated our search class, which copied across the characteristics
associated with it.
We also indicate the value “>=30″ in the characteristic “Remaining Shelf Life for Batch” – this means that we will only want to select batches that have an
expiration date that is greater or equal to delivery date + 30 days.
Now go back to the previous screen and now click on the “sort” button. There you will assign the sort rule you created in the previous step.
Save your work.
Step 6 – Putting it into practice – the fruit of your efforts you will see
Now that we have created all the required basic data, let’s see how it all hangs together.
We have a sales order for which we create a delivery – batch search will be triggered manually to better follow the process.
In the delivery, we go to the batch determination screen and we see that the system has automatically searched, found and proposed batches that have a
remaining shelf life that is greater or equal to 30 days only and it has sorted them according to expiration date – just what we wanted.
The system here proposes 3 batches (yet remember that above, it did indicate that we had 5 batches in the system). To get a better idea of what parameters
were calculated/used to determine those three batches, click on the “selection criteria button”.
We see the >=30 that we typed in the batch search strategy. We also see that the system took the delivery date “08.09.2008” added 30 days to it and
determined that the batch it was going to search for had to have an expiration date greater or equal to 08.10.2008.
We can also change the search parameters here (this is customizable). We’ll change the value of 30 to 4 right there in the batch determination.
This shows even more batches – logical as we have indicated that batches should only have a remaining shelf life of 4 days or more.
1. Zazou says:
2. sumedha says:
I work in the Milk and Dairy industry, we have some customers who require shelf life greater then 20 days and other greater then 15 days. To add another layer of
detail I have some customers who require 20 days remaining of shelf life but require that Material X has greater then 25 days and other items use the 20 day rule.
How to you set somthing like this up?
5. renet@web says:
What do you mean another case? What I describe is exactly the answer to your problem.
6. frankyue says:
dear guys
have you ever have the problem below.
Cause the bacth character lobm_rlz is required,
and this character value is not assigned .
so the status of batch classification is incomplete.
then when batch dertemination , this batch can’t be choossed.
7. frankyue says:
You do not need to have the characteristic LOBM_RLZ in the batch class.
9. Ninad says:
Hi
A quick question – you have mentioned that changing the search parameter in batch determination is customizable. Where do we do this in SPRO. Will appreciate
if you can comment on this.
Hi – Have set up exactly as you note but cannot get the batch characteristics updated automatically. After running BMSM, I get the first part of the message saying
all were copied successfully but I do not get the remainder of the message stating that the standard characteristics are being maintained with the object
dependencies. Is this my problem?
Thanks,
Wendy
where is d attachment?
Thank you for any other wonderful article. The place else may anybody get that kind of info in such a perfect method of writing? I have a presentation subsequent
week, and I am on the search for such information.
15. ramy says:
I have done all configs for Batch detemn for delivery. But batch is not coming automatically in delivery . i need to go to batch split etc to determine the same
manually. appreciate if u can tell me.
Thx in advance