quarta-feira, 24 de março de 2021

Scenario - Shelf Life for Batch Stocks in PPDS (Without Production Date)

 

Purpose

This page will provide an example on how to integrate shelf life dates for back stocks in PP/DS, when the Date of Manufacture of batch is not informed

Overview

The relevant characteristics and dependencies are shown, in APO and in ECC. Batches are created and integrated into APO, and the shelf life dates are shown. The example follows the steps described in note 810694

Table of Contents

Example Creation

Background Information

  • The example assumes the involved materials, BOMs, work centers, routings/recipes, and production versions are already maintained - no details will be provided on this
     
  • If you are extending an existing Batch Class instead of creating a new one and there are already some batches in the system, it is required to reclassify the batches 
     
  • If the batches are sent to APO without correct classification, they will have no Shelf Life dates in APO and suffix 01.01.1970 or 31.12.1969 will be added to the stock number. Furthermore, this batch stock will not be used to cover any demands in the system, be it via pegging or during heuristic planning - this can lead to unwanted exceess planned production, unexpected under coverage or product/receipt too late alerts, as well as unclear Days' Supply calculations

Batch Level Customizing

  • The Batch level on ECC side should be set to Unique at Material Level, such that Batch Class Type 023 is used, given Class Type 022 is not supported in APO
  • To make sure the setting is correct, execute transaction OCHA, then execute action "Specify Batch Level and Activate Status Management"

 

  • In the new screen, click Batch Level button. Then, select option Unique at Material Level if it is not already selected, and save


 

  • Press Back button to return to the previous screen. If you had to change the setting in the previous step, button Batch level -> conversion is now enabled and you need to run it to update the related database tables
  • Please, notice as soon as you execute the conversion, it is not possible to change the Batch Level back to "Unique at Plant Level" anymore

Organizational Areas in APO and ECC

  • The shelf life dates are integrated to APO as characteristics, therefore Organizational Areas must be defined in both environments for the class types to be integrated.
  • Firstly, on ECC side, execute transaction O1CL, select table MARA in the list and double click folder Organizational Areas. Then, create a new entry for Class Type 023

 

  • In APO side, also in transaction O1CL, select /SAPAPO/MATKEY entry in the list and double click Organizational Areas folder. Here, an entry should be created for Class Type 230 (or 232)

Create The Shelf Life Class with the Relevant Characteristics

  • In transaction CL01, create a class with Class Type 023 and specify the Organizational Area

 

  • Go to Characteristics tab and add the shelf life characteristics. Notice that only for the LOBM_APO* characteristics the Organizational Area must be specified, such that only them are integrated to APO - integration of the other LOBM* characteristics is not recommended in this scenario. Save!
  • Notice that, while LOBM_APO_SL_MAX and LOBM_APO_SL_UTC must be added to the class, LOBM_APO_SL_MIN is optional.
     

Generate and Check the Class Dependency

  • The shelf life dates to be sent to APO and assigned to the LOBM_APO* characteristics are calculated with dependency SL_UTCMINMAX_COMPUTE  
  • Notice that this step does not have to be executed everytime you create a new shelf life class. Rather, it's usually not necessary to run it more than once.
  • The dependency can be generated by running program RSL_UTCMINMAX_MAINTAIN in transaction SE38 


  • The logs can be seen once the report is successful


  • In transaction CU02, make sure that Dependency SL_UTCMINMAX_COMPUTE has status Released


  • In transaction CU66, make sure that Function SL_UTCMINMAX_COMPUTE has status Released

  • In transaction CU02, make sure that dependencies SL_UTC_COMPUTE, SL_MIN_COMPUTE and SL_MAX_COMPUTE have status Locked
  • This is done because in this scenario the shelf life dates will be calculated with the Class dependency SL_UTCMINMAX_COMPUTE, not with the characteristic dependencies. Example:

Assign the Dependency to the Batch Class

  • In transaction CL02 when changing the class in Basic data tab, go to menu Extras → Object Dependencies → Assignments

 

  • Then, assign SL_UTCMINMAX_COMPUTE and save
     

Assign the Batch Class to the Material and Make Batch Management Required

  • In transaction MM02, maintain the Batch Class in Classification View

 

  • In Work Scheduling view, set the flag Batch Management Required
  • If this flag is not set, batches will not be selected for integration later on

 

  • In Plant data / storage 1 view, maintain the Minimum Remaining Shelf Life and Total Shelf Life for the material
     

Integrate the Master and Transactional Data to APO

Master Data

  • In transaction CFM1, create an Integration Model for the Master Data
  • In this case, the involved Location-Products, PDS, and Work Centers are included in the selection








 

  • Activate the Integration Model in CFM2




     

Transactional Data

  • Create an Integration Model for the transactional data
  • In the example, Storage Location Stocks, Batches, and other data such as Planned and Production Order are selected




 

  • Activate the Integration Model in CFM2
     

     

     

Create and Classify a Batch, then Add Stock Quantity to It

  • For the purpose of this example, the batch and stock quantity will be created and posted manually

  • In transaction MSC1N, create a batch in the desired Plant and Storage Location (0001 and 0001, in this case)
  • Specify the expiry date (SLED) and Available From and press enter

 

  • Go to Classification tab. Check that characteristics are valuated, then save

 

  • In transaction MIGO, specify:
    • Transaction/Event: Goods Receipt
    • Reference Document: Other
    • Movement Type: 501 - Receipt w/o purchase order into unrestricted project
  • Press Enter
  • In tab Material, specify the Material Number

 

  • In tab quantity, type how much you'd like to post

 

  • In tab Where, type the Plant and Storage Location

 

  • In tab Batch, specify the batch number

 

  • Set flag Item Ok, then click Check button to verify whether there are any errors


 

  • If there are no errors, click Post button, and check that it was posted successfully


 

  • Execute transaction MMBE for the batch and check that it does contain the quantity


     

Verify the Availability Date and the Shelf Life Dates for the Batch Stocks at the Product View

  • Execute transaction /SAPAPO/RRP3

 

  • Notice that Versions tab appeared - this tab will be shown when there are classified batches in the system
  • Check that the Maximum Shelf Life Date/Time was successfully integrated to APO for batch YOG1

 

  • Go to tab Versions. Specify Created From date earlier than the date the batches were created on and press Enter
  • Check that for YOG1 the Shelf Life dates (Reference Timestamp of Batch, Maximum Shelf Life in Seconds) are shown, and that the Classification Status is green
     

Related Content

Related Documents

SAP Help Planning with Shelf Life Data in PP/DS
SAP Help Shelf Life Data
SAP Help Dynamic Pegging Considering Shelf Life Data
SAP Help Planning with Shelf Life Data in SNP

Related SAP Notes/KBAs

SAP Note 810694 - Shelf life with initial production date not transferred
SAP Note 751392 - Shelf life R/3 -> APO: Settings in R/3
SAP Note 563863 - Planning with shelf life as of APO 3.1
SAP Note 78235 - Revaluating ref. characterstcs in batch classifictn  

Recent Correction Notes

SAP Note 2303395 - /SAPAPO/RRP3: Surplus created during heuristic run for shelf life products usin
SAP Note 1640461 - Product heuristic ignores fixed receipt with shelf life
SAP Note 2150056 - SAP_PP_025: Shelf life value could not be propagated
SAP Note 2129709 - Shelf Life date is not displayed in the product view

 

Source: https://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=451071164

Batch determination with object dependencies. Picking batches with % RSL in EWM

 Sometime it is required to conduct batch determination and calculate SLED dynamically. The dynamic SLED calculation conducted during batch determination in ERP or in EWM gives a leverage to customer to pick batches with remaining shelf life in percentage or with Remaining shelf life in days.

Business don’t want  to predefine a certain date as a selection criterion in the strategy record but need a functionality to make a dynamic SLED calculation on the basis of data taken from the sales order or the delivery,and a value which is predefined in the selection criteria (the remaining life as a percentage of the total shelf life.

Imagine a below case.

  • A batch managed milk product when shipped from Canada to Brazil, EWM system should pick only those batches whose remaining shelf life(RSL)>=40%

 

  • The same product when shipped to a customer in India, EWM system should be able to pick those batches which satisfy the RSL>=70%

 

 

 

So, the equation of Shelf life expiration date.

Shelf life expiration date = Delivery date + (Remaining shelf life in % * total shelf life / 100)

Hence, EWM delivery document should be capable enough to pick batches fulfilling the above equation.

Physics behind the Dynamic Batch determination

To carry out the above calculation, an object dependency needs to be created and same needs to be linked to the characteristics which is the influencing value. Here the influencing value is LOBM_RLZ_PROZ.

SAP has given a standard characteristics LOBM_RLZ_PROZ.

LOBM_RLZ_PROZ is linked to an Object dependency to infer values from characteristics using below code.

 

Note:  In S/4HANA object dependencies,use the dependency type ‘Procedure‘ instead of ‘Action’. The dependency type ‘Action’ is not supported in S/4HANA.

 

  1. Selection class:  Take LOBM_RLZ_PROZ, LOBM_VFDAT and LOBM_LFDATE only
  2. Batch class: LOBM_VFDAT
  3. Create Condition record for 2 customers and assign the selection class.

 

Create 2 Sales order with delivery date for 2 customers as below.

  • For customer in India, EWM should pick only those whose RSL>=70% and should have dynamic SLED of 9th may

 

  • For Customer in Brazil, EWM should pick batches whose RSL>=40% having dynamic SLED of 4th may.

 

Delivery in ERP.

 

Batch Selection criteria in EWM:

Check the warehouse request against the ERP delivery in EWM. EWM system has successfully carried the dynamic SLED calculation using object dependency of variant configuration.

Shelf life expiration date = Delivery date + (Remaining shelf life in % * total shelf life / 100)

 

Batch picked against the correct dynamic SLED.

  • For RSL>=40%, Customer based in brazil, EWM picks only those batches whose SLED >=04.05.2020
  • For RSL>=70%, Customer based in India, EWM picked only 2 batches which satisfied the condition of dynamic SLED equation.

 

Monitor stock:

  • One batch is not picked because it didnt satisfy the any SLED equation.

 

This dynamic SLED calculation is extremely powerful as it enhances EWM capability to validate SLED/BBD in Outbound process.

SAP EWM even allows to pick expired batches from Storage bin, there is no check or configuration in Standard which allows to forbid this action. Though, in Inbound process, SAP EWM has the capability to check SLED/BBD, but outbound process has no such functionality.

 

Outbound process:

For outbound process, there is no validation process for BBD/SLED and EWM can even pick expired batches. The configuration to validate SLED/BBD is missing for outbound document category PDO and item type ODLV.

 

Note: If you take total SLED in months, then there will be rounding values as Functional module use be below code . Months is constant as 30. So, for better calculation take SLED in Year.

 

Batch status management (LOBM_ZUSTD) can be used to change the expired batches from ” Unrestricted to Restricted” and enforce configuration in EWM to disallow creation of warehouse task with restricted use batch. However, this is again a manual operation to change batch status.

There is one program /SCWM/R_STOCK_TYPE_CHANGE  which can be scheduled in background to move the expired batches to block stock types.  But, the dynamic batch determination using selection criteria like LOBM_RLZ and LORB_RLZ_PROZ is much much powerful than above.

References:

SAP note: 1305608 – Overview: Best-before date/expiration date batches

SAP note: 33396 – Batch determination: Selection with remaining shelf life LOBM_RLZ

 

There are some more powerful functionality given in S/4 HANA 1909 on Batches in EWM. In my next, blog I would write on Stock Consolidation by Batch consolidation.

https://help.sap.com/viewer/e296651f454c4284ade361292c633d69/1909.000/en-US/001bcfe3917949f8810a54270f9ced00.html

 

Best regards

Shailesh Mishra