简体   繁体   中英

SAP Fiori Launchpad Custom App Error: Cannot instantiate object: “new” is missing

After trying to start our custom developed SAPUI5 app in the fiori launchpad, we received following error message:

Error

LPD_CUST Settings:

LPD_CUST_settings

Component.js

sap.ui.define([
  "sap/ui/core/UIComponent"
 ], function (UIComponent) {
  "use strict";
 return UIComponent.extend("***.***.***.Component", {
 metadata : {
   manifest: "json"
 },

init : function () {
  UIComponent.prototype.init.apply(this, arguments);
 }
 });
});

Target Mapping:

Target Mapping

Semantic Object:

Semantiv Object YCEI_BPUPLOAD_SEM exists in the Transaction /n/UI2/SEMOBJ

The App is starting as a standalone application via the index.html. But if we try to launch it on the SAP Fiori Launchpad, the error message appears.

We also tried following component.js where we entered the value of the Additional Information property in the LPD_CUST transaction but we received the same error.

jQuery.sap.declare("***.***.***.Component");
    sap.ui.core.UIComponent.extend("***.***.***", {
    createContent : function() {
   // create root view
   this.view = sap.ui.view({
   id : "app",
   viewName : "***.***.***.view.App",
   type : sap.ui.core.mvc.ViewType.XML,
   viewData : { component : this }
  });
return this.view;
}
});

(*** are internal components/paths)

All hints are appreciated.

Regards,

Dominic

The error message is linking you to the controller of your application. Please make sure you instantiated the objects correctly. Maybe there is a problem with instantiating an OData Model. Check if you use "new". See syntax below:

https://ui5.sap.com/#/topic/6c47b2b39db9404582994070ec3d57a2.html

You need to use "new" when instantiating an object, for example on your second option:

   this.view = new sap.ui.view({
       id : "app",
       viewName : "***.***.***.view.App",
       type : sap.ui.core.mvc.ViewType.XML,
       viewData : { component : this }
  });

I don't think that's the answer to your problem, but I think it was an error and maybe it can help you somehow.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM