Skip to Content
Author's profile photo Tobias Kuhn

Disable PSM Check for a Solution in SAP Cloud Applications Studio

This Blog Post is also available in German at the Data One Blog.

 

Many SAP Cloud Applications Studio developers know the struggle, that they want to access information of an SAP Business Object and can’t find them.

This could be an element, a node, a function (action) which is needed for solution development but it can’t be found and located in the repository explorer. A possible reason for that could be, that there is a Public Solution Model (PSM) release missing for that information. Even when you are sure that there is a missing PSM release, you end up with some missing information to get the release incident done quickly. For the incident you would like to provide all the needed information for SAP to get the PSM release done and with less as possible questions about a speculated name or position in the BO structure.

 

Deactivate PSM Check

To get an better understanding if you are right with the assumed name and position of the element you are searching for, you can deactivate the PSM check for an solution. This also brings you in the position to cross check the correct functionality before you create the incident.

import AP.PlatinumEngineering.Public;

Solution.PSMTurnOff("<Solution_Name>");

 

This deactivation also brings you very interesting insides into the BO structures of SAP by using the repository explorer.

 

Activate PSM Check

Now of course you do not want to work permanently without the activated Public Solution Model, so there is also a way to turn the check back on.

 

import AP.PlatinumEngineering.Public;

Solution.PSMTurnOn("<Solution_Name>");

 

I hope this will help you to find Business Object information easier and also to understand the structures a bit better.

Assigned Tags

      14 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hello Tobias,

      first of all, thank you for that information! I have a few questions:

      • How is this code line "Solution.PSMTurnOff("");" used, does it need anything in the parameter or should it be an empty string (since the code completions says "Solution" as the parameters name)
      • Is it sufficient to add it to any absl-Script and activate it?
      • Is it needed to have the script be executed by a user?
      • Does the studio need a restart (or something alike) to have it working?

      Thank you and best regards,

      Jürgen

      Author's profile photo Nathanael Mangold
      Nathanael Mangold

      Hello Jürgen,

      I try to answer your questions:

      1. You need to put in your solution name. e.g. Solution.PSMTurnOff("Y123ABC_");
      2. As far as I can say you only need to fire the action once and then it will be disabled until you turn it on again.
      3. I don't know what you exactly mean by executed by a user? How else should it be executed?
      4. You have to at least switch to another solution and then back to your solution to make it work. However, sometimes you have to log on and off again to make it work or change any line of code and activate the script again.
      Author's profile photo Tobias Kuhn
      Tobias Kuhn
      Blog Post Author

      I updated the code snippet with the information about the solution name.

      Author's profile photo Johannes Schneider
      Johannes Schneider

      Hello Nathanael,

       

      I'm not able to import

      import AP.PlatinumEngineering.Public;

      and in

      import AP.PlatinumEngineering;

      the library Solution is missing and i am not able to find the methods described.

       

      Could you please provide a full code example (e.g. a screenshot where you whitened out all critical data?)

       

      Thanks and Kind Regards,

      Johannes

      Author's profile photo Tobias Kuhn
      Tobias Kuhn
      Blog Post Author

      Hi Johannes,

      the following code is an working code example out of an action for one of our solutions.

      import ABSL;
      import AP.PlatinumEngineering.Public;
      
      Solution.PSMTurnOff("YIMCBEWCY_");
      // Some more code for messages and so on

       

      I hope this will help you.

       

      Best regards

      Tobias

      Author's profile photo Johannes Schneider
      Johannes Schneider

      Hello Tobias,

       

      with the exact same code (copy&paste) I get the error message, that the imported namespace is not valid.

       

      At this point I can’t help myself, I hope this information is kind of useful for you.

       

      Kind Regards,

      Johannes

       

      Author's profile photo Tobias Kuhn
      Tobias Kuhn
      Blog Post Author

      Hi Johannes,

       

       

      On which type of System did you tried to use this code? Eventually this could be the problem...

       

      Mass enabled ABSL Script to turn the PSM off for a given solution name in the BO (saves the PSM state also internally in the BO):

       

      Best regards

      Tobias

      Author's profile photo Johannes Schneider
      Johannes Schneider

      Hello Tobias,

       

      it seems like the answer of stefan kiefer is correct.

      Our Tenant is not a BusinessByD Tenant.

       

      Thanks for all the afford anyways.

      Have a good day and kind regards,

      Johannes

      Author's profile photo Stefan Kiefer
      Stefan Kiefer

       

      Hallo,

      I am the developer of this function. The function was created by me maybe two years back.

      It is published only and working only on Business By Design Tenants which might be a reason for some comments above. The description to use it is perfect.

      The intension of the function is to provide some temporary visibility to all attributes, actions, associations. With the many business objects in Business By Design there are still some gaps which may come up in a project. The function should help to see also the parts which are hidden by the PSM concept - and to try/test things out - in order to have than a fundament to request development to release it.

      There are three things to consider:

      • the solution cannot be assembled if PSM is turned off
      • the solution will get syntax errors if parts are used which are not PSM released
      • other uses get the full tooltip for all functions in this tenant as well - they might use not released functions

      Bringing these three points together the conclusion is that it should only be turned off for a short time - and you should not forget to turn it on after your test.

      In C4C this function is in my opinion much less required as in Business ByDesign because there are less business objects and most of them have been frequently used in projects because the development activities concentrate on this objects. So there is no plan to enable this feature for C4C.

      Best regards and many thanks to the author to start this blog

      Stefan Kiefer

      Author's profile photo Tobias Kuhn
      Tobias Kuhn
      Blog Post Author

      Hello Stefan,

       

      Thank for your reply and the clarification on this topic.

      Also a huge thanks for developing this reuse library :-).

       

      Best regards

      Tobias Kuhn

       

      Author's profile photo Yaniv Barel
      Yaniv Barel

      Hi All,

      I saw the Questions and answers regarding the PSM, but i get ths meesage

      while trying to create a new web service for managing and updating the exchange rate table

      how this message relates to the PSM defintion ?

      Can i deactivate it and activate again after the web service has been created ?

      thank you

      Author's profile photo Tobias Kuhn
      Tobias Kuhn
      Blog Post Author

      Hi,

       

      Why do you need your own exchange rate web service. Why not use the ManageExchangeRateIn Web Service?

       

      Best regards

      Tobias

       

      Author's profile photo Yaniv Barel
      Yaniv Barel

      Hi,

       

      I’m trying to use the current exchange rate web service, but i need to modify the WSDL for receving the data from an XML file.

      Our exchange rate input is in xml file whcih need to be uploaded to the system.

      Do you have any suggesetion rather then create my own web service ?

      thank you

       

      Author's profile photo Tobias Kuhn
      Tobias Kuhn
      Blog Post Author

      Hi,

       

      I would do the transformation of the XML file before the SOAP request.

      • Read the file
      • Transform the data into the soap request
      • Submit the soap request

       

      Best regards

      Tobias Kuhn