SADL vs Local Annotation

Advantages of SADL

  • Annotation and data stay together
  • Syntax is simple
  • Reusable

Advantage of Local Annotation

  • More flexible
  • Can handle complex annotation which is not bound to a single field or entity
  • Vocabulary list update faster than CDS annotation
  • Can override CDS Annotation

UI annotations in CDS view can be translated to OData annotation by SADL framework, but they are not 100% the same and have their own advantages.

Choose the correct method of Annotation

Use SADL

  • write annotation for the entire view
  • write annotation for one field
  • data intensive logic, ex ValueHelp

Use Local Annotation if

  • Complex annotation not associated to particular field (ex UIFacets )
  • the annotation you want to use is not supported by current ABAP version
  • Backend server is not ABAP server ( ex. AS Java, HANA )