cancel
Showing results for 
Search instead for 
Did you mean: 

Services/API to retrieve current SCP version of HTML5 applications

former_member220397
Participant
0 Kudos

Dear community,


I would like to identify the SCP version inside my HTML5 application embedded in a launchpad.

I searched in the service sap.ushell.Container.getService("AppLifeCycle") but without success. Do you know where I can find this information (services, API, etc.)?

Thank you in advance for your help.

Regards,

Maurin

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Maurin,

What do you mean by SCP version? Do you mean you want to display the current application version - the one you choose while deploying your HTML5 application?

Regards,
Ivan

former_member220397
Participant
0 Kudos

Dear community,

Do you think it is possible?

Thank you in advance for your help.

Regards.

Maurin

Accepted Solutions (0)

Answers (1)

Answers (1)

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Maurin,

If you mean SCP version the app version, you could retrieve using the following code:

-----> on your Application Component.js

var oManifest = this.getManifestEntry("sap.app");
var sVersion = oManifest["sap.app"]["applicationVersion"]["version"];

Regards,
Ivan

former_member220397
Participant
0 Kudos

Hello Ivan,

Thank you for your answer.

Indeed, I look for the deployment version like you can see in the following screenshot.

I check the method this.getManifestEntry("sap.app")["applicationVersion"]["version"] but it gives me an incorrect version ("1.0").

Otherwise, I find in the project.json a property called "lastVersionWeTriedToDeploy" but it is an incorrect one too like you can see in the following screenshot.

Have I missed something?

Thank you.

Regards.

Maurin

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Maurin,

Could you let me know how your manifest.json file looks like?

If your have your applicationVersion attribute set to 1.0 manually, than this is what the JS code will return.

Regards,
Ivan