Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
johannes_huhn
Product and Topic Expert
Product and Topic Expert
5,478




Introduction

SAP Analytics Cloud's product offering includes robust integration capabilities, adding significant value to align plans with operational enterprise applications and business objectives. Currently, SAP Analytics Cloud offers various features, functions, APIs, and data management capabilities to facilitate seamless integrations.

Excitingly, with the introduction of QRC1 2024, we are expanding our offerings to include SAP Analytics Cloud Calendar APIs. This enhancement is designed to elevate planning processes and workflows beyond the scope of SAP Analytics Cloud. The new Calendar APIs empower users to embed SAP Analytics Cloud calendar processes within cross-system workflows. This advancement allows for a fully automated end-to-end experience in planning processes. Explore the possibilities of increased efficiency and streamlined workflows with SAP Analytics Cloud Calendar APIs.



Example

The video below demonstrates a sample scenario showing the integration between SAP Analytics Cloud and SAP S/4HANA along an overarching workflow managed by SAP Build Process Automation. Specifically, SAP Build Process Automation initiates the calendar process using the provided SAP Analytics Cloud Calendar APIs. This action triggers the activation of the planning period in SAP Analytics Cloud, enabling the planning activities to take place within the SAP Analytics Cloud environment. Once the planning period is over (in terms of the calendar process has been completed & successfully closed), the SAP Build Process Automation process can move on.



It's important to note that while SAP Analytics Cloud Calendar APIs are accessible for any third-party consumer, our demonstration focuses on showcasing this feature in conjunction with SAP Build Process Automation. This tool offers a user-friendly, low-code/no-code approach for efficiently managing APIs, steering SAP Analytics Cloud calendar processes with ease.



Let's build together!

1. Create a calendar process in SAP Analytics Cloud that should be steered by API’s. You might want to use the wizard to create multiple events at once along a hierarchy, see here. In the figure below we can see the setup calendar process to plan operational expenses in SAP Analytics Cloud. Make sure to allow external access as shown in figure two.

Figure 1: OPEX calendar process in SAP Analytics CloudFigure 2: Allow External API Access


2. Now, we must setup the connection between SAP Build Process Automation and SAP Analytics Cloud. This is necessary to let SAP Build Process Automation call calendar process APIs.
This requires to setup a new OAuth Client in SAP Analytics Cloud. Navigate to System -> Administration -> App Integration  to create a new OAuth client Make sure to allow permission of calendar events like shown below


Figure 3: OAuth client in SAP Analytics Cloud


Once we have the OAuth client ready, a new BTP destination can be setup to communicate between SAP Build Process Automation and SAP Analytics Cloud. To create a new destination you might follow this tutorial: For reference, we added a sample working configuration in the figure below

Figure 4: BTP destination required for SAP Build Process Automation


3. Once we have setup the connection, we can start embedding SAP Analytics Cloud calendar APIs into SAP Build Process Automation via Actions. In order to achieve this, it is required to download the meta-data description file from the Business Accelerator Hub (SAC calendar API). When creating a new Action in SAP Build Process Automation, the meta-data file has to be uploaded as the action API specification.
Once done and imported, make sure to enable the CSRF token feature. Feel free to use the action editor with the connection in step two to get familiar with the calendar API endpoints and its capabilities.
Ultimately, make sure to release and deploy the action.

Figure 5: SAP Analytics Cloud Calendar API in Business Accelerator Hub
Figure 6: Action Editor in SAP Build Process Automation


 

4. After making the Action available, one can start creating a new SAP Build Process Automation Process to use the previously set up Action. By creating the new process one can add requests of the Action. To make the scenario work, it is recommended to copy the calendar process and activate it. This can be achieved by setting the right parameters. Moreover, we can model a loop to periodically check the status of the calendar process. For instance, once per minute we can check the calendar process status. If it did not reach the state of successful (this means the planning period in SAP Analytics Cloud is not yet over) the process in SAP Build Process Automation waits.


Figure 7: SAP Build Process Automation process


In summary, the presented scenario has been intentionally kept minimal for demonstration purposes. In practical use, one can enhance it further. For instance, consider implementing a notification to alert the administrator in case the calendar process is cancelled. Additionally, you can incorporate additional steps, such as adding a multi-action to import the latest actuals from SAP S/4HANA, as demonstrated in the example video.