Most inventories used in the supply network planning run have expiration dates. You can use information relative to inventory expiration dates and future demand needs to reduce future stock-outs via additional replenishment orders. Although shelf-life propagation and associated alerts are fully described in SAP’s standard documentation, you can also incorporate shelf-life information into your standard planning run, thus automating and simplifying the job of a supply planner.
Key Concept
The shelf-life requirement is an important element in most supply chain planning processes in the food and beverage and life sciences industries. Historically, the SAP standard solution addressed shelf-life concerns either in the production planning via SAP Advanced Planning & Optimization (SAP APO) Production Planning and Detailed Scheduling or SAP Supply Network Planning (SNP) optimization algorithms. Now SAP has introduced new functionality to address shelf-life requirements in the most widely used master planning (SAP APO SNP heuristics) module.
New functionality released in SAP Advanced Planning & Optimization (SAP APO) 5.1 enables companies to consider expiration of inventory with limited shelf life and plan for such situations. Specifically, the functionality addresses shelf-life configuration in the distribution aspect of a supply chain. New enhancements help companies reduce waste and stockouts across their networks. Although the standard functionality is somewhat limited, the additional configuration enhancements I describe can improve your existing supply chain planning solution.
SAP’s standard functionality states that planning applications do not consider shelf-life data. However, new key figures defined in the SAP SCM 5.1 release of SAP APO Supply Network Planning (SNP) and additional enhancements to standard SNP macros allow you to incorporate shelf-life information inside your standard SNP heuristics run.
In this article, I describe:
Gaps in Existing Functionality
Before I delve into a discussion on shelf-life planning, I’ll look at what the existing functionality offers and what gaps exist, with two scenarios.
In scenario 1 (Figure 1), a batch consisting of 100 eaches (shown in white) is available on day 0. This scenario contains four demand elements (shown in light blue) each consisting of 10 eaches. As a result of planning, the system generates stock-on-hand information for each weekly bucket (shown in dark blue). This scenario contains no gaps. The inventory is able to satisfy most of the requirements presented by the demand elements.

Figure 1
A supply chain planning scenario with no gaps
In scenario 2 (Figure 2), the situation is more complex. I assume that the batch has an expiration date of week 3. After week 3, the inventory contained in batch 2 should not be used to satisfy future demand elements. As a result, the system should generate a supply shortage for week 4 and week 5 of 10 and 20 eaches, respectively. It should also generate replenishments via stock transfers, purchase requisitions, or planned orders to address this supply shortage.

Figure 2
A supply chain planning scenario with an expiration date of week 3
SAP Standard Functionality
The shelf-life enhancement in SAP APO SNP is primarily focused on a new planning book/data view combination of 9ASNP_SHLF/SHELF_LIFE. You can access this planning book and its associated data view via transaction /SAPAPO/SDP94. This combination of planning book/data view contains four new key figures:
- Shelf-Life Expiring Quantity, which depicts that total amount of inventory that will expire from the batch
- Shelf-Life Projected Wastage Quantity, which depicts the total amount of inventory that will be left unused and therefore wasted
- Shelf-Life Stock on Hand, which depicts the total amount of inventory that will remain in stock following expiration of shelf-life-related inventory (i.e., batches)
- Shelf-Life Supply Shortage, which depicts the total amount of inventory that will be needed once the inventory falls below zero
Note
The shelf-life stock on hand and the shelf-life supply shortage key figures are similar to standard SAP SNP key figures representing stock on hand and supply shortage key figures. If projected inventory is greater than 0, the total amount of inventory available is shown in the stock on hand key figure. If the total amount of inventory falls below 0, the shortage is shown as a positive value in the supply shortage key figure.
Now, let’s review scenario 2 using additional key figures (Figure 3). The situation in week 1 and week 2 does not change: standard SNP key figures and their counterparts below the diagram are in sync. However, the situation changes starting in week 3: standard SNP key figures do not capture the expiration of inventory and continue to show stock on hand equal to 80 eaches. In turn, the shelf-life-specific key figures use batch life expiration date to expire all inventory stored in batch 2 of 100 eaches (see Shelf-Life Expiring Quantity) and also show that 80 eaches of inventory will be wasted (see Shelf-Life Projected Wastage Expiring Quantity).

Figure 3
Updated planning scenario with shelf-life-specific key figures
In my example, out of 100 eaches of inventory available in the node, only 20 would be consumed by demand 1 and demand 2 prior to batch expiration. Therefore, using simple arithmetic, the system calculates wastage (i.e., stock that will not be used and thus will be wasted) as the total quantity of the batch minus total demand to be consumed (100 eaches minus 20 eaches = 80 eaches). I explain how to configure various demand notes in the section dealing with shelf-life profile.
Note
High-level details of integration between the SAP ECC and the SAP SCM systems are described in
SAP Note 751392.
Preparing Shelf-Life Planning
Several simple steps are necessary to enable shelf-life planning in SAP SCM, including integration of master data (i.e. classes, characteristics, and material master records) and transactional data (i.e., batches and inventory information). For this example, I use product APO-FG in location PL3000.
Classes/Characteristics and Material Master Records
Shelf-life functionality primarily uses APO_SHELF_LIFE of class type 023 for batch classification. You can easily review class APO_SHELF_LIFE using transaction CL02 in SAP ECC. Inside the CL02 transaction, switch to the Char. tab as shown in Figure 4. You can see that class APO_SHELF_LIFE contains a total of six characteristics. To enable shelf-life functionality in the SAP SCM environment, you only need to use the first three characteristics: LOBM_APO_SL_MIN, LOBM_APO_SL_MAX, and LOBM_APO_SL_UTC.

Figure 4
View of class APO_SHELF_LIFE
Subsequently, you require the transfer of this class and its associated characteristics to SAP SCM . Unfortunately, you are unable to select a certain class and its characteristics in the filter criteria of the SAP APO Core Interface (SAP APO CIF), which you can see below in Figure 6 through Figure 9. However, you can use the Class type and Org. Areas fields in Figure 4 to filter the necessary information. Note that class APO_SHELF_LIFE belongs to class type 023. Now, to select only characteristics LOBM_APO_SL_MIN, LOBM_APO_SL_MAX, and LOBM_APO_SL_UTC, just assign them as H under Org. Areas to ease future SAP CIF filtering logic. Once you update class APO_SHELF_LIFE with the proper H organizational areas, save this information inside transaction CL02.
As a next step in the configuration, assign class APO_SHELF_LIFE to your shelf-life specific materials in SAP ECC. As an outcome, your material (in this case, APO-FG) has the classification view accessible via transaction MM03 in SAP ECC (Figure 5).

Figure 5
Classification APO_SHELF_LIFE assigned to product APO-FG
Once the system properly assigns a classification to a material, you transfer classification and all shelf-life-relevant materials into SAP SCM using the SAP APO CIF. Then you create two integration models: one for classifications and one for materials. You can access the SAP APO CIF via transactions CFM1 (to create new integration model) and CFM2 (to activate/deactivate integration model).
During the creation of the classification integration model (transaction CFM1 in SAP ECC), check the box Classes/Charact in the Material Independent Objects sections (Figure 6).

Figure 6
Flag Classes/Charact in the transaction CFM1 screen
Check off the box Classes/Charact in Figure 6, after which you see filter criteria for Classes and Characteristics appearing in the next screen (Figure 7). You already defined proper filter criteria for your class and its associated characteristics (Figure 4), so populate these values as shown in Figure 7. Specifically, set the values of Org. area ind. to H and Class Type to 023.

Figure 7
Details of Classes and Characteristics screen
Press F8 and the resulting screen shows three characteristics and one class selected (Figure 8). Notice how characteristics you filtered in Figure 4 are identical to characteristics filtered in this step. Verify the existence of appropriate characteristics by clicking the number 3 to show LOBM_APO_SL_MAX,LOBM_APO_SL_MIN, and LOBM_APO_SL_UTC.

Figure 8
Three characteristics and one class selected
After the verification process, generate a newly created integration model by clicking the Generate IM button. Next, create and activate a new integration model for shelf-life-relevant materials. Because the material integration model has no specific details, follow the standard process of performing this step.
Finally, activate two newly created integration models using transaction CFM2. As a result, you should see two green check marks across each of your integration models (Figure 9).

Figure 9
Activate the integration model screen
As a final step in this process, validate that materials and associated classifications successfully transferred into the SAP SCM system. As a shortcut, just review a product’s Classification view inside transaction /SAPAPO/MAT1 and verify that classification SHELF_LIFE is properly assigned to a product via the CDP Class field (Figure 10). Note this is the classification APO_SHELF_LIFE that you previously assigned to the product APO-FG.

Figure 10
Classification view of a product in SAP SCM
Batches and Inventory
Once material information successfully transfers into the SAP SCM environment, you can activate integration models for inventory. In addition to the transfer of inventory information, the system also requires you to send batch information from SAP ECC to SAP SCM. In SAP ECC, enter batch information with transactions MSC1N and MSC2N. As shown in the Figure 11, I created two batches (generically named DIMA01 and DIMA02) for product APO-FG.

Figure 11
Overview of SAP ECC-based batches
Using an integration model for batches, you can transfer this information to SAP SCM. The Versions tab of transaction /SAPAPO/RRP3 shows batches DIMA01 and DIMA02 successfully transferred to SAP SCM (Figure 12)

Figure 12
Overview of batch information in SAP SCM
Once batch information transfers to SAP SCM, you can transfer inventory information using the stock-related integration model. Similar to the batch information, inventory information is visible inside transaction /SAPAPO/RRP3 by using the Stock tab (Figure 13).

Figure 13
Overview of inventory information in SAP SCM
Notice how inventory is assigned to batches I previously created. For shelf-life-based planning, it is important to assign inventory to corresponding batches. This assignment ensures proper handling (assignment and expiration of inventory) in the shelf-life planning life cycle.
Reviewing Shelf-Life Planning Book/Data View Concerns
Now that configuration is complete, let’s review shelf-life planning in action, in particular information in the standard planning book/data view that was created for Shelf Life: 9ASNP_SHLF/ SHELF_LIFE. You can access this planning book and associated data view via transaction /SAPAPO/SDP94. In Figure 14, you can see inventory information with no demand specified.

Figure 14
Overview of shelf-life scenario
Based on batch information specified in Figure 11, both batches expire on February 10, 2011. Because there is no demand, the system shows Expiring Quantity and Projected Wastage Quantity set at 22 (i.e., the sum of two inventory nodes included in two batches).
Now you add a new demand element for eight eaches with a date of February 5, 2011 (Figure 15). The eight eaches of demand consume inventory out of 22 eaches that are available. Notice the difference between the key figures for Stock on Hand and Stock on Hand (Shelf Life). Up to the point of February 10, 2011 (the date of expiration of both batches), these two key figures are in synch. However, after February 10, Stock on Hand still shows 14 eaches of inventory available, while Stock on Hand (Shelf Life) shows no inventory available at all.

Figure 15
Overview of shelf-life scenario with a demand for eight eaches
The discrepancy between the two views can be further exacerbated when two batches do not expire on the same date (see the sidebar “Trace the Discrepancy Between Standard and Shelf-Life-Specific Key Figures” below for further details).
Trace the Discrepancy Between Standard and Shelf-Life-Specific Key Figures
Using the shelf-life scenario from the main article, let’s expedite the expiration of batch DIMA02 from February 10 to February 7 while maintaining the demand for eight eaches set for February 5 and adding an additional demand for five eaches on February 8 (Figure A).
I believe simple changes described in the next section can greatly improve the accuracy of your planning run by incorporating shelf-life-specific functionality.
Enhancements to Standard Shelf-Life Functionality
As you probably already noticed, the underlying difference between Stock on Hand and Stock on Hand (Shelf Life) is the incorporation of the Wastage Quantity key figure in the Total Demand macro calculation. Therefore, if you incorporate Projected Wastage Quantity inside Total Demand and rearrange the sequence of macros, you can obtain the desired behavior. Simply put, the rearrangement of macros enables the system to calculate Projected Wastage Quantity and incorporate its value in the Total Demand calculation.
Because the SAP system does not permit changes to standard planning books data views and associated macros, you should create a copy of 9ASNP_SHLF/SHELF_LIFE combination and make a few cosmetic changes as I explain below.
Step 1. Create a Planning Book/Data View Copy
Using standard functionality, create a copy of 9ASNP_SHLF/SHELF_LIFE planning book/data view combination using transaction /SAPAPO/SDP8B. As shown in Figure 16, check the box With Ref. and populate the value of the planning Book field with 9ASNP_SHLF and the value of the Data View With Ref. field with SHELF_LIFE. When you click the Create button, the system creates a replicate of the 9ASNP_SHLF/SHELF_LIFE planning book/data view combination.

Figure 16
Copy the planning book
As a result of copying the planning book/data view, the system copied all macros and sequenced them in the new planning book/data view combination. However, the copy deactivated all of the macros. As the next step in your design, you must re-activate all macros manually inside the newly created data view using transaction /SAPAPO/ADVM (macro workbench)
Step 2. Incorporate Wastage Quantity into the Total Demand Calculation
The Total Demand calculation occurs inside the macro Stock Balance. Access Macro Workbench via transaction /SAPAPO/ADVM and selected the appropriate planning book data view. From there, find macro Stock Balance on the left-hand bottom corner of your window. Drag this macro to the center. Inside the Stock Balance macro, expand the Total Demand step and from the left upper corner of the screen, drag the row field inside the Sum view. Double-click the newly added row and select Row: Projected Wastage Quantity (Frm Initial). As shown in Figure 17, the row Add Projected Wastage Quantity to the existing sum of key figures to obtain the value of Total Demand.

Figure 17
Add a row to the macro Stock Balance
Once you add Projected Wastage Quantity to the Total Demand calculation, save it and generate Stock Balance macro.
Step 3. Rearrange the Sequence of Macro Execution
The original sequence of default execution of macros on the right side of Figure 18 has Shelf Life macro executed after Stock Balance macro.

Figure 18
Default event for shelf-life planning book
The Shelf Life macro populates all four shelf-life-specific key figures. Because you use the Projected Wastage Quantity in the Stock Balance tabulation, you need to calculate this key figure prior to the Stock Balance macro. Therefore, simply re-arrange the sequence of macros (Figure 19).

Figure 19
Re-arranged default event for shelf-life planning
As a result of this rearrangement, the system calculates the value of the Projected Wastage Quantity key figure before determining the value of Total Demand. Therefore, as I mention above, incorporating the value of Projected Wastage Quantity in the Total Demand calculation eliminates the discrepancy between Stock on Hand and Stock on Hand (Shelf Life).
Step 4. Validate and Review Results
Finally, you need to review your supply chain situation in the newly created planning book/data view combination. My intent is to synchronize the Stock on Hand and Supply Shortage key figures between standard and shelf-life-specific views. Use transaction /SAPAPO/SDP94, select shelf-life specific planning book, and load you product/location combination. The system properly calculates Projected Wastage Quantity and its value figures into the Total Demand calculation (Figure 20).

Figure 20
Synchronized shelf-life scenario
The benefit of Stock on Hand synchronization is that it provides a supply planner with an automatic view to consider shelf-life-specific requirements inside a supply planning run. Therefore, during an SNP heuristics run, if a supply shortage occurs due to the expiration of inventory, the system automatically creates replenishment orders to compensate for the difference with minimal planner intrusion. Unlike standard functionality that was only helpful in providing information to the supply planner, this synchronization approach enables companies to automate incorporation of shelf-life-specific information inside their normal supply planning runs.
Dmitriy Mindich
Dmitriy Mindich, APICS CSCP, is a senior associate at PricewaterhouseCoopers LLP. He has extensive SAP experience and specializes in SAP SCM areas of SAP APO Demand Planning and SAP APO Supply Network Planning, as well as integration with external systems using the SAP NetWeaver Process Integration platform.
You may contact the author at dmitriy.mindich@us.pwc.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.