Programming

Utilizing Artifacts with SAP API Business Hub

The SAP API Business Hub is a public portal that collects integration scenarios ready for use with an SAP Cloud Platform instance.

 

The portal is publicly available and can be accessed at https://api.sap.com/. Alternatively, the SAP API Business Hub also reachable from the Discover section of the API Portal.

 

SAP API Business Hub
 
Several different artifacts are available in the SAP API Business Hub: APIs, iFlows, policies, and many others developed and maintained by SAP and selected partners. All this content is provided with documentation, and these artifacts are ready to be imported into your SAP Cloud Platform instance.
 

Finding Artifacts

For example, into your SAP Cloud Platform Integration service, you can import best practice examples from the SAP API Business Hub. From your integration tenant, select the Discover section, shown in the next figure, and browse for the content you want to import into your system. In this case, we searched for the “Cloud Integration – Exemplars,” which contains a collection of simple iFlow best practices.

 

Cloud Integration - Exemplars

 

The package content has information related to the different artifacts, including:

  • Overview: a quick description of the package content
  • Artifacts: the development objects included
  • Documents: the documentation of the artifacts and the installation guides
  • Tags: that are used by the search engine to retrieve the results
  • Ratings: that collect all the community ratings relative to this package

Downloading Artifacts

Search for and select CSV to XML Converter artifacts. Each artifact has an action button on its right side that allows you to see technical information about the iFlow and to download the actual development object as a zip file, as shown here:

 

CSV to EML Converter

 

Importing Artifacts

After you download the artifact, you can import the artifact via our integration package in the SAP Cloud Platform Integration service. From the design page, create a new package called “Best Practices” and proceed with the creation of a new iFlow. During the creation, instead of selecting Create, select Import. Find and select the zip file that you just downloaded from the SAP API Business Hub, as shown here:

 

Importing Artifacts

 

The iFlow is now ready for use, but you still need to configure a few parameters to integrate the iFlow with your environment, as shown below. In this specific case, the iFlow requires the configuration of the email SMTP server used to send the converted CSV data.

 

Integrating iFlow

 

Conclusion

The artifact is now ready for deployment. The iFlow can be triggered with a timer trigger that runs once, when the iFlow is successfully deployed. As shown below, the output of the iFlow with XML content is the body of the email.

 

CSV Converted to XML

 

Editor’s note: This post has been adapted from a section of the book SAP Cloud Platform Certification Guide by Ivan Femia.

Recommendation

SAP Cloud Platform Certification Guide: Development Associate Exam
SAP Cloud Platform Certification Guide: Development Associate Exam

Developers! Make the grade with this SAP Cloud Platform certification study guide. From application development and integration to mobile services and the Internet of Things, this guide will review the key technical and functional knowledge you need to pass with flying colors. Explore test methodology, key concepts for each topic area, and practice questions and answers to solidify your knowledge. Your path to SAP Cloud Platform certification begins here!

Learn More
SAP PRESS
by SAP PRESS

SAP PRESS is the world's leading SAP publisher, with books on ABAP, SAP S/4HANA, SAP C/4HANA, intelligent technologies, SAP Cloud Platform, and more!

Comments