on 06-29-2018 7:24 AM
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 ?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
stackcard-error.jpg Error screen shot
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.