Skip to Content

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.

To report this post you need to login first.

9 Comments

You must be Logged on to comment or reply to a post.

  1. Alex Cruickshank

    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.

    (0) 
    1. Karol Kalisz
      Post author

      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.

      (0) 
    1. Karol Kalisz
      Post author

      Hi Mike Howles,

      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

      (1) 

Leave a Reply