cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple OData services in FIORI Overview Page

Former Member
0 Kudos

Hi Experts,

I have requirement where I am using multiple OData service in Overview Page. I have configure 1 Odata service in the initial setup of Overview Page. Also able to add Stack Card for same in OVP.

Then I added new Odata service in same overview page and created Annotation file for same. After that I added Stack Card for newly added Odata service but the stack card is showing error.

Please help me to solve this error:

How we can use multiple Odata services and corresponding annotations files ?

Is it possible to user single annotation file for multiple Odata services ?

maryana_naboka
Active Participant
0 Kudos

sagar.kandalgaonkar

To answer your last question: you cannot use a single annotation file for multiple OData services, you need to have at least one annotation file per service you want to annotate.

Best Regards,

Mariana

Accepted Solutions (0)

Answers (2)

Answers (2)

CristianBabei
Contributor
0 Kudos

Do this, on your manifest:

First declare the dataSource for your service

"dataSources": {
			"Test1": {
				"uri": "/sap/opu/odata/sap/ZTEST_SRV/",
				"type": "OData",
				"settings": {
					"localUri": "localService/Test1/metadata.xml",
					"annotations": [
						"annotation_list"
					]
				}
			},
                        "Test2": {
				"uri": "/sap/opu/odata/sap/ZTEST2_SRV/",
				"type": "OData",
				"settings": {
					"localUri": "localService/Test1/metadata.xml",
					"annotations": [
						"annotation_list"
					]
				}
			},

After, declare them in the model:

"sap.ui5": {
		"dependencies": {
			....
		},
		"models": {
			"i18n": {
				"type": "sap.ui.model.resource.ResourceModel",
				"uri": "i18n/i18n.properties"
			},
			"@i18n": {
				"preload": true,
				"type": "sap.ui.model.resource.ResourceModel",
				"uri": "i18n/i18n.properties"
			},
			"Test1": {
				"dataSource": "Test1",
				"settings": {
					"defaultCountMode": "Inline"
				}
			},
                        "Test2": {
				"dataSource": "Test2",
				"settings": {
					"defaultCountMode": "Inline"
				}
			}
		},

And finaly, in your cards declaration use the model you want :

"cards": {
			"card00": {
				"model": "Test1",
				"template": "sap.ovp.cards.list",
				"settings": {
					....
					"entitySet": "EntitySet",
					
				}
			},
			"card01": {
				"model": "Test2",
				"template": "sap.ovp.cards.charts.analytical",
				"settings": {

This should work, Hope this helps

Regards.

Former Member
0 Kudos

Hi Cristian,

Thanks for your help. I have already done above steps and able to see the both oData services in Menifest file. Also able to create the Annotation for them in annotation modeler. But I am facing issue when I am rendering OverView page. The second Stack Card is not appearing as expected.

Former Member
0 Kudos

stackcard-error.jpg Error screen shot