on 07-03-2018 9:33 AM
my sample code is:
this is my controller code
onInit: function() {
var url = "proxy/http/Host:port/sap/opu/odata/sap/ZPO_INFO_SRV;v=2/";
var omodel = new sap.ui.model.odata.v2.ODataModel(url);
omodel.setUseBatch(false);
this.getView().setModel(omodel);
},
My View Code Is:
<Table id="idTable" items="{/po_headerSet}"> <columns> <Column> <header> <Text text="Ebeln" /> </header> </Column> <Column> <header> <Text text="Bukrs" /> </header> </Column> </columns> <items> <ColumnListItem> <cells> <Text text="{Ebeln}" /> <Text text="{Bukrs}" /> </cells> </ColumnListItem> </items> </Table>
getting Error This in Network:
please find my attachements
In console:odataerror2.png
please help me i am new to sapui5,i am struck here,i tried a lot but i didn't get any hint to solve this problem.
Thank you in advance
https://stackoverflow.com/questions/3102819/disable-same-origin-policy-in-chrome
use full url when you disable the check, not this one.
var url = "proxy/http/Host:port/sap/opu/odata/sap/ZPO_INFO_SRV;v=2/";
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Jun,
i tried what your suggest but i didn't get Output.
I fixed one error
Allow-Control-Allow-Origin,
but initial metadata is not loading $metadata Error is 302,
i didn't how to fix it.
please show my error in Network:net.png
Thank you,waiting for your reply......
google.....
1. deploy to server to run
or
2. disable browser security check
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Jun,
Thanks for quick response ,
i disable browsere security check see like this browser.png
I am getting same as before tnt2.png
Thank you so much,
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.