on 11-27-2017 11:40 AM
My app's controllers mostly call one dataSource with no issues.
One of them, however uses 3 seperate datasources, and sometime returns 403 Forbidden errors when accessing them.
<code>"dataSources": {
"ZSV_SURVEY_SRV": {
"uri": "/SAPUI5-ABAP-SFI/sap/opu/odata/sap/ZSV_SURVEY_SR/",
"type": "OData",
"settings": {
"odataVersion": "2.0",
"localUri": "localService/metadata.xml"
}
},
"ZRUI_COMMON_SRV": {
"uri": "/SAPUI5-ABAP-SFI/sap/opu/odata/sap/ZRUI_COMMON_SRV/",
"type": "OData",
"settings": {
"odataVersion": "2.0",
"localUri": "localService/ZRUI_COMMON_SRV/metadata.xml"
}
},
"ZTC_SHOP_TRADING_CALENDAR_SRV": {
"uri": "/SAPUI5-ABAP-SFI/sap/opu/odata/sap/ZTC_SHOP_TRADING_CALENDAR_SRV/",
"type": "OData",
"settings": {
"odataVersion": "2.0",
"localUri": "localService/ZTC_SHOP_TRADING_CALENDAR_SRV/metadata.xml"
}
}
}
Would it be better to incorporate the methods all into one dataSource (e.g. ZSV_SURVEY_SRV? or should 3 separate dataSources be fine and present no problems?
If 3 dataSources are fine, why do I sometime get the 403 error?
Is there a performance advantage either way?
Hi,
It’s better to make single call by merging the all into one. Because while loading the application it’ll call to the backend 3 to times to get the metadata. So better go with the one.
Or else you can make metadata Call ASYNCHRONOUS so that it should not reduce app loading time use this link Click here
There’s one more way but I don’t know how to do it. You can create local metadata file and load it in manifest.json file other than calling backend systems.
Hope this information is clear for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.