🚀 Concept 07D | 50 Concepts of ABAP on HANA 🚀
🔍 Topic: ABAP CDS – Environment Annotations
In ABAP CDS, Environment Annotations are used to define the system, application, or usage context of a CDS view.
They help specify how and where a CDS entity should be used — for example, in analytics, data exposure, or business applications.
⚡ This means:
You can classify a CDS view as analytical, transactional, or interface-related
System tools and frameworks (like RAP or Fiori) understand its purpose automatically
Enhances integration and consistency across different environments
💡 Common Annotations:
@Environment.systemField: #CLIENT // Marks the system field for client
@Environment.systemField: #CREATED_AT // Timestamp when record created
@Environment.systemField: #CREATED_BY // User who created the record
@Environment.systemField: #LAST_CHANGED_AT
@Environment.systemField: #LAST_CHANGED_BY
💡 Example:
@AbapCatalog.sqlViewName: 'ZVEMPENV'
@EndUserText.label: 'Employee Master with Environment Fields'
define view ZCDS_EMPLOYEE as select from zemployee {
key empid,
empname,
@Environment.systemField: #CREATED_AT
erdat as CreatedOn,
@Environment.systemField: #CREATED_BY
ernam as CreatedBy,
@Environment.systemField: #LAST_CHANGED_AT
aedat as ChangedOn
}
✅ Result: CDS views automatically align with system-level fields — simplifying auditing, logging, and change tracking.
In simple words → Environment Annotations help your CDS views stay system-aware and audit-ready!
#SAP #ABAPonHANA #CDSViews #EnvironmentAnnotations #SAPABAP #RAPModel #DigitalTransformation
Independent instructor in SAP technologies and development environments. All opinions are my own. Always happy to help those who have SAP Learning Hub subscriptions to understand the contents of the materials.
3wAMDP should generally be used only when you need HANA specific features which aren't available with ABAP SQL. Otherwise you risk ending up with unmanageable code.