Skip to Content
Author's profile photo Melvin Hidalgo

SAP Platinum Engineering Libraries

Since I haven’t seen any information about this at all, I would like to start this post, so we can share our experiencies with this so-called Platinum Libraries.

Let’s start with the QA

1. What is an SAP Reuse Library?

These are basically a collection libraries with functions that SAP offers to make simple actions, conversions, etc. One good example of this will be the following to convert a string to a Date.

var forDate = Date.ParseFromString("2017-01-01T00:00:00")

 

2. SAP Platinum Engineering Libraries?

Yes, there’re a group of these reuse libraries that offer really nice functionalities.

 

What I believe so far, is that these are existing internal functions from SAP, that they’ve been using all this time to accomplish some of the things that we as ‘Partners’ didn’t have access, at least until now.

 

2.1. How to access the Platinum Engineering Libraries?

This is the easiest part, and you’ll be able to visualize all the different functions that are available; in order to do this, just add the following two import lines to your ABSL code

import AP.PlatinumEngineering;
import AP.PlatinumEngineering.Public;

Then, just click Ctrl + Space, and navigate through all the wonderful collection:

And this is just an example of one collection called UserUtils, there’re a lot more.

Looks cool doesn’t it? But there’s something about it that gets me to think

 

2.2. Main Issue using this Libraries

The main issue that I have encounter with this Libraries, is that some of the really cool ones, for example the one that let’s you execute a SADL Query has no information at all about the parameters that must be set.

Check this example:

 

Check that the function receives a SADL_UUID, this I have absolutely no idea where to get it.

And the same happens with a lot of them, some are pretty much straight forward, but then you find a really cool function like this, and you have no clue about how to use it.

 

3. Why there’s no documentation on this?

Well, at least I haven’t been able to find it.

But the main thought that comes to my mind is that all of these are still experimental, and SAP is going to be delivering them officially at some point (please note that I’m not sure of this, perhabs a colleague from SAP can confirm my theory)

 

So, please comment below your experiences with this Libraries and if you were able to make a hard one work please share it with us, I’ll leave one myself.

 

4. Platinum Engineering Examples

I’ll assume you already made the imports mentioned on 2.1.

4.1. Sending an Email via ABSL

//Create sender
var sender : EmailURI;
sender.content = "NoReply@myXXXXXX.sapbydesign.com";

//Assign recipients (receivers)
var recipients : EmailRecepientDataTable;
var dat : EmailRecepientData;
dat.EmailUri.content = "Destination@Email.com";
dat.EmailRecepientTypeCode = "TO";
recipients.EmailData.Add(dat);

//Assign the content of the Email
var bodyMail : XPEStringTab;
bodyMail.XPEString.Add("This is the content of the email");

//Call SAP Platinum Engineering Function
Mail.Send("Email Subject", bodyMail, sender, recipients);
						

 

5. List of Current Libraries

– Thanks to Former Member

  • AddonSupport
  • Binary
  • BOAction
  • BPHierarchy
  • Calendar
  • ChangeHistory
  • Codelist
  • Context
  • CSV
  • CurrencyConversion
  • Date
  • DateTime
  • DocumentService
  • Duration
  • Fuzzy
  • GlobalDateTime
  • Hash
  • LanguageCode
  • LocalDateTime
  • LocalizedNormalizedDateTime
  • Mail
  • MDRO
  • NumberRange
  • Numeric
  • NumericCharacter
  • Odata
  • OrgUnitUtils
  • Output
  • OutputManagementUtilities
  • Performance
  • QuantityConversion
  • RetailExecution
  • SADLQuery
  • SalesHelpFunctions
  • SessionContext
  • TextAnalysis
  • Time
  • Trace
  • URL
  • UserUtils
  • Utilities
  • UUID
  • WebDav
  • WebserviceUtilities
  • ZXUtil

 

Thanks, and Pura Vida.

 

Melvin

 

 

 

Assigned Tags

      18 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Johannes Schneider
      Johannes Schneider

      Hello Melvin,

       

      as you already mentioned in your blog there are some guides on how to use the platinum engineering library for example for writing an email in absl or handling timestamps etc.

      In my over one year trying to research do researches for the SAP C4C development i never saw a whole documentation for this. Some Platinum Engineering devs are sometimes here if there is a specific error with something in their library and i think i remember there is also a forum for their development but i couldn't find it or i dont remember it right.

       

      Kind Regards,

      Johannes

      Author's profile photo Horst Schaude
      Horst Schaude

      Hello Melvin,

      Precisely observed. 🙂

      Let me add one or two points to this.

      1. As you are mentioning that the SAP Platinum Engineering Libraries are " existing internal functions from SAP" they are not revised by the documentation team.
        Therefore it may happen that some values like that SADL UUID is not available for the "normal" PDI developer.
      2. Regarding documentation: I have asked the colleagues some tie ago if they are willing to provide documentation which would be incorporated in the documentation available via help.sap.com or direct in the SDK.
        Unfortunately and obviously without any success. 🙁
        I will take this blog as a new starting point for my request.

      Bye,
      Horst

      Author's profile photo Melvin Hidalgo
      Melvin Hidalgo
      Blog Post Author

      Horst,

       

      Thanks for your comments on this.

       

      And yes, please feel free to use this post as you wish, the idea is to have all the insights and comments from all the colleagues, share some thoughts and add some more content to it.

       

       

      Author's profile photo Former Member
      Former Member

      Hi Melvin,

      Thanks for sharing, this is great!

      Currently i have a question on  the function "Hash.EncryptString()". I don't know how to use  the parameters  . Do you have some code on how to use it ?

      Thanks and Regards.

      Qiang

      Author's profile photo Venkatesh Govindan
      Venkatesh Govindan

      Hi Qiang,

       

      Were you successful in using Hash Library for decryption / Encryption? If yes , please share some information.

      We are in need of Encrypting and Decrypting a JSON string. Thanks in Advance.

       

      Regards

      Venkatesh

      Author's profile photo Rufat Gadirov
      Rufat Gadirov

      Hello Melvin,

      thank you for this very useful Information!

      I tried this approach in Cloud Studio with C4C as backend. But unfortunately, it seems that the namespace "import AP.PlatinumEngineering.Public" is not available in C4C, only in ByD. Thus, I cannot use the respective functions.

      Best regards, Rufat

       

      Author's profile photo Former Member
      Former Member

      That's strange, for me the libraries are available in C4C also.

      Also, I have compiled a list of Reuse libraries, as documentation is lacking:

      Reuse libaries:
      • AddonSupport
      • Binary
      • BOAction
      • BPHierarchy
      • Calendar
      • ChangeHistory
      • Codelist
      • Context
      • CSV
      • CurrencyConversion
      • Date
      • DateTime
      • DocumentService
      • Duration
      • Fuzzy
      • GlobalDateTime
      • Hash
      • LanguageCode
      • LocalDateTime
      • LocalizedNormalizedDateTime
      • Mail
      • MDRO
      • NumberRange
      • Numeric
      • NumericCharacter
      • Odata
      • OrgUnitUtils
      • Output
      • OutputManagementUtilities
      • Performance
      • QuantityConversion
      • RetailExecution
      • SADLQuery
      • SalesHelpFunctions
      • SessionContext
      • TextAnalysis
      • Time
      • Trace
      • URL
      • UserUtils
      • Utilities
      • UUID
      • WebDav
      • WebserviceUtilities
      • ZXUtil

       

      Author's profile photo SAMUELE BARZAGHI
      SAMUELE BARZAGHI

      Info about method PSMTurnOff

      Disable PSM Check for a Solution in SAP Cloud Applications Studio

       

      Author's profile photo Dhruvin Mehta
      Dhruvin Mehta

      Thanks for this amazing blog!

      Just want to add one more point  and one more doubt.

      1. if we use Platinum Engineering library we cant raise a hig prio incident if it doesnt work.
      2. Above code for sending email somehow is not working for me! 🙁

      Kindly suggest.

      Dhruvin

      Author's profile photo Hanumath Kanamarlapudi
      Hanumath Kanamarlapudi

      Thanks, Melvin for the excellent blog.

      I have a question regarding the current available list of reuse libraries. In the list I would like to use a function related to consumption of ODATA API on the ByDesign reports.

      Please let me know if that function is available to use and can I execute the report and look into the data.

      Knut Heusermann Horst Schaude Any suggestions on this would be great help for us to achieve the customer need.

       

      Thanks.

      Regards

      Hanu K

       

      Author's profile photo Horst Schaude
      Horst Schaude

      Hello Hanumath,

      The Platinum Engineering libraries are not an official part of the SDK shipment.
      Therefore my effort to get them documented had no success. 🙁

      As Dhruvin mentioned these libraries are not supported w.r.t. raising incidents.

      Therefore if you need any function which you did not find in the SDK, please raise an idea request: https://influence.sap.com/sap/ino/#/campaign/903

      HTH,
      .    Horst

      Author's profile photo Hanumath Kanamarlapudi
      Hanumath Kanamarlapudi

      Thanks, Horst Schaude .

      But do you have any other sources to get the information just alone on the requested Method?

      Odata.ReportExecute is the Library and method I am looking for to execute the ODATA API on the ByDesign reports.

       

      I will raise an idea request too.

       

      Regards

      Hanu K

      Author's profile photo Horst Schaude
      Horst Schaude

      Hello Hanu K,

      Maybe Stefan Kiefer can help you.

      Bye,
      .    Horst

      Author's profile photo Hanumath Kanamarlapudi
      Hanumath Kanamarlapudi

      Thanks, Horst.

      Author's profile photo Melvin Hidalgo
      Melvin Hidalgo
      Blog Post Author

      Hanumath, were you able to use that Odata method?

      Author's profile photo Hanumath Kanamarlapudi
      Hanumath Kanamarlapudi

      No, I couldn't.

       

      Hanu

      Author's profile photo Solène ROQUES
      Solène ROQUES

      Dear Melvin, thanks a lot for this amazing post !

      A little advice for beginners like me, if you are trying Melvin's script to send emails, do not forget to add the two following libraries to your absl script :

      import AP.Common.GDT;
      import DocumentServices.Global;
      
      Author's profile photo Jens Niemeyer
      Jens Niemeyer

      Hello,

       

      the last days I did some investigation for an ABSL based dublicate check for my custom BO.

      I found this article (used Platiunum before for E-Mails).

      I can imagine, that the lib "Fuzzy" is related somehow to my dublicated check, BUT

      • I can not find the libary!
      • Code completions does not give my and "fuzzy" path!
      • Which import do a have to use?
      • Where is some documentation on that?

      Any help would be appricated

      Jens