Project Overview
Designed and delivered a compliance-grade batch validation system for pharmaceutical supply chains using SAP ECC 6.0 with a custom Python automation layer. The system integrates MM, PP, and SD modules to enforce regulatory-aligned validation rules at every transaction step, then exposes the logic through a RESTful API deployed via CI/CD pipelines.
Project Timeline
Tech Stack
Problem Statement
Manual batch validation processes in pharmaceutical supply chains created significant compliance risk. Human error during inspection and posting steps led to inconsistent validation records, potential regulatory audit failures, and no systematic way to enforce compliance rules at the transaction level within SAP. The absence of automation meant every batch release depended entirely on operator vigilance.
Approach & Solution
O2C and P2P Workflow Modeling
Mapped both Order-to-Cash and Procure-to-Pay compliance checkpoints to identify every SAP transaction that required validation enforcement.
Integrated MM, PP, and SD Modules
Configured cross-module dependencies so batch inspection results in MM blocked SD shipments and PP production orders when compliance thresholds failed.
Python Rules Engine
Built a stateless rules engine in Python that evaluated batch parameters against a configurable compliance ruleset before any SAP document posting.
RESTful API Layer
Exposed validation logic as REST endpoints, enabling external systems and SAP custom programs (ABAP) to call validation checks programmatically.
CI/CD Pipeline with Automated Tests
Deployed the entire system via a CI/CD pipeline; every commit triggered a full regression suite covering all module interactions and validation edge cases.
Key Outcomes
Lessons Learned
- SAP configuration alone cannot enforce compliance — the integration of custom automation layers (Python, API) with core ERP transactions is what closes the gap between intent and execution.
- CI/CD is not optional even for ERP-adjacent projects. Automated testing caught cross-module regression issues that manual review would have missed before each deployment.
- Designing the rules engine as stateless and API-accessible from day one dramatically reduced the effort required to integrate it with external systems and ABAP programs.