The SAP Leonardo Machine Learning Foundation offers a wide range of ready-to use services, like image and text classification services, that are as easy to consume as a REST API call.
You probably tried them out directly on the SAP API Business Hub or in your SAPUI5 applications. But how about ABAP? What if you could leverage these services in a matter of minutes and start building the Intelligent Enterprise?
This blog will show you how easy it is to consume the SAP Leonardo Machine Learning Foundation services in your ABAP programs.
For each service, code snippets will be provided which can be used to get started and see the first results. So, let’s get started, and see how this works.
All you need is:
- Sign up for a free trial account on SAP Cloud Platform
- Get started with the SAP API Business Hub and explore the SAP Leonardo Machine Learning Foundation – Functional Services.
- Get your ABAP system configured to consume APIs from the SAP API Business Hub.
Check the following blog for more details:
API Business Hub : ABAP code snippet for APIs.
The SAP API Business Hub provides an overview of all SAP Leonardo Machine Learning Foundation services.
You can try them out directly within the SAP API Business Hub console, using a REST client or by making direct API calls from an application developed in the programming language of your choice.
And to do that, you don’t need to be machine learning expert!
Once you have fulfilled the prerequisites, check the following video where the entire development process is explained in less than three minutes.
Now let’s recap what you just learned:
- Create a new ABAP program with an empty report
- Login to the SAP API Business Hub
- Select the Machine Translation service from the SAP Leonardo Machine Learning – Functional Services artifacts
- Get the ABAP code snippet
- Paste the ABAP code into your APAP report.
The code snipped includes the API Endpoint URL, your personal API Key and a hardcoded text in English which will be translated at runtime.
- Activate and run your ABAP program!
That’s it :-).
Of course, you can adapt it to your needs and use other text sources from your ABAP programs.
Thanks for reading and have fun! And feel free to share and provide feedback!