{"id":23,"date":"2013-05-06T10:10:40","date_gmt":"2013-05-06T09:10:40","guid":{"rendered":"http:\/\/www.pierre-vincent.com\/memosap\/?p=23"},"modified":"2013-05-06T10:10:40","modified_gmt":"2013-05-06T09:10:40","slug":"batch-determination-made-easy-determination-automatique-des-lots","status":"publish","type":"post","link":"http:\/\/www.pierre-vincent.com\/memosap\/2013\/05\/06\/batch-determination-made-easy-determination-automatique-des-lots\/","title":{"rendered":"Batch determination made easy \/D\u00e9termination automatique des lots"},"content":{"rendered":"<p>S\u00e9lection\u00a0automatique des lots \/ D\u00e9termination automatique des lots<\/p>\n<p>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.<\/p>\n<p>&#8211; It might be company practice to ship out the door products with a minimum shelf life of X days<br \/>\n&#8211; It might be that a specific customer requires a product with a different, longer minimum remaining shelf life<br \/>\n&#8211; It might also be that products that are shipped to a specific country require a yet again different minimum shelf life<\/p>\n<p>It might be that you require all three or a logical combination of all three. SAP will easily cover all those requirements and more.<\/p>\n<p>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.<\/p>\n<h3>Step 1 \u2013 Standard SAP characteristics you will import<\/h3>\n<p>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*.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"screenshot - LOBM search\" src=\"http:\/\/www.renet-web.net\/wp-content\/uploads\/2008\/09\/screenshot005.jpg\" alt=\"\" width=\"500\" height=\"241\" \/><\/p>\n<p>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 \u2013 Create and assign Batch class to products.<\/p>\n<p><img decoding=\"async\" title=\"LOBM standard chars\" src=\"http:\/\/www.renet-web.net\/wp-content\/uploads\/2008\/09\/screenshot006.jpg\" alt=\"\" \/><\/p>\n<p>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 \u2013 General \/ Batch Management \/ Batch Valuation \/ Updates Standard Characteristics (or transaction BMSM)<\/p>\n<p>The following messages will be displayed if everything goes well.<\/p>\n<p><img decoding=\"async\" title=\"P1 std chars\" src=\"http:\/\/www.renet-web.net\/wp-content\/uploads\/2008\/09\/screenshot001.jpg\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" title=\"P2 std chars\" src=\"http:\/\/www.renet-web.net\/wp-content\/uploads\/2008\/09\/screenshot002.jpg\" alt=\"\" \/><\/p>\n<p>Once that is done you might want to go back to transaction CT04 and query for characteristics called LOBM*.<\/p>\n<p>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 \u201cExpiration date\u201d based on minimum remaining shelf life, makes use of these standard characteristics \u2013 they are hard coded in the ABAP functions.<\/p>\n<p>Moving on to step 2 and getting your basic data right.<\/p>\n<h3>Step 2 \u2013 Create and assign Batch class to products you will do<\/h3>\n<p>In our case we have one product, to which we have assigned one class (of technical type 023 \u2013 batches). This class has been conveniently called \u201cEXPIRATION\u201d and contains only one characteristic. That characteristic is one of the standard SAP ones called \u201cLOBM_VFDAT \u2013 Expiration date, shelf life\u201d. 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.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"GR 1\" src=\"http:\/\/www.renet-web.net\/wp-content\/uploads\/2008\/09\/screenshot007.jpg\" alt=\"\" width=\"500\" height=\"228\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"GR2\" src=\"http:\/\/www.renet-web.net\/wp-content\/uploads\/2008\/09\/screenshot009.jpg\" alt=\"\" width=\"500\" height=\"368\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"GR3\" src=\"http:\/\/www.renet-web.net\/wp-content\/uploads\/2008\/09\/screenshot008.jpg\" alt=\"\" width=\"500\" height=\"212\" \/><\/p>\n<p>This will update a standard SAP table field (MCHA-VFDAT \/ MCH1-VFDAT \u2013 depending on the validity of your batch across plants). This will in turn update the value of the characteristics LOBM-VFDAT within the batch .<\/p>\n<p>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.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Mb5M\" src=\"http:\/\/www.renet-web.net\/wp-content\/uploads\/2008\/09\/screenshot010.jpg\" alt=\"\" width=\"500\" height=\"288\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"batch\" src=\"http:\/\/www.renet-web.net\/wp-content\/uploads\/2008\/09\/screenshot004.jpg\" alt=\"\" width=\"395\" height=\"119\" \/><\/p>\n<h3>Step 3 \u2013 Create a Batch search class you will do<\/h3>\n<p>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 \u2013 it will be assigned to the batch search strategy of the product.<\/p>\n<p>The question is, what characteristics should we put in this class?<\/p>\n<p>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 \u201cdelivery date + X days\u201d . My class will therefore use the following characteristics:<br \/>\n&#8211; LOBM-VFDAT : The expiration date of the batch \u2013 that value SAP will calculate.<br \/>\n&#8211; LOBM-LFDAT : The delivery date \u2013 that value will be automatically updated by SAP with the delivery date from the delivery<\/p>\n<p>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 \u201cLOBM_RLZ \u2013 Remaining Shelf Life for Batch\u201d, to do just that. We therefore have a class (also of technical type 023 \u2013 batches) that looks like this.<\/p>\n<p><img decoding=\"async\" title=\"batch search\" src=\"http:\/\/www.renet-web.net\/wp-content\/uploads\/2008\/09\/screenshot011.jpg\" alt=\"\" \/><\/p>\n<h3>Step 4 \u2013 Create a sort rule you will do<\/h3>\n<p>It\u2019s 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).<\/p>\n<p>To do this, call transaction CU70.<\/p>\n<p>Give your sort sequence a name and in the following screen, give it a description as well.<\/p>\n<p><img decoding=\"async\" title=\"sortkey\" src=\"http:\/\/www.renet-web.net\/wp-content\/uploads\/2008\/09\/screenshot012.jpg\" alt=\"\" \/><\/p>\n<p>Then click on the characteristics button and assign the characteristic LOBM-VFDAT to it. Also select\/amend the sort order that you want.<\/p>\n<p><img decoding=\"async\" title=\"sortkey\" src=\"http:\/\/www.renet-web.net\/wp-content\/uploads\/2008\/09\/screenshot013.jpg\" alt=\"\" \/><\/p>\n<p>Save your sort key.<\/p>\n<h3>Step 5 \u2013 Create a batch search strategy you will do (VCH1 for SD, MBC1 for PP)<\/h3>\n<p>We want to create a search strategy during delivery processing, i.e in SD \u2013 Sales and distribution. So call transaction VCH1 \u2013 to create it. We\u2019ll create a strategy determined based on the customer and the material (standard strategy type SD01 caters for that).<\/p>\n<p><img decoding=\"async\" title=\"sd01\" src=\"http:\/\/www.renet-web.net\/wp-content\/uploads\/2008\/09\/screenshot014.jpg\" alt=\"\" \/><\/p>\n<p>Enter your customer and product (amend the strategy as required).<\/p>\n<p><img decoding=\"async\" title=\"searchstrat\" src=\"http:\/\/www.renet-web.net\/wp-content\/uploads\/2008\/09\/screenshot015.jpg\" alt=\"\" \/><\/p>\n<p>Click on the \u201cselection Criteria\u201d button to assign the search class. In this case we indicated our search class, which copied across the characteristics associated with it.<br \/>\nWe also indicate the value \u201c&gt;=30\u2033 in the characteristic \u201cRemaining Shelf Life for Batch\u201d \u2013 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.<\/p>\n<p><img decoding=\"async\" title=\"searchcke\" src=\"http:\/\/www.renet-web.net\/wp-content\/uploads\/2008\/09\/screenshot018.jpg\" alt=\"\" \/><\/p>\n<p>Now go back to the previous screen and now click on the \u201csort\u201d button. There you will assign the sort rule you created in the previous step.<\/p>\n<p><img decoding=\"async\" title=\"assisirt\" src=\"http:\/\/www.renet-web.net\/wp-content\/uploads\/2008\/09\/screenshot017.jpg\" alt=\"\" \/><\/p>\n<p>Save your work.<\/p>\n<h3>Step 5bis \u2013\u00a0OPJ2 !<\/h3>\n<h3>Step 6 \u2013 Putting it into practice \u2013 the fruit of your efforts you will see<\/h3>\n<p>Now that we have created all the required basic data, let\u2019s see how it all hangs together.<\/p>\n<p>We have a sales order for which we create a delivery \u2013 batch search will be triggered manually to better follow the process.<br \/>\nIn 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 \u2013 just what we wanted.<\/p>\n<p><img decoding=\"async\" title=\"3batches\" src=\"http:\/\/www.renet-web.net\/wp-content\/uploads\/2008\/09\/screenshot022.jpg\" alt=\"\" \/><\/p>\n<p>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 \u201cselection criteria button\u201d.<\/p>\n<p><img decoding=\"async\" title=\"params\" src=\"http:\/\/www.renet-web.net\/wp-content\/uploads\/2008\/09\/screenshot019.jpg\" alt=\"\" \/><\/p>\n<p>We see the &gt;=30 that we typed in the batch search strategy. We also see that the system took the delivery date \u201c08.09.2008\u201d 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.<\/p>\n<p>We can also change the search parameters here (this is customizable). We\u2019ll change the value of 30 to 4 right there in the batch determination.<\/p>\n<p><img decoding=\"async\" title=\"changestrat\" src=\"http:\/\/www.renet-web.net\/wp-content\/uploads\/2008\/09\/screenshot020.jpg\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" title=\"more batches\" src=\"http:\/\/www.renet-web.net\/wp-content\/uploads\/2008\/09\/screenshot021.jpg\" alt=\"\" \/><\/p>\n<p>This shows even more batches \u2013 logical as we have indicated that batches should only have a remaining shelf life of 4 days or more.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>S\u00e9lection\u00a0automatique des lots \/ D\u00e9termination automatique des lots 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 &hellip; <a href=\"http:\/\/www.pierre-vincent.com\/memosap\/2013\/05\/06\/batch-determination-made-easy-determination-automatique-des-lots\/\">Continuer la lecture <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-23","post","type-post","status-publish","format-standard","hentry","category-prod-planning"],"_links":{"self":[{"href":"http:\/\/www.pierre-vincent.com\/memosap\/wp-json\/wp\/v2\/posts\/23","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.pierre-vincent.com\/memosap\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.pierre-vincent.com\/memosap\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.pierre-vincent.com\/memosap\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.pierre-vincent.com\/memosap\/wp-json\/wp\/v2\/comments?post=23"}],"version-history":[{"count":0,"href":"http:\/\/www.pierre-vincent.com\/memosap\/wp-json\/wp\/v2\/posts\/23\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.pierre-vincent.com\/memosap\/wp-json\/wp\/v2\/media?parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.pierre-vincent.com\/memosap\/wp-json\/wp\/v2\/categories?post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.pierre-vincent.com\/memosap\/wp-json\/wp\/v2\/tags?post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}