Having implemented both approaches across multiple SAP PLM installations, I can offer a comprehensive perspective on all three dimensions:
BAdI Extensibility Benefits:
The BAdI framework provides significant architectural advantages for workflow customization. Key benefits include:
- Object-oriented design with proper encapsulation - your custom logic lives in implementation classes that are cleanly separated from SAP standard code
- Multiple implementations possible for the same BAdI definition, allowing different logic for different organizational units or formula types using filter values
- Better testability through dependency injection and unit test frameworks
- No direct modification of SAP code - you’re implementing interfaces, not changing delivered programs
- Explicit contracts via interface definitions that make upgrade impacts immediately visible
- Support for fallback classes and default implementations
For formula management approval workflows specifically, BAdIs give you hooks at the right granularity. You can customize approval determination, add validation steps, modify routing logic, and inject custom notifications all through well-defined interfaces.
User Exit Upgrade Impact Reality:
The upgrade pain with user exits is well-documented but worth quantifying. In our experience across four major upgrades:
- 60-70% of user exits required some rework during upgrades
- Common issues: changed function module signatures, removed parameters, altered calling contexts
- Debugging upgrade failures in user exits is time-consuming because you’re working in modified SAP code
- Risk of subtle bugs introduced when SAP changes the logic surrounding the exit point
- Increasing difficulty getting OSS notes for user exit issues as SAP phases them out
The technical debt compounds over time. Each upgrade cycle adds more risk and effort. BAdIs, by contrast, showed 90%+ survival rate across the same upgrades with clear interface change documentation when modifications were needed.
Workflow Customization Practical Considerations:
For your specific use case (formula complexity scoring and regulatory routing), here’s my recommendation:
Use BAdI PLM_FORMULA_CHECK for validation logic:
- Implement your complexity scoring algorithm in method CHECK_FORMULA
- Access formula components, quantities, and properties through the interface parameters
- Return validation messages and severity levels that integrate with standard workflow
- Filter by formula type or plant if you need different scoring logic by context
Use BAdI PLM_FORMULA_APPROVAL for routing:
- Implement method DETERMINE_APPROVERS to inject your custom approval chain
- Base routing on the complexity score calculated in your check BAdI
- Access regulatory classification from formula master data
- Return approver user IDs and sequence numbers
Implementation approach to manage the learning curve:
- Start with one pilot BAdI implementation for a single formula type
- Create a reference implementation with comprehensive comments
- Build a reusable base class that handles common patterns (data access, logging, error handling)
- Train the team on the successful pilot before expanding
- Document the BAdI pattern as your standard approach for all future customizations
The initial velocity hit is real - expect 20-30% slower development for the first few BAdIs as the team learns. But this is a one-time investment that pays dividends. By the third or fourth BAdI, your team will be faster than they were with user exits due to the better structure and reusability.
Strategic Recommendation:
Go with BAdIs. The workflow customization requirements you described are exactly the scenario where BAdI extensibility shines. The upgrade impact concern alone justifies the approach, but you also get better maintainability, testability, and alignment with SAP’s strategic direction. Accept the learning curve as an investment in technical capability that will benefit all your future PLM customizations.
If you absolutely must use a user exit for some edge case (rare, but it happens), isolate it, document extensively why BAdI wasn’t viable, and plan to refactor it to BAdI in your next enhancement window.