Skip to Content

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);
						

 

Thanks, and Pura Vida.

 

Melvin

 

 

 

To report this post you need to login first.

4 Comments

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

  1. 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

    (0) 
  2. 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

    (1) 
    1. Melvin Hidalgo 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.

       

       

      (0) 
  3. qiang zeng

    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

    (0) 

Leave a Reply