Skip to Content

SAP Fiori Leave Approval Extended App error

Dear All,

I have extended the sap fiori standard project for Leave Approval using sap fiori toolkit , in that I have made the visible property of few fields as hidden in the component.js and after that am launching the same from the eclipse itself , in the app preview the master list is loaded and all the changes are reflected but the detail screen is not rendered and shows an error of invalid key predicate after assessing the error I found out that in my standard app the service which is called is appended with /detail/LeaveRequestCollection(SAP__Origin='LOCAL',RequestId='5A4949DA3B021ED4A593C9F58B1B18FE') but my custom app when it has appended as /detail/LeaveRequestCollection('5A4949DA3B021ED4A593C9F58B1B18FE') and with error invalid key predicate please find the image for reference :

Also after that when I launch the standard app it also starts showing the same error as in my custom App with the same error and same request is also being called from my standard app which was working fine before launching the extended app, this behavior is really confusing and have almost lost a day with this error not sure about the root cause if anyone out there has faced similar issue and have resolved this then please share the solution as it would be really helpful.



pastedImage_9.png (17.0 kB)
Add comment
10|10000 characters needed characters exceeded

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 05, 2015 at 06:00 PM

    Hello Fenil,

    Please try the URL in GateWay Client or in Rest Client once.

    If your URL is containing SAP__Origin your URL need to be as below :


    Also try,




    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Fenil doshi

      Hi Fenil,

      I can see this thread still un answered, we also faced this issue ,it seems its Multiple Origin Issue:

      we have added ;mo at the end of service URL and it got resolved:



  • Posted on Jan 05, 2015 at 04:20 PM


    Did you comment anything in Component.js relating to SAP_Origin?

    Check Chapter 9 in this document. That can give you an idea.



    Add comment
    10|10000 characters needed characters exceeded

    • Hi Krishna,

      No actually I haven't commented any code in the component.js in the extended fiori project for Leave Approval, please find the below code from the component.js file in my extended project below :"hcm.mgr.approve.leaverequests.z_hcm_lr_apv_01.Component");

      // use the load function for getting the optimized preload file if present


      name: "hcm.mgr.approve.leaverequests",

      url:"hcm.mgr.approve.leaverequests.z_hcm_lr_apv_01") + "/../{hcm_lr_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


      hcm.mgr.approve.leaverequests.Component.extend("hcm.mgr.approve.leaverequests.z_hcm_lr_apv_01.Component", {

      metadata: {

      version : "1.0",

      config : {

      "": {



      "": [{

      name: "LEAVEAPPROVAL",

      serviceUrl: "/sap/opu/odata/GBHCM/LEAVEAPPROVAL/",

      isDefault: true



      customizing: {

      "sap.ui.viewModifications": {

      "hcm.mgr.approve.leaverequests.view.S3": {

      "Overlaps": {

      "visible": false







      That's why I am confused like where is the issue exactly because I haven't constructed any url myself and is any ways same as the parent project.