This document discusses how to configure automatic batch determination in SAP based on shelf life for materials like pharmaceuticals and foods. Key steps include importing standard characteristics, creating classes linked to expiration date, setting material master fields for shelf life, receiving goods into batches, and creating a search class and sort rule to select batches with the closest expiration dates first during delivery. This ensures batches are delivered before their expiration while meeting the required minimum remaining shelf life.