By Katarzyna Brancewicz


SAP is one of the largest Enterprise Resource Planning (ERP) software providers. According to official SAP communication, as of 2022:

  • 99 of the 100 largest companies in the world are SAP customers,
  • 97 of the 100 greenest companies in the world run SAP,
  • 85 of the 100 largest companies use S/4 HANA,
  • SAP customers generate 87% of total global commerce ($46 trillion).

Considering these numbers, it’s easy to assume that SAP is a solution used at your company. Depending on the scale of your business, the SAP-related activities might be more or less automated. Automation is always worth considering, as it might not only save you some precious time, but also free resources that you might use elsewhere.


SAP ERP connector integrated with Microsoft Power Platform is a secure way to automate your SAP processes that is relatively straightforward to set up. In this article, you will learn:

  1. What is SAP connector
  2. Why VBA macros are not recommended
  3. How we used the SAP connector and Power Platform to automate the SAP process


What about SAP scripting?

SAP scripting is often disabled in companies as it is considered to be a breach of security. With SAP scripting enabled, users can not only run macros but record their own, and if it’s not done correctly, they can severely lag or even crash the system trying to get too much data. Moreover, to run SAP macro, you need to have the SAP client installed on your computer and depending on its version, the macro may not work for you. As field IDs change depending on the client, you may also need to have several macros created, which complicates their future maintenance.


How can SAP connector help you?

In 2020 Microsoft officially released the SAP connector for Power Platform that enables:

  • Creating a connection to an SAP ECC or S/4 HANA server using SAP authentication or Windows authentication,
  • Invoking any BAPI and custom RFCs,
  • Dynamically adjusting input and output parameters for RFC or BAPI

Given the popularity of Microsoft solutions, you may already have available licenses and PowerApps or Power Automate flows in your organization. SAP connector is a great way to take your solutions to the next level. Although we want to focus on the business side of its integration, let’s see what was needed from a technical perspective.


Implementation requirements

  1. Setup of Data Gateway to connect Power Platform with SAP on-prem was needed and implemented on Azure VM.
  2. Development of custom RFC function in SAP was performed by the customer’s internal SAP support team and took 5 MD to complete.


Practical use case

Imagine that we have a manual process of approving additional transportation costs. Our analyst needs to download invoices from the SAP system on daily basis, check them manually, contact the carrier for the cost breakdown, chase approvers from different departments for their approval via e-mail or phone, and contact the transportation company in case of any dispute. Finally, after everything is verified and costs are agreed by both sides, post them to SAP manually. This is not only tiresome but also a time-consuming and error-prone process. And this is the case our client needed help with.


To have a better understanding of the process, we can move it to the below, high-level design:


By leveraging Power Platform components, mainly the model-driven apps and Power Automate flows, and their integration with SAP, we could easily improve and standardize the entire process to the point that our analyst (and his backup), previously being a connector between carriers and approvers, becomes obsolete in this process and can fully focus on different activities.


This is what our process looks like after the improvement:


In the described enhanced process we have two activities related to SAP:

  1. Transportation documents download from SAP: downloading the SAP data to work on it further in a standardized way, and
  2. SAP data entry: posting new data to SAP after the approval process has finished.


We used two separate RFC functions used in Power Automate flows to meet our requirements:

Getting needed data

We no longer have to download the data manually or click the button to run a macro. Thanks to Power Automate and the connector, we scheduled a flow that runs frequently, downloads new documents and adds them to our database (in this case, Dataverse). Now, our application is always up-to-date and users can access documents shortly after they have been added to SAP.

With proper access management, business users see only data meant for them and can work on it whenever they want. The manual extract is no longer required and the cost breakdown can be prepared in PowerApps by a carrier anytime. After the specification is ready, the carrier can submit the costs and send them for approval to the proper departments and approvers.


Posting data to SAP

After the approval process is finished and costs are agreed upon, posting to SAP is done automatically. Appropriate SAP fields are being updated and the PowerApps app returns information on whether posting has been successful. Thanks to built-in validations, we ensure the quality of inserted data. With the same function, we can create a check to go through all approved items and in case of any posting failures, it will repost the data to SAP. All the process steps and information about the postings are being tracked and kept the in PowerApps app for auditing purposes.


Thanks to the above flows, we fully eliminated manual extracts and postings to SAP. If we count those in hundreds or thousands each year, we can save lots of time and money. Together with the improvement of the entire approval process with the model-driven app and other flows, we made a huge improvement.


What’s next?

We hope that the above example showed you the possible power of SAP integration. Think of the manual SAP process you currently have in your organization and its potential solution by using SAP connector and Power Platform. It may be a virtual assistant that will help your vendors to find out the invoice payment date, which will reduce the number of queries or maybe MJE or T&E process automation that will post documents for you after the proper and standard approval process is finished.



Read more about implementing Microsoft solutions on our blog:

Automating processes with Microsoft Power Platform

Five Components of a Good Power Platform Support

What is Business Intelligence?