RAP Metadata Extension

Published: November 2025

What is a Metadata Extension

A Metadata Extension (MDE) is a CDS object that contains annotations for a CDS view entity but is stored in a separate file.

Instead of mixing UI annotations (such as UI line items, labels, value helps, identification info, etc.) inside the main CDS view, you move them to a metadata extension.

Syntax of Metadata Extensions

A metadata extension is defined using:

	
	@Metadata.layer: #CUSTOMER
	annotate view ZC_STUDENT_M_BD
		with 
		{
			// annotation
		}
	

Example:

	
		@Metadata.layer: #PARTNER

		@UI: { headerInfo: { typeName: 'Student',
							 typeNamePlural: 'Students',
							 title: { type: #STANDARD, label: 'Student', value: 'Id' } } }
		annotate view ZC_STUDENT_M_BD
			with 
		{
		  @UI.facet: [ { id: 'Student',
						 purpose: #STANDARD,
						 type: #IDENTIFICATION_REFERENCE,
						 label: 'Student',
						 position: 10 }]

		  @UI: {  lineItem:       [ { position: 10 } ],
				  identification: [ { position: 10, label: 'Id'  } ] }
		  Id;

		  @UI: {  lineItem:       [ { position: 20 } ],
				  identification: [ { position: 20, label: 'First Name'  } ] }
		  Firstname;

		  @UI: {  lineItem:       [ { position: 30 } ],
				  identification: [ { position: 30, label: 'Lastname'  } ] }
		  Lastname;

		  @UI: {  lineItem:       [ { position: 40 } ],
				  identification: [ { position: 40, label: 'Age'  } ] }
		  Age;

		  @UI: {  lineItem:       [ { position: 50 } ],
				  identification: [ { position: 50, label: 'Course'  } ] }
		  Course;

		  @UI: {  lineItem:       [ { position: 60 } ],
				  identification: [ { position: 60, label: 'Courseduration'  }] }
		  Courseduration;


		  @UI: {  lineItem:       [ { position: 70 } , 
				  { type:  #FOR_ACTION, dataAction: 'setAdmitted', label: 'Set Admitted' },
				  { type:  #FOR_ACTION, dataAction: 'clearAdmitted', label: 'Clear Admitted' } ],
				  identification: [ { position: 70, label: 'Status'  }
		   ] }
		  Status;

		  @UI: {  lineItem: [{ position: 80, label: 'Gender' }],
		   identification: [{ position: 80, label: 'Gender' }] }
		   
		//  @Consumption.valueHelpDefinition: [{ entity:{ name: 'ZI_GENDER_5000', element: 'Value' },
		//  distinctValues: true,
		//  additionalBinding: [{ localElement: 'Genderdesc', element: 'Description',usage: #FILTER_AND_RESULT }] }]
		  Gender;

		//  @UI: {  identification: [{ position: 85, label: '' }] }
		//  genderdesc;

		  @UI: {  lineItem:       [ { position: 90 } ],
				  identification: [ { position: 90, label: 'Dob'  } ] }
		  Dob;

		  @UI: {  lineItem:       [ { position: 100 } ],
				  identification: [ { position: 100, label: 'CourseDiscount'  } ] }
		  coursediscount;    
		}