SAP Batch Determination made easy

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

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.

Step 1 – Standard SAP characteristics you will import


The first thing you need to do is to check that your SAP client has all the required SAP standard characteristics. To do this go to transaction CT04 and
query your system to find all characteristics that are called LOBM*.

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)

The following messages will be displayed if everything goes well.


Once that is done you might want to go back to transaction CT04 and query for characteristics called LOBM*.

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.

Moving on to step 2 and getting your basic data right.

Step 2 – Create and assign Batch class to products you will do


In our case we have one product, to which we have assigned one class (of technical type 023 – batches). This class has been conveniently called
“EXPIRATION” and contains only one characteristic. That characteristic is one of the standard SAP ones called “LOBM_VFDAT – Expiration date, shelf
life”. The system has been set up in such a way that when ever I do a goods receipt on this product, SAP will ask me to input the production date and then
based on the shelf life of the product, automatically calculate the expiration date of my batch.
This will update a standard SAP table field (MCHA-VFDAT / MCH1-VFDAT – depending on the validity of your batch across plants). This will in turn
update the value of the characteristics LOBM-VFDAT within the batch .

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.

Step 3 – Create a Batch search class you will do


This is a class that will be used to search and find applicable batches during batch determination. It is not directly assigned to the product – it will be
assigned to the batch search strategy of the product.

The question is, what characteristics should we put in this class?

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).

To do this, call transaction CU70.

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.

Save your sort key.

Step 5 – Create a batch search strategy you will do


We want to create a search strategy during delivery processing, i.e in SD – Sales and distribution. So call transaction VCH1 – to create it. We’ll create a
strategy determined based on the customer and the material (standard strategy type SD01 caters for that).

Enter your customer and product (amend the strategy as required).

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.

Published on September 5, 2008 3:47 pm.


Filed under: SAP
16 Comments

1. Zazou says:

September 14, 2008 at 8:59 pm

Wow Pascal, you are definitely on my A-List :-)

2. sumedha says:

January 30, 2009 at 3:48 pm

great document extremely useful

3. Gagan Mohan Singh says:

May 9, 2009 at 3:44 am

Class Pascal. Really Class document.

4. Jason Bailey says:

May 23, 2009 at 4:03 am

Great Document, I have another situation.

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:

May 23, 2009 at 12:45 pm

What do you mean another case? What I describe is exactly the answer to your problem.

6. frankyue says:

June 24, 2009 at 4:56 pm

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:

June 25, 2009 at 2:30 am

I misunderstand your meaning.


lobm_rlz should not be inclueded in the material batch class.
8. renet@web says:

June 25, 2009 at 9:03 pm

You do not need to have the characteristic LOBM_RLZ in the batch class.

9. Ninad says:

July 1, 2009 at 6:44 pm

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.

Thanks & Regards


Ninad

10. Wendy Venditelli says:

December 15, 2009 at 2:50 am

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

11. Raj says:

January 19, 2010 at 8:13 am

Oh GOD.Pascal You are so great and i enjoyed your document.Greattttt

12. hrishi says:

February 25, 2011 at 11:23 pm

where is d attachment?

13. Pascal says:

February 26, 2011 at 9:10 am

Where is the please?

14. kit kecemasan iklan duit cepat mudah says:

November 30, 2011 at 11:31 pm

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:

February 17, 2012 at 12:47 am

So Nice, really thanks :)

16. sudheer says:

April 11, 2012 at 10:31 pm

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

You might also like