Skip to Content
avatar image
Former Member

Problem with Extension for HCM_LRQ_APV

We are trying to create a Hybrid Mobile Extension Project for the Leave Requests Approval App with the intention of adding push notifications functionality. So far we successfully managed to do this for the MM_PO_APV and MM_PR_APV Apps, but the Leave Requests Approval is giving us a hard time. Our SAP UI5 Version is 1.28.15.

When trying to run the project on the local iOS device SAP Web IDE gives the following errors:

10:59:09 (Import_ImportTitle) Anwendung CUSCRMLIBREUSE ist nicht vorhanden
10:59:09 (hybrid-toolkit) Get project zip encountered error: Cannot find library project: cuscrmlibreuse (/sap/ui5/1/resources/sap/cus/crm/lib/reuse)!
10:59:09 (hybrid-toolkit) The run command execute failure reason: Cannot find library project: cuscrmlibreuse (/sap/ui5/1/resources/sap/cus/crm/lib/reuse)! at step fetch project and dependancies
10:59:09 (Import_ImportTitle) Anwendung CUSCRMLIBREUSE ist nicht vorhanden
10:59:09 (Import_ImportTitle) Anwendung RETAILSTORELIBREUSE ist nicht vorhanden
10:59:10 (Import_ImportTitle) Anwendung HCMLIBCOMMON ist nicht vorhanden
10:59:10 (Import_ImportTitle) Anwendung RETAILSTORELIBREUSE ist nicht vorhanden
10:59:10 (Import_ImportTitle) Anwendung HCMLIBCOMMON ist nicht vorhanden

I found several possible workarounds (e.g. here) and added the following lines to Component.js, but no luck.

(function() {
jQuery.sap.registerModulePath("sap.hcm.lib.common", "/sap/bc/ui5_ui5/sap/hcm_common/sap/hcm/lib/common/");
}());


(function() {
jQuery.sap.registerModulePath("sap.cus.crm.lib.reuse", "/sap/bc/ui5_ui5/sap/crm_lib_reuse/sap/cus/crm/lib/reuse");
}());

What's a HCM App even doing with a CRM-Library?

Any help would be appreciated.

Kind regards,

Marlies

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Dec 16, 2016 at 11:34 AM

    Thanks for looking this up, nice to know someone is here! Sorry, I just realized that I posted the wrong link, we are extending Approve Leave Requests Version 2 (https://fioriappslibrary.hana.ondemand.com/sap/fix/externalViewer/#/detail/Apps('F1315')/W13).

    It is probable that we have a faulty version of some component, although nobody here changed the code and the corresponding Fiori web app is working fine.

    In the meantime we managed to get the mobile app to work by manually creating a Cordova app. This was quite a tedious task, because amongst other things the parent app had a wrong service name listed in the Configuration.js, which resulted in an HTTP request failed error for the /sap/opu/odata/sap/HCM_LEAVE_REQ_APPROVE_SRV Service.

    In case somebody runs into the same problem, here are the corresponding lines of the Configuration.js:

    Original:

    serviceList: [{
    name: "Approve Leave Requests",
    masterCollection: "LeaveRequestSet",
    serviceUrl: "/sap/opu/odata/sap/HCM_LEAVE_REQ_APPROVE_SRV/",
    isDefault: true,
    mockedDataSource: "/hcm.approve.leaverequest/model/metadata.xml"
    }]

    Correct:

    serviceList: [{
    name: "HCM_LEAVE_REQ_APPROVE_SRV",
    masterCollection: "LeaveRequestSet",
    serviceUrl: "/sap/opu/odata/sap/HCM_LEAVE_REQ_APPROVE_SRV/",
    isDefault: true,
    mockedDataSource: "/hcm.approve.leaverequest/model/metadata.xml"
    }]


    Regards, Marlies

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 07, 2016 at 12:59 PM

    The CRM_LIB_REUSE is a javascript library that is shared among some of the crm fiori apps.

    https://fioriappslibrary.hana.ondemand.com/sap/fix/externalViewer/#/detail/Apps('F1514')/W14

    To build a mobile app you would need to download this app and include it into your mobile extension app.

    Regards,

    Jamie

    SAP Technology RIG

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 13, 2016 at 03:27 PM

    I would suggest checking on the ABAP server if the app is referencing the library, you can use the browser dev tools to confirm. I checked a version I have access to, which I believe is the newest, and found no reference to the library. Is it possible someone made a change to the app?

    Regards,

    Jamie

    SAP Technology RIG

    Add comment
    10|10000 characters needed characters exceeded