Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Karol-K
Advisor
Advisor
0 Kudos
This short blog is about activation of the "classic" controls in scn-design-studio-sdk-development-community for use in "M" mode of design studio.

Why? in the transition mode to M it may be usefully to use old classic controls in M mode.

It is not recommended to make it long term, because technically there is no warranty that this will work forever.

What is needed to do?

you can edit for this reason your local downloaded ZIP package or adjust the already installed content. Here is an example with already installed modification.

Goal: allow KPI View to be usable also in M mode.



  1. Open your folder where "Analysis-config" (for Lumira 2.0: "LumiraDesigner-config") folder is placed, this is normally your "User" folder.

  2. open the correct package (in this case "basics") with some tool (like WinRar)

  3. open the "contribution.xml" file and search for your control (by name)

  4. when found, modify the lines as above - allow the "mode=m" and assure that requireJs has also the "m" in the value (othercase the handler will be not loaded)

  5. close this file, assure the content in the JAR is updated correctly (WinRar is asking for that)

  6. now, go to the control js file (in res/<name>) like here

  7. open it and add following code as below:
    // ### special code for M mode ###
    // load sap.ui.commons
    var oCore = sap.ui.getCore();// mark forced re-load of sap.m events bundle
    oCfgData = window[“sap-ui-config”]

    if(oCfgData.libs.indexOf(“sap.ui.commons”) == -1) {
    oCore.loadLibrary(“sap.ui.commons”);

    oCfgData.libs = oCfgData.libs + “,sap.ui.commons”;
    }
    // ### end special code ###


  8. close this file, assure the content in the JAR is updated correctly (WinRar is asking for that)

  9. now, start Design Studio again, your control should be visible also in M mode and rendering should work as well.


First one who will need and try it out, please let others know if it works.
9 Comments
alexdc12
Participant
0 Kudos

Thanks so much for this Karol! I have followed your steps and can confirm it works well, just a few things to pay attention too.

The folder where my plugins were was different, its was c:\users\username\LumiraDesigner-Config, I did have the Analysis-Config folder but this must be from the old DS installation.

When copying the code i missed the two first // and also the quotation marks need to be changed.

This is your code

// ### special code for M mode ###
// load sap.ui.commons
var oCore = sap.ui.getCore();// mark forced re-load of sap.m events bundle
oCfgData = window[“sap-ui-config”]

if(oCfgData.libs.indexOf(“sap.ui.commons”) == -1) {
oCore.loadLibrary(“sap.ui.commons”);

oCfgData.libs = oCfgData.libs + “,sap.ui.commons”;
}
// ### end special code ###

This is what i changed it too

// ### special code for M mode ###
// load sap.ui.commons
var oCore = sap.ui.getCore();// mark forced re-load of sap.m events bundle
oCfgData = window["sap-ui-config"]
if(oCfgData.libs.indexOf("sap.ui.commons") == -1) {
oCore.loadLibrary("sap.ui.commons");
oCfgData.libs = oCfgData.libs + ",sap.ui.commons";
}
// ### end special code ###

 

At one points whilst updating the js file adn trying to put back into jar file i received an error about the file being in use, closing Lumira Designer solved this.

alexdc12
Participant
0 Kudos
I guess we would need to resend the platform extensions to the server for this to work from the BIP platform
mike_howles4
Active Contributor
karol.kalisz of course right after I comment to alexdc121 that nobody is working on the SDK components any more you make a cameo appearance with the answer 🙂  I'm happy Alex found some help.  I hope all is well.
alexdc12
Participant
0 Kudos
I kind of dragged him out of retirement for a brief period of time!
Karol-K
Advisor
Advisor
Thanks for the hint, indeed there is special "code sample" block - now adjusted.
Karol-K
Advisor
Advisor
0 Kudos
yes, you have to push the updated content to the platform. as this art of change does not change the versioning, you need to uninstall from the platform and install again.
Karol-K
Advisor
Advisor
Hi mike.howles4,

I am not working on Design Studio topics since 3 years - and in addition the community pages were changes, so it was hard to find own blogs / questions etc. But now the second part is fixed, so I think is time to increase a bit the activity at least on helping to keep the content "running".

Karol
alexdc12
Participant
0 Kudos
it would be great to have you back! it seems a shame for the components to no longer be developed. They have been a great help in my work!
alexdc12
Participant
0 Kudos
i have updated mine to use the code sample block and it now keeps teh correct quotation marks