Integration scenarios to consolidated procedures can significantly accelerate the development of automation processes. In the most cases automation approaches already exist in the departments of a company, which have simplified the work of the business experts. In some cases it may be necessary to integrate them when implementing automation in RPA. From this perspective, I have already described different options:
- How to execute C#, VB.NET, JScript or PowerShell seamlessly in Intelligent RPA
- How to execute VBScript seamlessly in Intelligent RPA
- How to extend Intelligent RPA with PowerShell
Here is now another option:
How to execute ABAP seamlessly in Intelligent RPA
To make this possible, I have programmed a COM library called ABAPRunner. This ABAPRunner library offers the possibility to use ABAP code from Intelligent RPA easily. You can code your ABAP report local and ABAPRunner transfers it to an SAP backend system and executes it. ABAPRunner uses the function module RFC_ABAP_INSTALL_AND_RUN to do that.
SAP Intelligent RPA delivers all we need with the installation of the Agent, the SAP NetWeaver RFC library. All we have to do, next to the installation of the ABAPRunner library, is to add the path to the agent to the PATH environment variable.
Download the ABAPRunner COM library and unzip it in a directory of your choice. Edit the path in the file ABAPRunner_Register.reg. After that execute ABAPRunner_Register.reg to add the necessary registry entries. To use the remote enable function module (RFM) RFC_ABAP_INSTALL_AND_RUN you need a lot of authorization objects like S_ADMI_FCD, S_RFCRAIAR, S_TCODE and S_DEVELOP. Be sure that the user have all necessary rights in the backend.
Now we can use ABAP in SAP Intelligent RPA. At first we need a tiny ABAP report, like this:
Report zTest Line-Size 256. Break-Point. Write: 'Hello World from'. Write: sy-sysid.
And with a few lines of code we can use this ABAP report in SAP Intelligent RPA.
Also you can use the hereString function to embed your ABAP code in your JScript. It makes no difference, but it can be useful to have the entire code in one source.
And if you set the ABAP_DEBUG parameter to 1, it opens the ABAP debugger directly from your SAP Intelligent RPA.
You can use this possibilities to…
- Generating test data with all ABAP possiblities
- Execution of non remote enabled function modules
- Check data with SAP Open SQL statements
But never use this method in productive environments. It is for development and test systems only.
As I have shown it is possible to run ABAP with SAP Intelligent RPA. This opens many new opportunities. Adjustments are certainly necessary in individual cases and restrictions have to be accepted, but it is a powerful combination.