Integrating SAP with low-code
Integrating SAP with low-code
Group subsidiaries regularly transfer posting files from their local IT systems to a group SAP system for consolidation. These are often text files with payroll or travel expense balances from local HR solutions such as ADP, SuccessFactors, Loga, Peoplesoft, Sage or DATEV. In many cases, this degenerates into a stress factor for the department and IT. How can this requirement be resolved within minutes without driving the integration team up the wall?
Concrete example: Two subsidiaries of a logistics service provider are faced with the same task. One has to transfer its payroll balances including posting documents in a ZIP file. The other has to transfer both payroll and travel expense balances, but must first rename the posting files because the upstream system cannot name them according to the group specifications - an import would therefore fail. In principle, such tasks can be solved in several ways. Linux bash scripts or Windows Powershell scripts are one traditional way; self-developed Python or JavaScript programs are another. An enterprise architect might also think of the Enterprise Service Bus; an HR employee might - with horror - think of a manual solution with WinSCP or file sharing tools such as FileZilla. All of these approaches lack speed, simplicity and, above all, easy maintainability with meaningful monitoring in the event of an error; numerous preparatory tasks and IT systems are required before a transfer can be considered. The more services see the light of day, the less effort is required for integration and automation - even for straightforward processes such as this one.
Workato handles such tasks with ease and at enterprise level. Designed as a low-code integration and automation platform (iPaaS MQ), it only takes a technically interested user a few minutes.
Workato also offers ready-to-use connectors to SAP in its "Recipes", as the integration processes are called, which are based on the "Trigger-Action" pattern. However, many companies are not allowed to use these for security reasons: The transfer between two systems must therefore be able to be decoupled (asynchronous).
In this case, this means a transfer between two SFTP gateways from which the SAP booking files are to be retrieved or to which they are to be transferred.
SFTP to SFTP transfer
A recipe is a sequence of automation steps that you can "click together" yourself. It always starts with a trigger event. In our case, this is the storage of a new SAP posting file by the local HR system on an FTP server of the subsidiary.
According to our request, Workato checks every 5 minutes whether a new file has been stored there. If so, Workato downloads the file (SFTP Download Action) and immediately uploads it to the Group's file transfer gateway (SFTP Upload Action). If the file needs to be renamed according to the naming convention specified by the group, this is done directly during the upload; this is the case for one of the subsidiaries considered here, which is why we show this step explicitly.
Of course, the booking file could be parsed, changed or partially processed in other systems beforehand.
However, this is not necessary here. For individual editing steps such as the desired renaming of the file, Workato offers a sophisticated formula editor similar to Microsoft Excel, in which data can be manipulated programmatically. The formula language used is the intuitive Ruby. JavaScript is also in preparation.
Done! Three steps are necessary for the transfer to SAP. That's all. Fits perfectly on a screenshot.
Step by step to a simple and reliable solution
Let's go into detail: The source SFTP server and the target SFTP server are defined in the "Connections". Enter the user name, password (or fingerprint to avoid man-in-the-middle attacks) and IP address or URL; that's all. These are usually obtained from the management of both systems (local IT, group SAP).
"Trigger event" remains "New/updated file in directory", the "Trigger-poll interval" remains empty - 5-minute intervals are used by default - and the "Directory" is selected as the directory in which the new SAP posting files are stored by the source system. Optionally, trigger conditions can also be specified. These are conditions such as certain character strings in the name of the file to be transferred. These are checked before the trigger is even activated. They represent a powerful selection option to ensure that only relevant cases are executed. However, none of this is necessary here.
If the trigger is now triggered by storing a file on the source SFTP server, the file is downloaded in the second step. It is important that the "File path" is set correctly.
The complete path to the file including all folders from the root directory must be entered.
In Workato, we can simply use the "File path" element from the trigger (step 1).
Workato calls these elements "datapills". Datapills are the "magic" in Workato, as they make all possible contents of a step usable in later steps.
We can compare them with variables or objects that can be accessed and changed anywhere; they can be used simply by dragging and dropping.
Last but not least, the booking file is uploaded to the target SFTP server, in our case the Group's file transfer gateway. The entire path including all higher-level directories within which the booking file is located (here "SAP/") must again be specified as the "File name". The datapill from step 2 is used as the "File contents". It is important that the file name is created in accordance with the naming convention of the group.
With the help of simple Ruby formulas, which are described in detail in the Workato documentation, this is child's play. That's it! That's how easy it is to exchange files between two SFTP servers securely and with high performance using Workato. But as we all know, brevity is the spice of life. The best thing is: I don't have to worry about the operation and further development of the infrastructure, connectors and security. As Software-as-a-Service, Workato takes care of that all by itself. My focus can remain entirely on the functional solution - without having to deal with boilerplate code and the configuration of many subsystems.
In another article, we will present the monitoring of recipes like the one above and self-healing in the event of an error using watch-dog processes. Although Workato offers a powerful logging option including a dashboard and API for seamless integration into monitoring systems such as Datadog or Splunk, we want to use a few tricks so that you can sleep soundly even in the event of a problem. After all, an SFTP connection may be temporarily unavailable, even though the month-end closing is pressing ...
About Business Automatica GmbH:
Business Automatica reduces process costs by automating manual activities, increases the quality of data exchange in complex system architectures and connects on-premise systems with modern cloud and SaaS architectures.