Showing results for 
Search instead for 
Did you mean: 

Problem in getting the Odata from the server

Former Member
0 Kudos

Hi all,

          I am a beginner in sapui 5 . When I am trying to call the data from the url I am getting this . Its been 3 days n still the issue is not resolving.

please help me out .

  1. OPTIONS$metadata 401 (Unauthorized) datajs.js:17
    1. o.defaultHttpClient.requestdatajs.js:17
    2. E2datajs.js:17
    3. o.requestdatajs.js:17
    4. O._loadMetadataODataMetadata.js:6
    5. sap.ui.base.EventProvider.extend.constructorODataMetadata.js:6
    6. M.extend.constructorODataModel.js:6
    7. osap-ui-core.js:116
    8. sap.ui.controller.onInitNew.controller.js:10
    9. a.fireEventsap-ui-core.js:122
    10. a.fireEventsap-ui-core.js:134
    11. (anonymous function)sap-ui-core.js:134
    12. sap.ui.core.mvc.View._initCompositeSupportView.js:6
    13. E.extend.constructorsap-ui-core.js:134
    14. M.extend.constructorsap-ui-core.js:134
    15. E.extend.constructorsap-ui-core.js:134
    16. fsap-ui-core.js:122
    17. fsap-ui-core.js:122
    18. sap.ui.jsviewJSView.js:6
    19. o.(anonymous function)sap-ui-core.js:116
    20. (anonymous function)index.html:58

  1. XMLHttpRequest cannot load$metadata. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:57107' is therefore not allowed access.

Accepted Solutions (1)

Accepted Solutions (1)

Active Contributor
0 Kudos

Last few lines indicate that this is a Cross Origin issue.

Read this blog to understand it and find ways to get around.

Former Member
0 Kudos

thank you Krishna

Answers (2)

Answers (2)

Active Participant
0 Kudos

Hi Navjot,

Try to use the same user which you are trying to execute from the '/IWFND/GW_CLIENT' transaction and use the same from RESTClient, If you are able to excute then ask your basis team to trace both the users while executing and try to find out if there are any authorizations missing.


Vijay V

Active Contributor
0 Kudos

Hello Navjot,

Looks like its some authorization issue. In my opinion your Basis team can help u resolving this.