All topics
RAP_CDS_ODATAbeginner

CDS Associations

Learn ABAP CDS associations as semantic relationships between entities, including ON conditions, cardinality, path expressions, exposed associations and their effect on generated SQL and consumers. Use this topic to model reusable relationships without confusing associations with free performance gains.

Overview

Learn ABAP CDS associations as semantic relationships between entities, including ON conditions, cardinality, path expressions, exposed associations and their effect on generated SQL and consumers. Use this topic to model reusable relationships without confusing associations with free performance gains.

Lessons in this topic

Interview questions covered

  • What is a CDS association, how is it declared, and how does it differ from a join?
  • A status text association returns duplicate rows in a list. The ON condition is only on the status code. What is wrong and how do you fix it?
  • Explain path expressions: what SQL do they generate, how do filtered paths work, and how are they written in ABAP SQL?
  • A list of orders must show the number of items and total item value per order. How do you model this in CDS without duplicates?
  • How are compositions declared in CDS for a RAP business object, and what must projections do with them?
  • What design rules do you follow for associations in an interface view layer?
  • A universal sales order view uses inner joins to customer, material and plant, and some orders disappear. How would you redesign it?
  • An OData list returns 2,400 rows where the business expects 800. How do you analyze it?
  • Users say a CDS-based report 'lost' some records. What are the possible causes related to associations, and how do you tell them apart?
  • You inherit a CDS model with many associations. What do you review before extending it?

Related topics

Interview questions on this topic