Skip to Content
Technical Articles
Author's profile photo Karol Kalisz

Work-Around for Design Studio classic SDK controls in M mode

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.

Assigned Tags

      9 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Alex Cruickshank
      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.

      Author's profile photo Karol Kalisz
      Karol Kalisz
      Blog Post Author

      Thanks for the hint, indeed there is special "code sample" block - now adjusted.

      Author's profile photo Alex Cruickshank
      Alex Cruickshank

      i have updated mine to use the code sample block and it now keeps teh correct quotation marks

      Author's profile photo Alex Cruickshank
      Alex Cruickshank

      I guess we would need to resend the platform extensions to the server for this to work from the BIP platform

      Author's profile photo Karol Kalisz
      Karol Kalisz
      Blog 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.

      Author's profile photo Michael Howles
      Michael Howles

      Karol Kalisz of course right after I comment to Alex Cruickshank 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.

      Author's profile photo Alex Cruickshank
      Alex Cruickshank

      I kind of dragged him out of retirement for a brief period of time!

      Author's profile photo Karol Kalisz
      Karol Kalisz
      Blog 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

      Author's profile photo Alex Cruickshank
      Alex Cruickshank

      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!