cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Web IDE on-premise and CRM My Contacts

MariusStoica
Active Participant
0 Kudos

Hi guys,

i'm trying to extend the CRM App My Contacts and I get an error message, or several...

Any idea what am I doing wrong?CRM system

The app works well in Fiori Launchpad, with data from .

Thank you,

Marius

Accepted Solutions (1)

Accepted Solutions (1)

michal_keidar
Active Contributor
0 Kudos

Hi,

You've been able to create the extension project successfully and you're getting an error when previewing it? How did you choose to preview the application?

You're using the local Web IDE right?

Regards,
Michal.

MariusStoica
Active Participant
0 Kudos

Hi Michal,

Yes, I've created an extension to the already existing Fiori App and I'm getting an error while trying to preview it.

I tried as both "Web App" and "Fiori Component Sandbox" and I get the same error.

Thank you,

Marius

michal_keidar
Active Contributor
0 Kudos

Can you please share the extension project's neo-app.json file?

MariusStoica
Active Participant
0 Kudos

Sure.

ETG is the Gateway system of my client and it's defined in "c:\SAPWEBIDE\eclipse\config_master\service.destinations\destinations\" as :


#ServiceDestination

Description=ETG

Type=HTTP

TrustAll=true

Authentication=BasicAuthentication

WebIDEUsage=odata_abap,ui5_execute_abap,dev_abap

Name=ETG

URL=http\://ip\:8000

ProxyType=OnPremise

WebIDESystem=ETG

WebIDEEnabled=true

sap-client=000


{

  "welcomeFile": "index.html",

  "routes": [

    {

      "path": "/sap/opu/odata",

      "target": {

        "type": "destination",

        "name": "SAP_Gateway",

        "entryPath": "/sap/opu/odata/"

      },

      "description": "Target OData system"

    },

    {

      "path": "/sap/ui5/1/resources/sap/cus/crm/lib/reuse",

      "target": {

        "type": "application",

        "name": "cuscrmlibreuse",

        "entryPath": "/sap/cus/crm/lib/reuse",

        "preferLocal": true

      },

      "description": "CRM LIB Reuse"

    },

    {

      "path": "/sap/ui5/1/resources/sap/retail/store/lib/reuse",

      "target": {

        "type": "application",

        "name": "retailstorelibreuse",

        "entryPath": "/sap/retail/store/lib/reuse",

        "preferLocal": true

      },

      "description": "Retail Store Lib Reuse"

    },

    {

      "path": "/sap/ui5/1/resources/sap/hcm/lib/common",

      "target": {

        "type": "application",

        "name": "hcmlibcommon",

        "entryPath": "/sap/hcm/lib/common",

        "preferLocal": true

      },

      "description": "HCM Lib Reuse"

    },

    {

      "path": "/sap/bc/ui5_ui5",

      "wattUsage": "ui5_execute_abap",

      "target": {

        "type": "destination",

        "name": "ETG",

        "entryPath": "/sap/bc/ui5_ui5"

      },

      "description": "ETG"

    },

    {

      "path": "/resources",

      "target": {

        "type": "service",

        "name": "sapui5",

        "entryPath": "/resources"

      },

      "description": "SAPUI5 Resources"

    },

    {

      "path": "/test-resources",

      "target": {

        "type": "service",

        "name": "sapui5",

        "entryPath": "/test-resources"

      },

      "description": "SAPUI5 Test Resources"

    }

  ]

}

MariusStoica
Active Participant
0 Kudos

Hi

Any news ?

Thanks,

Marius

michal_keidar
Active Contributor
0 Kudos

Hi Marius,

Can you please import the My Contacts app from your ABAP to Web IDE and see if it runs?

I would like to try and isolate the problem. I see that the OfflineInterface.js could not be found and it should be found in the original application.

Please try and let me know the outcome.

Thanks,
Michal.

MariusStoica
Active Participant
0 Kudos

Hi

When I try to run tha pp it tells me that  there is an error. "Incomplete run configuration" and sends me to the create Run configuration page.

Regarding the offlineInterface.js file, I do get an error in the console:

Thank you,

Marius

michal_keidar
Active Contributor
0 Kudos

Hi,

How did you run it?

I just imported it from ABAP in my trial account, selected its Component.js and clicked on the Run button and it ran successfully.

Regards,
Michal.

MariusStoica
Active Participant
0 Kudos

Just clicked the folder with the app and then he button "Run".

michal_keidar
Active Contributor
0 Kudos

have you tried selecting the Component.js?

What is the version of your Web IDE?

MariusStoica
Active Participant
0 Kudos

Yes, I can select it and open it.

Version 1.12.8

Regards,

Marius

michal_keidar
Active Contributor
0 Kudos

Sorry for the delay in response.

The neo-app.json you attached earlier, is it of the generated extension project or the original My Contacts app?

The version of the local Web IDE is very old and is lacking many bug fixes.

There should be an update soon but until then, can you use the cloud version of Web IDE?

Regards,
Michal.

MariusStoica
Active Participant
0 Kudos

Hi Michal,

Since then I've started working on the Cloud version.

I still get the same errors when I try to run the extension or the original app.

Regards,

Marius

michal_keidar
Active Contributor
0 Kudos

I think it's got something to do with the paths in the neo-app.json, perhaps a missing path causes the Offline file to not be found. Can you attach both neo-app.json of the original app and of the extended app?

MariusStoica
Active Participant
0 Kudos

Sure.

Original app:


{

  "cacheControl": [

    {

      "maxAge": 86400

    }

  ],

  "routes": [

    {

      "path": "/sap/opu/odata",

      "target": {

        "type": "destination",

        "name": "etb",

        "entryPath": "/sap/opu/odata"

      },

      "description": "etb"

    },

    {

      "path": "/sap/ui5/1/resources/sap/cus/crm/lib/reuse",

      "target": {

        "type": "application",

        "name": "cuscrmlibreuse",

        "entryPath": "/sap/cus/crm/lib/reuse",

        "preferLocal": true

      },

      "description": "CRM LIB Reuse"

    },

    {

      "path": "/sap/ui5/1/resources/sap/retail/store/lib/reuse",

      "target": {

        "type": "application",

        "name": "retailstorelibreuse",

        "entryPath": "/sap/retail/store/lib/reuse",

        "preferLocal": true

      },

      "description": "Retail Store Lib Reuse"

    },

    {

      "path": "/sap/ui5/1/resources/sap/hcm/lib/common",

      "target": {

        "type": "application",

        "name": "hcmlibcommon",

        "entryPath": "/sap/hcm/lib/common",

        "preferLocal": true

      },

      "description": "HCM Lib Reuse"

    },

    {

      "path": "/sap/bc/ui5_ui5",

      "target": {

        "type": "destination",

        "name": "etb",

        "entryPath": "/sap/bc/ui5_ui5"

      },

      "description": "etb"

    },

    {

      "path": "/resources",

      "target": {

        "type": "service",

        "name": "sapui5",

        "entryPath": "/resources"

      },

      "description": "SAPUI5 Resources"

    },

    {

      "path": "/test-resources",

      "target": {

        "type": "service",

        "name": "sapui5",

        "entryPath": "/test-resources"

      },

      "description": "SAPUI5 Test Resources"

    }

  ]

}

Extended app:


{

  "welcomeFile": "/webapp/index.html",

  "routes": [

    {

      "path": "/sap/opu/odata",

      "wattUsage": "odata_abap",

      "target": {

        "type": "destination",

        "name": "etb",

        "entryPath": "/sap/opu/odata"

      },

      "description": "etb"

    },

    {

      "path": "/sap/bc/ui5_ui5",

      "wattUsage": "ui5_execute_abap",

      "target": {

        "type": "destination",

        "name": "etb",

        "entryPath": "/sap/bc/ui5_ui5"

      },

      "description": "etb"

    },

    {

      "path": "/webapp/resources",

      "target": {

        "type": "service",

        "name": "sapui5",

        "entryPath": "/resources"

      },

      "description": "SAPUI5 Resources"

    },

    {

      "path": "/webapp/test-resources",

      "target": {

        "type": "service",

        "name": "sapui5",

        "entryPath": "/test-resources"

      },

      "description": "SAPUI5 Test Resources"

    },

    {

      "path": "/dist/resources",

      "target": {

        "type": "service",

        "name": "sapui5",

        "entryPath": "/resources"

      },

      "description": "SAPUI5 Resources"

    },

    {

      "path": "/dist/test-resources",

      "target": {

        "type": "service",

        "name": "sapui5",

        "entryPath": "/test-resources"

      },

      "description": "SAPUI5 Test Resources"

    },

    {

      "path": "/resources",

      "target": {

        "type": "service",

        "name": "sapui5",

        "entryPath": "/resources"

      },

      "description": "SAPUI5 Resources"

    },

    {

      "path": "/test-resources",

      "target": {

        "type": "service",

        "name": "sapui5",

        "entryPath": "/test-resources"

      },

      "description": "SAPUI5 Test Resources"

    }

  ],

  "sendWelcomeFileRedirect": true

}

michal_keidar
Active Contributor
0 Kudos

Hi,

Try to add this code in the extended app's Component.js:

(function() {

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

}());


Right between the "jQuery.sap.declare.." and the "sap.ui.component.load..."


Regards,

Michal.

MariusStoica
Active Participant
0 Kudos

Yeah !

That's it !

Is it something I need to do on all of my extended apps ? Or I forgot a patch or something to install ?

Thank you,

Marius

michal_keidar
Active Contributor
0 Kudos

Hi Marius, sorry it took me so long to figure this out, this is actually a known issue in these apps that use an external library.

If you will import these apps and look at their Component.js you will see they have some "hack" in the way they load the external library.

The way to overcome it in the extension project is by adding the code I wrote.

A better and much more elegant solution is on its way, we actually already support it in Web IDE but the Fiori apps should adapt their code and this hasn't happen yet.

So in the meanwhile this is the workaround when executing extension projects for Fiori apps that use external libraries (the workaround changes if the library is different).

Regards,
Michal.

Answers (1)

Answers (1)

MariusStoica
Active Participant
0 Kudos

Hi guys,

Any other ideas ?

Although I can access the ABAP Repository, I can't run any of the Fiori apps from it.

Regards,

Mrius