As enterprise applications evolve, the quality of their data model becomes one of the most critical factors influencing maintainability, scalability, and performance. In Part 3 of the SAP RAP Purchase Document Management Series, we shift our focus from testing and validation to the architectural principles that drive effective CDS View design.
Core Data Services (CDS) are far more than simple database views. They serve as the foundation of modern SAP application development, providing a powerful mechanism for modeling business data, encapsulating calculations, and exposing information to transactional applications and SAP Fiori user interfaces.
This article explores how strategic CDS View design can significantly improve application architecture. Rather than relying on a single monolithic view, we adopt a layered approach that separates concerns across multiple CDS Views. This methodology enhances reusability, simplifies maintenance, and enables developers to create flexible data models capable of supporting both transactional processing and analytical reporting.
A major focus of this installment is the implementation of calculations directly within CDS Views. By moving calculation logic closer to the database layer, developers can reduce application complexity while improving performance and consistency across the entire solution landscape.
Through practical examples drawn from our Purchase Document Management application, we demonstrate how calculated fields, derived values, associations, and reusable interfaces can be leveraged to create robust enterprise-grade data models.
The article also introduces the concept of frontend-ready CDS Views. As SAP Fiori applications increasingly rely on CDS-based data exposure, designing views with user experience and UI consumption in mind becomes essential. Readers will learn how to structure CDS Views that not only support business logic but also provide an efficient foundation for future SAP Fiori applications.
Ultimately, this chapter highlights one of the most important lessons in software architecture: simplicity emerges from thoughtful design. By combining layered CDS View architectures with SAP RAP best practices, developers can build applications that are easier to understand, maintain, and extend over time.
Topics Covered
1. CDS Views as the Foundation of SAP RAP
- Role of CDS in RAP Architecture
- Data Modeling Principles
- Modern SAP Development Patterns
2. Why Multiple CDS Views Matter
- Separation of Concerns
- Layered Architecture Benefits
- Reusability and Maintainability
- Future Extensibility
3. CDS View Layering Strategy
- Interface Views
- Projection Views
- Consumption Views
- Transactional Data Models
4. Advanced Calculation Techniques
- Calculated Fields
- Derived Business Values
- Pricing Calculations
- Quantity-Based Computations
5. Optimizing Business Logic Placement
- Database Layer vs Application Layer
- Performance Considerations
- Reducing Code Complexity
6. Reusable CDS Design
- Shared Business Logic
- Consistent Data Exposure
- Modular Development Approach
7. SAP RAP Integration
- CDS Views and Business Objects
- RAP Consumption Patterns
- Data Exposure Best Practices
8. Preparing for SAP Fiori
- Frontend-Oriented CDS Design
- UI Consumption Readiness
- Annotation Planning
9. Performance and Scalability
- Efficient Data Retrieval
- Optimized Query Execution
- Enterprise Application Considerations
10. Architectural Best Practices
- Common Design Mistakes
- Recommended SAP RAP Patterns
- Long-Term Maintainability
Key Takeaways
✔ Design CDS Views with clear responsibilities
✔ Use multiple CDS layers to improve maintainability
✔ Push calculations closer to the database whenever possible
✔ Create reusable data models for future applications
✔ Prepare CDS Views with SAP Fiori consumption in mind
✔ Build scalable RAP applications through strong architecture
https://drive.google.com/file/d/1uKZ1JiKRuSm7-a3lztmMpynL_7LxzPro/view?usp=sharing







What do you think?
Show comments / Leave a comment