Lesson 4 of 6
Shelf life and expiry
10 min
Listen to this lesson
Some materials age. Adhesives, resins, lubricants and many chemicals have a shelf-life expiration date (SLED) after which they must not be used. SAP S/4HANA can calculate the SLED at goods receipt, refuse receipts with too little remaining life, and steer batch determination to use the earliest-expiring batches first. Contoso's winding varnish CMC-RES-020 (illustrative) is the example: it lasts 12 months from manufacture, and WIND-10 must never use an expired lot.
The material master settings
| Field (plant data / storage view) | Meaning | CMC-RES-020 (illustrative) |
|---|---|---|
| Total shelf life | Time from production date to expiry | 12 months |
| Minimum remaining shelf life | Shortest remaining life accepted at goods receipt | 6 months |
| Period indicator for SLED | Unit for the shelf-life fields (days, weeks, months, years) | Months |
| Rounding rule for SLED | How the calculated date is rounded | End of month |
| Batch management | Must be on for SLED tracking per lot | On |
Shelf-life settings in the product master.
At goods receipt, the clerk enters either the production date or the SLED. If the production date is entered, the system calculates the SLED from the total shelf life. It then compares the remaining shelf life with the minimum: if too little life remains, the receipt is refused or warned, depending on Customizing. The check is activated in Customizing under batch management for the expiration date, per plant and per movement type, which lets Contoso check purchase receipts strictly while allowing returns or transfers without the check.
First expired, first out
Shelf life matters again when stock is consumed. A batch determination sort rule on the expiry date gives FEFO: first expired, first out. Selection can also require a minimum remaining life at the time of issue, so that a batch expiring next week is not issued to a job that runs for a month. For customers, sales batch determination can require a remaining shelf life on delivery. Contoso uses FEFO for varnish issued to WIND-10 and excludes batches with less than 30 days left.
Customers can have their own shelf-life demands. A fleet customer that stores spare varnish for its own workshop might require at least nine months of remaining life on delivery. Sales batch determination can carry such a requirement for the customer and material, and the delivery then picks only batches that meet it. Test a customer requirement next to the default rule, with one batch that meets only the default, so you can see that the customer rule really applies.
Monitoring and expired stock
- Run the shelf-life list (MB5M) regularly to see batches approaching or past their SLED by plant and storage location.
- Set expired batches to restricted (with batch status management) or move them to blocked stock so they cannot be issued.
- Scrap expired stock with a goods issue for scrapping (movement type 551), with the cost going to the agreed cost center.
- Analyze why stock expired: order quantities, lot sizes or minimum remaining life at receipt may need adjusting.
- Production dateLot made by the supplierVarnish batch manufactured; total shelf life starts
- Goods receiptSLED calculated and checkedAt least 6 months must remain
- In useFEFO issuesBatches with at least 30 days left issued to WIND-10
- SLED minus 30 daysNo longer issuedDetermination excludes the batch; MB5M shows it
- SLEDExpiredRestricted or blocked, then scrapped with 551
| Test case | Input | Expected result |
|---|---|---|
| Fresh lot | Production date one month ago | Receipt posted; SLED eleven months ahead, rounded to month end |
| At the minimum | Remaining life exactly six months | Posted, or refused, exactly as the rule is defined; agree the boundary in writing |
| Below the minimum | Remaining life three months | Refused (error) |
| SLED entered directly | Supplier certificate shows SLED only | SLED accepted and checked against the minimum |
| Transfer of short-dated stock | Movement type without the check | Posted; batch keeps its SLED |
| Issue near expiry | Batch with 20 days left | Not proposed by determination for WIND-10 |
Shelf-life test cases for CMC-RES-020 (illustrative).
What goes wrong in testing
| Pitfall | Consequence | Prevention |
|---|---|---|
| Only fresh batches in test data | Expiry check and FEFO never exercised | Create batches near, at and past the minimums |
| Check active for receipts only | Transfers or returns bring in short-dated stock | Test each movement type in scope |
| Rounding rule ignored | SLED one month off from what quality expects | Expected SLED computed by hand per case |
| Restricted status not enforced | Expired batch still issued | Issue from a restricted batch must fail |
Typical shelf-life test failures.
What would you do?
During testing, a varnish receipt with only two months of remaining life is posted without any message. The material has total shelf life 12 and minimum remaining life 6. What should the tester check first?
- Total shelf life, minimum remaining shelf life, period indicator and rounding rule drive SLED.
- The expiration date check is activated per plant and movement type.
- FEFO sorting and minimum remaining life in batch determination control consumption.
- Monitor with MB5M; restrict, block or scrap (551) expired batches.
Check your understanding · not graded
Lesson check
1. How is the SLED calculated when the clerk enters a production date?
2. Where is the expiration date check activated?
3. What does FEFO mean in batch determination?
4. Which movement type scraps expired stock from unrestricted use?