The syntax of CDS will grow if complex annotations are needed, that may reduce the readability of CDS.
A metadata extension separates annotation from business logic.
Perform the following steps to implement a metadata extension:
- Add an annotation of @metadata.allExtensions:true to the CDS view.
- Create a Metadata extension, write annotations for the view and its fields.
- Use ";" to separate fields.
Some annotations relevant to the activation of CDS, like @odata.publish, @AbapCatalog.sqlViewName are not supported in a metadata extension.