Skip to Content
avatar image
Former Member

Not able to execute Fiori ToolKit Extended application's into WebIDE

Hi All,

we have extended few Standard Fiori Application using Fiori Toolkit in Elclpise Juno now we have WebIDE in Place so want to import those application into WebIDE.

We have imported application's from Gateway System (where we have deployed from eclipse ) into WebIDE.

but we are not able to execute/Run those application in WebIDE.

we are getting the below error while executing it in WebIDE,is there any change we have to do after importing it into WebIDE as i can see the project structure also is different in Eclipse and WebIDE.

Failed to load resource: the server responded with a status of 404 (Not Found)

Uncaught ReferenceError: sap is not defined

Regards,

Trilochan

3.Error.png (50.7 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Oct 23, 2015 at 12:12 PM

    Hi James,

    Thanks for your prompt reply,yes i can see the index.html  file into My Project,Please find the below screen shot which is having the full Project Structure of imported Project.

    Regards,

    Trilochan


    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      The image is a little small, but I think I noticed a WebContent folder. This is common when importing an application created in Eclipse. Try to copy its content to the root (and basically remove it entirely).

      Regards,
      Michal.

  • Oct 22, 2015 at 04:02 PM

    Do you have a neo-app.json existing in your project?  This defines the location of some of the external resources.  If you don't have one it would be easiest to create a new extension project on the same sap project and then just copy the file to your project.

    Regards,

    Jamie

    SAP - Technology RIG

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 23, 2015 at 10:37 AM

    Hi James,

    Thanks for reply, yes we are already having neo-app.json in place it came/generated automatically when we have imported the app from gateway system.

    Regards,

    Trilochan

    Add comment
    10|10000 characters needed characters exceeded

    • The problem is that the locations of the ui5 source files are not correct.  Do you have a index.html in your project, usually it is set to

      src="resources/sap-ui-core.js"

      but it depends on the structure of your project.

      Regards,

      Jamie

      SAP - Technology RIG

  • avatar image
    Former Member
    Oct 24, 2015 at 06:56 PM

    Hi Michal,

    Thanks for your reply, i have copied the content from WebContent to root folder and removed the WebContent folder , now i am getting below error:

    in imported project component.js file i can see below code:

    jQuery.sap.declare("ui.s2p.mm.purchorder.approve.Z_FIORI_CO_APV.Component");

    // use the load function for getting the optimized preload file if present
    sap.ui.component.load({
    name: "ui.s2p.mm.purchorder.approve", 
    url: jQuery.sap.getModulePath("ui.s2p.mm.purchorder.approve.Z_FIORI_CO_APV") + "/../MM_PO_APV" // provide parent project url
    // we use a URL relative to our own component; might be different if
    // extension app is deployed with customer namespace
    });

    jQuery.sap.require("ui.s2p.mm.purchorder.approve.Z_FIORI_CO_APV.util.COFormatter");

    ui.s2p.mm.purchorder.approve.Component.extend("ui.s2p.mm.purchorder.approve.Z_FIORI_CO_APV.Component", {
    metadata: {
      version : "1.0",
      config : {
       "sap.ca.i18Nconfigs": {
        "bundleName":"ui.s2p.mm.purchorder.approve.Z_FIORI_CO_APV.i18n.i18n"
       },
       "sap.ca.serviceConfigs" : [ {
        name : "ZFIORI_MM_GBAPP_POAPPROVAL_SRV",
        serviceUrl : "/sap/opu/odata/sap/ZFIORI_MM_GBAPP_POAPPROVAL_SRV;mo",
        isDefault : true
       } ]
      },
     
      customizing: {
       "sap.ui.controllerExtensions": {
        "ui.s2p.mm.purchorder.approve.view.S3": {
         controllerName: "ui.s2p.mm.purchorder.approve.Z_FIORI_CO_APV.view.S3Custom",
        },
       },

       "sap.ui.viewReplacements": {
        "ui.s2p.mm.purchorder.approve.view.S4": {
         viewName: "ui.s2p.mm.purchorder.approve.Z_FIORI_CO_APV.view.S4Custom",
         type: "XML",
        },

        "ui.s2p.mm.purchorder.approve.view.S3": {
         viewName: "ui.s2p.mm.purchorder.approve.Z_FIORI_CO_APV.view.S3Custom",
         type: "XML",
        },
       },

       "sap.ui.viewModifications": {
        "ui.s2p.mm.purchorder.approve.view.S3": {
         "POInformationPaymentTerm": {
          "visible": false
         }
        }
       }

      }  
    }
    });

    I have replaced the below code:

    sap.ui.component.load({

    name: "ui.s2p.mm.purchorder.approve", 

    url: jQuery.sap.getModulePath("ui.s2p.mm.purchorder.approve.Z_FIORI_CO_APV") + "/../MM_PO_APV" // provide parent project url

    // we use a URL relative to our own component; might be different if

    // extension app is deployed with customer namespace

    });

    with code (as i have seen in WebIDE projects)

    sap.ui.component.load({
    name: "ui.s2p.mm.purchorder.approve",

    // Use the below URL to run the extended application when SAP-delivered application is deployed on SAPUI5 ABAP Repository
    url: "/sap/bc/ui5_ui5/sap/MM_PO_APV"

    // we use a URL relative to our own component
    // extension application is deployed with customer namespace
    });

    but still getting same error.

    now project sturcture is:

    Regards,

    Trilochan


    Add comment
    10|10000 characters needed characters exceeded

    • I think it's best to create the extension project via Web IDE:

      File->New->Extension Project->Remote->Select your ABAP system->Select the Fiori app->Click OK->Next->Finish.

      Afterwards you can copy the extensions you have to it.