CDS Data Model Prompt Guide
1. Root CDS View (Transactional BO)
I want to define a CDS root view entity for a RAP Business Object.
1. View Name: [e.g., ZI_SalesOrder]
2. Database Table: [e.g., zsales_order]
3. Authorization Check: [#CHECK | #NOT_REQUIRED]
4. SQL View Name: [e.g., ZSALORDSQL]
5. Label: [e.g., 'Sales Order Header']
6. Root/Composition: [Yes/No]
7. Annotations Required:
- @[Link]: [Yes/No]
- @[Link]: [Yes/No]
- @[Link]: [Yes/No]
- Value Help associations: [List fields and help views]
8. Fields (Name + type + special annotations):
- SalesOrderID (key, [Link] pos 10)
- CustomerID (mandatory, value help: ZI_CustomerVH)
- CurrencyCode ([Link]: Amount)
2. Child CDS View (Composition)
I want to define a CDS child view entity for my RAP Business Object.
1. View Name: [e.g., ZI_SalesOrderItem]
2. DB Table: [e.g., zsales_order_item]
3. Parent Association: [e.g., _SalesOrder]
4. Relationship On Condition: [e.g., $[Link] = _SalesOrder.SalesOrderID]
5. Fields (with line item, value help, search):
- ItemID (key)
- MaterialID (value help: ZI_MaterialVH)
- Quantity (mandatory)
6. Annotations:
- @[Link]
- @[Link]
- @[Link]
3. Analytical CDS Cube View
I want to define an analytical CDS Cube view for Fiori Analytical Apps.
1. View Name: [e.g., ZI_SalesCube]
2. Source View/Table: [e.g., ZI_SalesOrder]
3. Data Category: [#CUBE]
4. Key Figures and Dimensions:
- Key Figures: TotalAmount, Quantity
- Dimensions: SalesOrg, CustomerID, MaterialID
5. Annotations:
- @[Link]
- @[Link]: true
- @[Link] (optional)
6. Associations to master data:
- _CustomerText, _MaterialText
4. Projection View (UI/OData)
I want to define a projection view for exposing my CDS root entity.
1. View Name: [e.g., ZC_SalesOrder]
2. Source View: [e.g., ZI_SalesOrder]
3. Purpose: [Fiori Elements UI | External API | OData Service]
4. Fields to expose: [List selected fields]
5. UI Annotations:
- @[Link] (sort order, filters)
- @[Link]
- @[Link]
5. Value Help CDS View
I want to define a CDS view to be used as a value help.
1. View Name: [e.g., ZI_CustomerVH]
2. Table: [e.g., zcustomer]
3. Key Field: [e.g., CustomerID]
4. Description Field: [e.g., CustomerName]
5. Annotations:
- @[Link]
- @[Link]