cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

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

michal_keidar
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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

jamie_cawley
Advisor
Advisor
0 Kudos

Try adding another period to the beginning of the path, for example

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


Make sure you close and reopen the preview after making changes to the index.


Regards,

Jamie

SAP - Technology RIG

Former Member
0 Kudos

Hi Jamie,

Thanks, i have changed the setting as suggested by you but now i am getting different error:

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

Uncaught Error: failed to load 'hcm/mgr/approve/leaverequests/Z_FIORI_LR_APV/Component.js' from ./Component.js: Error: failed to load 'hcm/mgr/approve/leaverequests/Component.js' from ./../HCM_LR_APV/Component.js: 404 - Not Found

Regards,

Trilochan

jamie_cawley
Advisor
Advisor
0 Kudos

Most likely the component load path in your Component.js is incorrect, it should be something like

/sap/bc/ui5_ui5/sap/HCM_LR_APV

Regards,
Jamie

SAP - Technology RIG

michal_keidar
Active Contributor
0 Kudos

Hi,

Can you please share your project's structure?

Thanks,

Michal.

Former Member
0 Kudos

Hi Michal,

Please find the project structure:

Regards,

Trilochan

michal_keidar
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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

jamie_cawley
Advisor
Advisor
0 Kudos

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

jamie_cawley
Advisor
Advisor
0 Kudos

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