Skip to Content
0
Jul 07, 2020 at 05:12 AM

Got an issue on OData and UI5 application

266 Views

Hi,we got a issue while loading data in UI5 application from odata services.

Actually our requirement is to read single table data from SAP backend system(odata services) to display in UI5.

We are having a selection screen comprises of 6 input elements

1.Checkbox

2.Radiobutton

3.Select-options(Date)

4,5,6.Input fields(Remaining fields are input fields)

We have to display the data validating the selection screen using a table Element.

In UI5 as we are having 6 input buttons and execute button in VIEW1.if the user presses on execute button then it should navigate to VIEW2 and display the data in a table based on selection criteria.

In the table Element we have set path in items Property as

items="{path:'modelname>/entitysetName'}" and we are calling each columnist items as {Modelname>fieldname}.

In view1 controller we have validated all 6 input elements using filters.And in view1 controller we gave URL as var lv_url = "/sap/opu/odata/sap/ZTest_SRV"

Var model = new sap.ui.model.odata.v2.ODataModel(lv_url,true,"","");

model.read("/entitySetname",{method: "GET",

filters: [filter1,filter2,filter3],

success:function(oData,oResponse){

console.log(oData);

},

error:function(oError){

}

});

var router = sap.ui.core.UIComponent.getRouterFor(this);

oRouter.navTo("View2");

Now Coming to Backend system,in method ENTITYTESTSET_GET_ENTITYSET we have written select query as

select ....... from DBtable into table Internaltable WHERE

(We are validating selection screen here) and we are passing data from Internaltable to Entityset.

Gt_internaltable = ET_ENTITYSET.

When we are running the UI5 application,external breakpoint has been triggered which we have set and in IT_FILTER_SELECT_OPTIONS data is getting filled from UI5 selection screen and in where conditions also input fields data is getting filled but in InternalTable no data is populating.And we are getting Error in UI5 application as

ERRORS:

(jquery-dbg.js:9203 Failed to load resource: the server responded with a status of 404 (Not Found) send @ jquery-dbg.js:556 jquery.sap.global-dbg.js:1001 2020-07-07 09:42:36.835139 registerResourcePath ('snr_history', '../../../../../../webapp/') - sap.ui.ModuleSystem)

(sap-ui-core.js:160 2020-07-07 10:29:46.484040 Could not load theme parameters from: ../../../../../resources/sap/collaboration/themes/sap_belize/library-parameters.json - Not Found)

(sap-ui-core.js:160 2020-07-07 10:29:48.242850 Error: resource snr_history/Component-changes.json could not be loaded from ../../../../../../webapp/Component-changes.json. Check for 'file not found' or parse errors. Reason: Not found: http://localhost:8080/file/hajeeruksar-OrionContent/snr_history_report/webapp/Component-changes.json -)

(sap-ui-core.js:160 2020-07-07 10:29:48.244235 Controller Extension Provider: Error 'Error: resource snr_history/Component-changes.json could not be loaded from ../../../../../../webapp/Component-changes.json. Check for 'file not found' or parse errors. Reason: Not found: http://localhost:8080/file/hajeeruksar-OrionContent/snr_history_report/webapp/Component-changes.json' thrown in sap.ui.fl.PreprocessorImpl; extension provider ignored. -)

(sap-ui-core.js:174 Uncaught (in promise) Error: resource snr_history/Component-changes.json could not be loaded from ../../../../../../webapp/Component-changes.json. Check for 'file not found' or parse errors. Reason: Not found: http://localhost:8080/file/hajeeruksar-OrionContent/snr_history_report/webapp/Component-changes.json at Object.error (sap-ui-core.js:174) at p (sap-ui-core.js:49) at Object.fireWith [as rejectWith] (sap-ui-core.js:49) at h3 (sap-ui-core.js:49) at XMLHttpRequest.<anonymous> (sap-ui-core.js:49))

(sap-ui-core.js:160 2020-07-07 10:29:56.402004 Error: resource snr_history/Component-changes.json could not be loaded from ../../../../../../webapp/Component-changes.json. Check for 'file not found' or parse errors. Reason: Not found: http://localhost:8080/file/hajeeruksar-OrionContent/snr_history_report/webapp/Component-changes.json -)

(sap-ui-core.js:160 2020-07-07 10:29:56.402594 Controller Extension Provider: Error 'Error: resource snr_history/Component-changes.json could not be loaded from ../../../../../../webapp/Component-changes.json. Check for 'file not found' or parse errors. Reason: Not found: http://localhost:8080/file/hajeeruksar-OrionContent/snr_history_report/webapp/Component-changes.json' thrown in sap.ui.fl.PreprocessorImpl; extension provider ignored. -)