Skip to Content
avatar image
Former Member

Odata not working on fiori launchpad

Dear All,

I hope you are fine

My problem is that everything is working well in the WEB IDE but after the deployment on the Fiori Launchpad Odata is not working

I am doing the example of sales order and business partner of the SAPUI5 The Comprehensive Guide

OK => https://webidetesting6557421-s0011279436trial.dispatcher.hanatrial.ondemand.com/destinations/ES4/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/$metadata?sap-documentation=heading%2C%20quickinfo&sap-language=EN

KO => https://flpportal-s0011279436trial.dispatcher.hanatrial.ondemand.com/sap/fiori/salesorders/destinations/ES4/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/$metadata?sap-documentation=heading%2C%20quickinfo&sap-language=EN

Could you please explain why on the fiori launchpad the odata is not reachable ?

Kumar Gaurav is having the same issue here : https://blogs.sap.com/2015/05/02/flphana-cloud-platform-building-managing-applications-for-fiori-launchpad-sites/

I sent a mail to meni.tito@sap.com who seems to have the solution

I will post it here if i have it. Any help would be very appreciate until then

Thank you for your help

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • May 24, 2017 at 11:15 AM

    You probably face the cross origin resource sharing issue. Web IDE gets around the cross origin resource sharing issue via usage of the destination created on SCP for connecting to the ES4 system. In case of your Fiori launchpad which would run on an on-premise gateway system the call to the GWSAMPLE_BASIC service on ES4 is considered as a cross domain call since from your on-premise gateway domain you are calling a resource from another domain. Have you tried running Chrome in web security disabled mode?

    Add comment
    10|10000 characters needed characters exceeded

  • May 24, 2017 at 11:43 AM

    Hello Acyl,

    Would you mind attaching your neo-app.json file please.

    Best regards

    Frank

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 24, 2017 at 12:29 PM

    Thank you for your replies

    The chrome security option seems to be existing only on Linux no as i am seeing command --disable-web-security ? I am on Windows, could you please guide me on the options ? I did not find it.

    Here is the neo-app

    The thing is neo-app is used only by WEB IDE no ?

    {
      "welcomeFile": "/webapp/index.html",
      "routes": [
        {
          "path": "/resources",
          "target": {
            "type": "service",
            "name": "sapui5",
            "entryPath": "/resources",
            "version": "1.44.7"
          },
          "description": "SAPUI5 Resources"
        },
        {
          "path": "/test-resources",
          "target": {
            "type": "service",
            "name": "sapui5",
            "entryPath": "/test-resources",
            "version": "1.44.7"
          },
          "description": "SAPUI5 Test Resources"
        },
        {
          "path": "/destinations/ES4",
          "target": {
            "type": "destination",
            "name": "ES4"
          },
          "description": "ES4"
        }
      ],
      "sendWelcomeFileRedirect": true,
      "cacheControl": [
        {
          "directive": "private",
          "maxAge": 0,
          "path": "**.html"
        },
        {
          "directive": "private",
          "maxAge": 0,
          "path": "sap-ui-cachebuster-info.json"
        },
        {
          "directive": "public",
          "maxAge": 31536000
        }
      ]
    }
    

    Thank you for your help

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 24, 2017 at 03:16 PM

    OK i found here how to launch chrome in web security disabled mode but the problem is still there : 404 not found

    http://www.thegeekstuff.com/2016/09/disable-same-origin-policy/

    Thank you for your help

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 29, 2017 at 10:20 AM

    The disable-web-security flag doesn't work in latest chrome. You need to use an older version of chrome, if overriding CORS is a must for you.

    We're using 46.0.2490.80 for the same purpose

    Add comment
    10|10000 characters needed characters exceeded

    • We can use the below command and it'll work on latest versions of chrome also.

      "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir="D:\chrome"
  • avatar image
    Former Member
    May 29, 2017 at 11:48 AM

    I opened CMD and i past this command "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir="C:\chrome"

    Chrome opened but when i passed the URL the problem is still the same 404 not found

    Add comment
    10|10000 characters needed characters exceeded