cancel
Showing results for 
Search instead for 
Did you mean: 

OVP - Local Annotation file is not working

0 Kudos

Hello All,

I am currently trying to build an OVP application. I have created a very basic CDS view and its metadata extension for annotations. Afterwards I have created the card which will take this CDS view as the source model. You may see the code blocks below. My issue is that the annotation file (neither local nor the backend metadata extension) is not effecting the table card. I am developing my app on Web IDE. As you see below the annotation is pretty straightforward only for the order and naming of the columns in the table (respectively: ticket_number, description, pat). Really appreciated if you can help me on finding where am I doing wrong.

manifest.json CDS model definition

			"ZMG_TABLETICKET": {
				"uri": "/sap/opu/odata/sap/ZMG_TABLET_CDS/",
				"type": "OData",
				"settings": {
					"annotations": [
						"ZMG_TABLETICKETAnno0"
					],
					"localUri": "localService/ZMG_TABLETICKET/metadata.xml"
				}
			},
			"ZMG_TABLETICKETAnno0": {
				"uri": "/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Annotations(TechnicalName='ZMG_TABLET_CDS_VAN',Version='0001')/$value/",
				"type": "ODataAnnotation",
				"settings": {
					"localUri": "localService/ZMG_TABLETICKET/ZMG_TABLETICKET_annotations_0.xml"
				}
			}
 

mainfest.json card definition

	"sap.ovp": {
		"globalFilterModel": "ZMG_FILTER_CDS",
		"globalFilterEntityType": "ZMG_FILTERType",
		"containerLayout": "resizable",
		"enableLiveFilter": true,
		"considerAnalyticalParameters": true,
		"cards": {
			"card00": {
				"model": "ZMG_TABLETICKET",
				"template": "sap.ovp.cards.table",
				"settings": {
					"title": "{{card00_title}}",
					"entitySet": "ZMG_OVP_TABLET",
					"addODataSelect": true,
					"annotationPath": "com.sap.vocabularies.UI.v1.LineItem"
				}
			}
		}
	}

local annotation code block

                       <Annotations Target="ZMG_OVP_TABLET_CDS.ZMG_OVP_TABLETType">
				<Annotation Term="UI.LineItem">
					<Collection>
						<Record Type="UI.DataField">
							<PropertyValue Property="Value" Path="ticket_number"/>
            				<PropertyValue Property="Label" String="TNUMBER"/></Record>
						<Record Type="UI.DataField">
							<PropertyValue Property="Value" Path="description"/>
            				<PropertyValue Property="Label" String="DESC"/></Record>
						<Record Type="UI.DataField">
							<PropertyValue Property="Value" Path="pat"/>
            				<PropertyValue Property="Label" String="PAT"/></Record>
					</Collection>
				</Annotation>
			</Annotations>

Thanks in advance,

Best,

Merve

View Entire Topic
0 Kudos

Hi gulmmerve,

Did you try replacing the hardcoded string with i18n property?

<PropertyValue Property="Label" String="{@18n>TNUMBER}"/>