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 Wilco Menge
Thanks, and Pura Vida.