Learn key design challenges in the consumer packaged goods (CPG) industry for shelf life planning using SAP Advanced Planning and Optimization (SAP APO).
Key Concept
Shelf life restrictions directly influence inventory levels, obsolescence costs, and stock-out costs, so there could be a competitive advantage for companies in the consumer packaged goods (CPG) industries that provide a longer shelf life to customers and more accurately predict inventory waste due to expiration.
The limited shelf life of products is a major supply chain planning issue in the food and beverage sector of the consumer packaged goods (CPG) industry. Usually it’s too late to manage shelf life requirements during execution, as it does not provide enough time to consider other available options. Therefore, it becomes important to consider shelf life during distribution requirements planning, master production scheduling, deployment, and material requirements planning.
Planning for shelf life in these processes can help to improve inventory waste, reduce inventory holding costs, and reduce waste caused by expiration of the product by taking proactive action on the current stock situation. Therefore, the provision of the shelf life planning function is crucial for the SAP Advanced Planning and Optimization (SAP APO) system to succeed at supply chain planning in the food and beverage sector.
Shelf life requirements in the CPG industry need to be adequately addressed by the planning engines available in SAP APO Supply Network Planning (SNP). Some of the critical challenges in SAP APO for CPG industries are:
- The standard SNP deployment heuristic does not consider shelf life.
- SAP APO only provides the option to maintain one minimum remaining shelf life.
- Standard alerts provided by SAP do not provide visibility to customers about their products’ minimum shelf life.
With the help of innovative changes to the existing functionalities combined with enhancements to planning engines using various user exits, Business Add-Ins (BAdIs), and Business Application Programming Interfaces (BAPIs) available in SAP APO and SAP ERP Central Component (ECC), we were able to address various complex business requirements for the CPG industry.
An ideal supply planning solution is integrated both upward and downward as shown in Figure 1. To provide a supply planning solution that provides business value, you should integrate shelf life consideration in supply planning.

Figure 1
Planning integration between demand planning, supply planning, and execution
All the above processes have their own unique need to plan for shelf life planning. Without shelf life information available in requirements and strong integration with the execution system, supply planning processes can be rendered ineffective.
Key Shelf Life Requirements in the CPG Industry
The need to plan for shelf life rises exponentially as shelf life duration decreases, so it becomes important to plan for shelf life in numerous industries, but perhaps more so in CPG (food and beverage sector) and life sciences (pharmaceuticals). Table 1 lists the details of key business requirements we encountered during our implementation of shelf life planning for a CPG company in the food and beverage sector.
Shelf life requirement
|
Description
|
Customer required minimum shelf life |
This is the required minimum shelf life on the stock to support customer needs. This could be based on customers’ shelf duration or consumer consumption patterns. For example, while buying a perishable finished good such as milk, customers generally look for a specific amount of remaining shelf life. |
Intercompany required minimum shelf life
|
This is the minimum remaining shelf life for stock transfer orders within the client’s supply chain network from plant to the distribution centers. This is higher than the customer minimum remaining shelf life and is used by stock transfer orders (STOs). This helps stock move across the supply chain network with sufficient shelf life to account for transit time before it is delivered to customers from the respective distribution centers. Figure 2 diagrams customer and intercompany shelf life requirements. |
Maturation time
|
This is the period between manufacturing dates of the product and when it can be used for satisfying demand. This scenario usually occurs when products such as cheese need to be aged to provide better flavor and quality. Supply planning should respect this while generating distribution plans and considering which inventory is available for customer shipments. |
Extended shelf life
|
Due to the seasonality of demand and non-availability of capacity during seasonal demand months, supply planning needs to pre-build the product to support the demand for those months. However, in the CPG industry, shelf life brings a unique challenge for pre-building the demand while respecting shelf life.
|
Stock usability across the network
|
The ability to plan for shelf life considering transit time provides an accurate shelf life requirement date at the stock location. This can help the planner to be proactive and reduce non-usable stock before it moves across the network.
As shown in Figure 3, required shelf life at the manufacturing location should be inclusive of transit time and hold time.
|
Liquidation of projected waste |
Supply-planning tools should enable planners to anticipate and make decisions in advance to avoid waste due to unanticipated demand fluctuations. This waste needs to be assessed well in advance of total shelf life expiration and should include any stock that has crossed the minimum remaining shelf life for customers. |
Table 1
Key business requirements of shelf life planning in SAP APO for CPG

Figure 2
Customer and intercompany shelf life requirement

Figure 3
Required shelf life should include transit time and hold time
Considering Shelf Life in the Supply Planning Process
Having established the requirements above, you now are faced with the following questions: Which are the critical supply planning processes that need to consider shelf life, without making the planning solution complex? How can enhanced visibility of shelf life in planning provide tangible benefits to the business? Shelf life requirements for different supply-planning sub-processes from an implementation done at a large CPG company may consist of the following areas:
- Long-term planning (LTP)
- Master scheduling (MS)
- Deployment
- Shelf life integration with ECC
- Shelf life integration with Production Planning and Detailed Scheduling(PP/DS)
- Analytic capability
We describe each of these requirements in the following sections.
LTP
It’s not critical to consider shelf life during LTP, as in this area, the business has enough time to react to issues arising from short shelf life. However, the business still needs to have visibility to potential stock waste in the LTP area, which can arise when the available shelf life on stock or receipt is not enough to cover the requirement. Reasons for the waste could include:
- The production lot size is greater than the demand coverage, resulting in inventory waste before the demand cycle.
- Seasonal pre-build and capacity leveling draws production too far in advance, causing projected waste to emerge prior to the anticipated customer demand.
Providing visibility to projected stock waste in the LTP area can provide the business with information required to make informed decisions.
MS
Planning for shelf life in the MS area becomes important due to the impact it can have on production, inventory, and demand fulfillment. It is important for the master scheduler to know whether existing stock, production, or purchased quantities can be used to satisfy given demands at a certain point in time and trigger production if required. Some of the critical business requirements to be considered in master scheduling are the abilities to:
- Trigger additional production for supply shortages that are due to shelf life (while considering capacity constraints)
- Consider different required minimum shelf life based on demand signal type (customer or inter-company)
- Consider maturation time of the stock to fulfill demand
- Confirm that build ahead is constrained by total shelf life and extended shelf life (e.g., cold storage)
Deployment
If a shelf life constraint is not considered, and adequate information on shelf life required to fulfill demand is not present, the following can result:
- Stock with insufficient shelf life moving across network, resulting in increased and superfluous transportation and carrying costs
- Demand fulfillment with stock may have insufficient shelf life, affecting target service levels
- Inability to build trucks with stock that has sufficient shelf life, affecting target service levels and load optimization measured in full truckloads (FTLs)
The following are some of the critical business requirements:
- Provide the ability to exclude unusable inventory quantities based on a customer required minimum
- Provide the ability to deploy stock based on availability in the future, considering maturation time
- Include transit time in the calculation of required minimum shelf life for better visibility
- Provide the ability to delete stock transfer requisitions (STRs) that do not meet required minimum shelf life
- Provide alerts for any supply shortage situation due to low shelf life
Shelf Life Integration with ECC
Without shelf life information integrated with ECC, the execution of STOs or STRs is not likely to be accurate. One of the important requirements to support integration is providing shelf life information for all the demand supported with that STR or STO. Integration on shelf life information into ECC provides the planner with visibility to the required shelf life to support accurate demand fulfillment (Figure 4).

Figure 4
Integration of the customer requirement between ECC and APO
Shelf Life Integration with Detailed Scheduling
Detailed scheduling should be able to respect the required shelf life from requirements (STO, STR, forecast, and sales order) so scheduled production does not violate shelf life requirements.
Analytic Capability
The overarching process associated with shelf life in supply planning involves monitoring inventory performance and analytics. Because of the persistence of inventory waste and write-offs in industries with perishable goods, it becomes important for businesses to analyze and measure the inventory performance. Some critical business requirements for analytics include:
- Review the anticipated and incurred revenue loss due to expiration of the stock
- Review the anticipated and incurred revenue loss due to the non-usability of stock resulting from inadequate remaining shelf life to meet customer minimum shelf life requirements
System Design to Support Shelf Life in SAP APO
Shelf life planning only provides business value if both upstream and downstream processes are integrated to respect shelf life constraints.
Our solution in this case provides insight into how the system was implemented so that:
- The upstream process of generating a forecast and creating sales orders respects shelf life parameters
- Downstream processes of how purchase order creation and STO creation have visibility into required minimum shelf life
- This information was used to generate analytics to support making business decision liquidation of projected waste
Figure 5 is an example of integrated implementation flow for shelf life planning in SAP APO.

Figure 5
Integrated implementation flow for shelf life planning in SAP APO
Table 2 highlights SAP APO Supply Network Planning (SNP) capability for shelf life planning. Fit refers to standard configuration, whereas gap refers to requirements that need customization.
Subprocess |
Requirement |
SAP standard fit/gap |
System |
All
|
Stock usability across the network (transit time plus hold time)
|
Fit
|
SCM 5.1
|
All
|
Generate alerts for projected waste due to customer minimum shelf life and intercompany minimum shelf life
|
Fit/gap (demand or supply mismatch)
|
SCM 5.1 |
All
|
Integration with ECC and detailed scheduling
|
Gap (custom macro using standard SAP)
|
SCM 5.1 |
MS
|
Consider separate customer-specific and intercompany minimum remaining shelf life (account for transit time)
|
Fit
|
SAP APO 7.0 (CTM), SCM 5.1 (optimizer) |
Deployment
|
Generate a deployment plant that respects the minimum remaining shelf life requirement automatically
|
Fit with workaround (using capable-to-match [CTM] or optimizer)
|
NA |
MS |
Extended shelf life planning to support manufacturing |
Fit
|
SCM 5.1 |
Table 2
SAP APO SNP capability for shelf life planning
Prerequisite Activity to Support Shelf Life Planning
For shelf life planning, you need to have the following configuration steps completed to support shelf life planning in SAP APO.
- Expiring Quantity: The quantity of stock or receipts in a time bucket that is no longer usable from this bucket onward.
- Projected Wastage Quantity: The portion of the expiring quantity that needs to be discarded in the current demand situation (un-pegged supply).
- Stock on hand (shelf life): The quantity of stock or receipts in a bucket that has not been consumed by demand up to and including this bucket. Consumption follows the shelf life logic that stock or receipts must meet the shelf life requirements of demand.
- Supply Shortage (shelf life): The quantity of demand elements in a bucket that have not been consumed by stock or receipts up to and including this bucket. Consumption follows the shelf life logic that stock or receipts must meet the shelf life requirements of demand.
- LOBM_APO_SL_MIN – Min Shelf Life/Maturity in Sec
- LOBM_APO_SL_MAX – Max Shelf Life/Shelf Life in Sec
- LOBM_APO_SL_UTC – Batch Time Stamp UTC
More information can be found in the SAP Note 751392 - Shelf life R/3 > APO: Settings in R/3.
Set Up Master Data
Confirm that the following parameters are enabled in product master data in SAP APO that will flow through Core Interface (CIF) configuration from ECC from material master data:
- Shelf Life
- Required Minimum Shelf Life
- Maturation Time
- Customer Shelf life Guarantee (Custom): As shown in Figure 6, the product master was enhanced to capture a customer-specific shelf life requirement.

Figure 6
Custom field in product master data to support customer shelf life guarantee
More information can be found in SAP Note 1072022 - Shelf life in SNP.
Require Shelf Life in Sales Order
As shown in Figure 7, batch determination functionality (in sales and distribution [SD]) needs to be implemented to capture the minimum shelf life requirement for the sales order and delivery.

Figure 7
Process flow for capturing the required shelf life in a sales order
Along with batch determination configuration for a sales order, you need to enhance the batch user exit so the required shelf life is transferred to SAP APO. More information can be found in SAP Note 1548827 - Sales order Shelf life R/3 > APO, settings in R/3.
Release Demand Plan with Shelf Life
For the supply-planning process, you get a forecast generated in Demand Planning (DP) and released to SAP Supply Network Planning for 24 months. One of the critical business requirements was to influence forecast elements to carry the customer minimum shelf life that mimics the shelf life information flow through sales orders in the short-term horizon.
The standard forecast release process and distribution demands coming through for STOs with the supply chain network look at the standard Req. Min Shelf Life field in the product master to carry minimum shelf life parameters for planning. Because there is no way to change how distribution demand uses this field, we decided to customize the forecast release process. Therefore, we decided to go ahead with the following design approach for the forecast release process:
- The forecast release process was enhanced using BAdI= /SAPAPO/SDP_RELDATA with Method= CHANGE_RELDATA to read our enhanced field Cust.Sl.Guarantee.
- Distribution demand continued to look at Reg. Min. Sh. Life to carry intercompany minimum shelf life parameters.
The Deployment Process
The deployment process running every day plays an important role in moving stocks from one location. It becomes very important to equip planners at this stage to make the right decisions while issuing stocks with the right shelf life. Considering system limitations, we enhanced the Deployment Heuristic engine by completing the following steps:
1. We introduced a new key figure called Non Deployable Stock in the deployment planning book.
2. We created a new user exit macro Deployment Shelf Life Macro that updates this Non Deployable Stock Key Figure. This is updated with the value calculated as Non Deployable Stock = Non-Deployable Stock Type A + Non-Deployable Stock Type B where Non-Deployable Stock Type A = Stock that is expired due to Customer Min Shelf Life. Non-Deployable Stock Type B = Stock that is having maturation time and has an available date in the future.
3. We modified Available to Deploy (ATD) as Adjusted ATD = ATD – Non Deployable Stock.
4. We added the Non Deployable Stock type B back to ATD on the day it is available to ensure deployment considers the same at the right time, Adjusted ATD = ATD + Non Deployable Stock type B, on the available date.
5. We adjusted ATD to make sure NO Deploy of expired stock type A and NO EARLY deploy of stock type B.
In the example in Figure 8, we had total stock of 7,000, of which only 2,000 had enough shelf life to meet the customer minimum remaining shelf life. Therefore, ATD was adjusted to take out the stock type A, 3,000 (expired due to customer minimum shelf life) and stock type B 2,000 (which has a maturation time of five days). Because stock type B is available in the future, it has been added back to ATD on 02/25 (Figure 8).

Figure 8
Planning book view of Adjusted ATD and Non-Deployable Stock key figure
Shelf Life Propagation with Split
So far we have outlined how we addressed deployment for stock type A and B. Now let’s look at what we have in terms of a standard solution to account for transit time and wait time for stock usability across the supply chain.
SAP provides standard shelf life propagation functionality that propagates shelf life requirements to account for stock usability across the supply chain network. As we worked with SAP, SAP confirmed the shelf life propagation with split does not work for all business cases. The main reasons were:
-
Shelf life propagation depended entirely on dynamic pegging in live cache.
- Shelf life propagation for split order quantities was random and didn’t follow a consistent pattern when demand or supply was not exact.
Our design approach was to enhance the standard functionality of shelf life propagation with split, with help from SAP. The details of the BAdI used for modifying shelf life propagation with split functionality are as follows:
-
Enable the flag for SKIP_PEGGING_CHECK in the BAdI /SAPAPO/SNP_SHLF as per SAP Note 2119223.
- Enable demand and receipt elements pegging according their split demand or supply quantities using BAdI /SAPAPO/SNP_SHLF with the method IO_MATCHING.
More information can be found in SAP Note 2119223 - Shelf life propagation: Orders are not split if multiple pegging results.
Alert for Customer Required Shelf Life
We have standard macro-based alerts to display the shelf life planning exceptions (e.g., for projected waste quantity [DB alert], that tells us when there is projected waste quantity due to total shelf life expiration. However, in the CGP, industry planners are generally not interested in knowing when the stock totally expires, but they want to know when it expires due to customer minimum shelf life. Therefore, we needed to enhance the alerting tool by introducing a new custom macro that alerts the planner about expirations due to customer minimum shelf life. As shown in Figure 9, the custom macro (BAdI macro) to calculate customer-projected waste is based on the customer minimum from the product master.

Figure 9
Key figure used to calculate customer minimum value
This custom key figure was used to generate the DB alert macro for customer-projected waste to help the planner make a proactive decision for stock waste. This alert is shown in Figure 10.

Figure 10
Custom alert for customer-projected waste provided to the planner
Master Schedule
SNP optimization can consider shelf life constraint from SCM 5.1 (SCM 2007), but it has the following limitations:
-
It does not consider maturation time
- It does not consider transit time into required shelf life
CTM is able to consider a shelf life constraint from SCM 7.0. CTM can consider the following shelf life requirements:
-
Maturation time
- Required minimum shelf life
- Required maximum shelf life
Note
The only limitation that CTM has when considering a shelf life constraint from SCM 7.0 is that it does not consider transit time into the required shelf life.
For CPG companies, we are required to plan for maturation time and also to differentiate between customer minimum and intercompany minimum required shelf life. CTM was used to support a master schedule process, and by using the workaround for customer minimum (updating the demand to account for shelf life), we were able to use the standard shelf life for stock transfer and account for it in transit time.
The projected days of the supply key figure macro were modified to account for stock waste due to the customer-required shelf life. This provides the planner with an accurate picture of the projected days of supply in planning books.
Long-Term Planning
As mentioned before, the standard SNP heuristic does not account for shelf life, and for CPG companies, we were supposed to provide the visibility of customer-projected waste in the LTP horizon. This was achieved by using a custom macro. However, so that we have a solution that accounts for expired stock in an SNP heuristic used for LTP, we did the following enhancement to account for shelf life in the SNP heuristic: Modified Projected Stock on Hand key figure to account for customer projected waste value. The Projected Stock on Hand = Total Receipt - Total Demand – Customer-Projected Waste.
To verify that the SNP heuristic was able to account for shelf life and generate a plan order, the SNP heuristic was required to be run twice: once without the adjusted stock on hand key figure and again with the adjusted stock on hand key figure.
Note
Customer-projected waste is calculated based on the required minimum of demand and total shelf life available on the stock or receipt.
SNP Integration Between ECC and Detailed Scheduling
SAP has provided standard functionality to integrate shelf life with ECC and detailed scheduling from SCM 2007. The following steps explain how it can be achieved in SAP APO:
-
Integration with ECC
- Conversion of the SAP Supply Network Planning order into the PP/DS order
To enable integration of shelf life with ECC, the following prerequisites are required. Shelf life functionality is not contained in the core release of ERP 2007, but is provided in enhancement package 3. Along with enhancement package 3, the business function SCM_GEN_02 needs to be activated in ECC.
- Purchase requisitions or stock transfer requests carry a minimum remaining shelf life field, which will be integrated with SAP APO.
- When a new purchase order is created in ERP, the minimum remaining shelf life is filled from the corresponding field of the purchase requisition.
- The minimum remaining shelf life can be changed manually in PO.
- Batch determination in outbound delivery can be used to account for shelf life
More information can be found in the SAP Note 1109941- Switches in business function SCM_GEN_02.
Conversion of an SNP Order into a PP/DS Order
From SCM 5.1 (SCM 2007) when you convert orders (planned orders, stock transfers, purchase requisitions) created in SNP to PP/DS, the shelf life data is kept from the SNP orders. This is achieved by using standard PP/DS conversion heuristic SAP_SNP_SNGL.
Analytics to Support Inventory KPIs
Planners want to generate a report that displays the total projected waste quantity, also known in business terms as overage, in dollars. This report is intended to equip planners for making decisions on this overage stock, a process that is known as liquidation of the stock or waste management. In this process, you make early decisions on selling this overage stock either for the discounted price or to donate the overage stock.
Figure 11 shows an example of technical architecture of the flow of data from SNP or ECC to SAP Business Warehouse (SAP BW).

Figure 11
Data flow from SNP or ECC to BI
After you have all the data extracted into SAP BW as shown in Figure 11, the report shown in Figure 12 is generated through the SAP BW reporting functionality.

Figure 12
Sample overage report versus annual allowance
A critical success factor for supply-planning solutions for this industry is to provide seamless integration of shelf life starting from DP to all supply-planning processes in SAP APO and into the execution processes in ECC systems. Our implementation effort was to make use of most of the standard functionalities and at the same time to make it more robust in addressing some of the critical business requirements that we identified as gaps for this industry vis-à-vis consideration of shelf life in planning. Table 3 provides our understanding of SAP APO SNP capability to support shelf life planning with potential development areas.
Subprocess
|
Requirement |
SAP standard fit/gap
|
Development |
System
|
All
|
Provide visibility to projected wastage based on minimum remaining shelf life
|
Fit
|
NA
|
SCM 5.1
|
All
|
Stock usability across the network (transit time + hold time)
|
Fit/gap (demand or supply mismatch)
|
Standard BAdI
|
SCM 5.1
|
All
|
Generate alerts for projected waste due to customer minimum shelf life and intercompany minimum shelf life
|
Gap
|
Standard macro BAdI
|
SCM 5.1
|
All
|
Integration with ECC and detail scheduling
|
Fit
|
NA
|
SCM 5.1
|
MS
|
Consider separate customer-specific and intercompany minimum remaining shelf life (account for transit time)
|
Fit with workaround (using capable-to-match [CTM] or optimizer)
|
Standard BAdI
|
SAP APO 7.0 (CTM), SCM 5.1 (optimizer)
|
Deployment
|
Generate a deployment plan that respects the minimum remaining shelf life requirement automatically
|
Gap (with SNP or deployment heuristic)
|
Standard macro BAdI
|
SCM 5.1
|
MS
|
Extended shelf life planning to support manufacturing
|
Fit
|
NA
|
SCM 5.1
|
Table 3
SAP APO SNP capability to support shelf life planning with potential development
This article contains general information only and Deloitte is not, by means of its publication, rendering accounting, business, financial, investment, legal, tax, or other professional advice or services. This article is not a substitute for such professional advice or services, nor should it be used as a basis for any decision or action that may affect your business. Before making any decision or taking any action that may affect your business, you should consult a qualified professional advisor.
Deloitte shall not be responsible for any loss sustained by any person who relies on this article.
Copyright © 2015 Deloitte Development LLC. All rights reserved.
Arun Negi
Arun Negi is a manager at Deloitte Consulting LLP.
You may contact the author at arunegi@deloitte.com.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.
Jagadeesh Kalwadmath
Jagadeesh Kalwadmath is a consultant at Deloitte Consulting LLP.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.