cancel
Showing results for 
Search instead for 
Did you mean: 

Extending Fiori PO Approval standard app

former_member195698
Active Contributor
0 Kudos


Hello All ,

We are trying to extend a wave 2 app .  Did the following

1)  Downloaded the PO approval from ECC and created a project in Eclipse

     UI5_MM_PO_APVL).

2) Tested it by launching it in the sandbox . It works fine .

3) Created an extension project UI5_MM_PO_APVLExtension for the above parent application .

4) Made changes to component.js of extn project specifying the parent URL .

     However , the extension app does not work .

When debugged in Chrome , we are basically getting the below error .

Uncaught Error: failed to load 'sap/mm/purchaseorder/approve/uilib/UI5_MM_PO_APVLExtension/Component.js' from ./Component.js: Error: failed to load 'sap/mm/purchaseorder/approve/uilib/Component.js' from ./../UI5_MM_PO_APVL/Component.js: 404 - Not Found sap-ui-core.js:80

Basically we want to know whenever an extension project is launched , how does the content of the parent project's component load ?

Details of Component.js .

jQuery.sap.declare("sap.mm.purchaseorder.approve.uilib.UI5_MM_PO_APVLExtension.Component");

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

sap.mm.purchaseorder.approve.uilib.Component.extend("sap.mm.purchaseorder.approve.uilib.UI5_MM_PO_APVLExtension.Component", {
metadata: {
  version : "1.0",
  config : {
   "sap.ca.i18Nconfigs": {
    "bundleName":"sap.mm.purchaseorder.approve.uilib.UI5_MM_PO_APVLExtension.i18n.i18n"
   },
  
  },
 
  customizing: {
  }  
}
});

Any help in fixing the above issue would be helpful !!

Thanks

Abhishek

Tags edited by: Michael Appleby [also moved to SAP for Mobile community]

Message was edited by: Michael Appleby

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hello Abhishek,

The backend name of the PO approval app should be MM_PO_APV. I hope it is not different in your case.

In the component.js of your extension where it says to provide your parent project url, you need to use MM_PO_APV (the name of the application in backend, not the name you have in eclipse).

And i hope when you say you are testing in your sandbox, you mean your sap gateway backend. I hope you are uploading the extension to your backend and assigning the component to your extension under Additional Information of Advanced parameters?

Regards,

Varun

former_member253524
Participant
0 Kudos

Hello Abhishek,

Are you able to resolve your issue?

Former Member
0 Kudos

Hi,

In case this is still not answered:

I've had the same issue, but finally I found the problem.

There are 2 places you should check:

1) Check the index.html of the enhancement project. Is the namespace of both the resourceroots and the componentcontainer equal to the namespace used in Component.js?

2) In SAP Gateway system go to transaction LPD_CUST and check if the 'Additional information' of the tile has the correct value. In Part 3 of the guide, Murali filled in sapui5.component=cus.crm.mycalendar.CUST_CRM_MYCAL_EXT, you should check if the namespace is equal to the namespace used within the enhancement project.


My mistake was that I forgot to change the LPD_CUST after making a change to the namespace in the enhancement project.


I hope this helps.


Best Regards,

Nico Deleener

former_member253524
Participant
0 Kudos

Hello Nico,

I have similar issue and even after doing steps mentioned by you its not resolved. could you please take a look at post

Former Member
0 Kudos

Please remove .UI5_MM_PO_APVLExtension from all the lines where you find it.

e.g. remove .UI5_MM_PO_APVLExtension from

"sap.mm.purchaseorder.approve.uilib.UI5_MM_PO_APVLExtension.Component" and same for other lines. Then please try again to upload.

Regards,

Dipanshu

Murali_Shanmu
Active Contributor
0 Kudos

Hi Abhishek,

sap.ui.component.load is used to load the parent application.

Try changing URL parameter to the physical location of the parent service - PO Approval.

url: "/sap/bc/ui5_ui5/sap/XXXXXXX"

Cheers,

Murali

former_member216125
Discoverer
0 Kudos

Hello Murali ,

We have tried even that . But it doesnt work . We can see in the resources parent app resource in bebug mode , however it doesn't load the Component.js of the parent .

Thanks

Anu