Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Showing results for 
Search instead for 
Did you mean: 
Active Contributor
Business Process Automation is one of the trending skills then ever before and many wonderful tools like SAP intelligent RPA,UiPath, Automation Anywhere etc.,  are there to help you automate the repeated business processes with no value add and eats up a lot of time.

I have been exploring SAP intelligent RPA for last few months and still learning. In my last blog, "SAP Intelligent RPA Trial – Get Ready to build Bots…" , I explained the system setup to get ready to build bots using SAP intelligent RPA. I am glad that you guys found it useful.

SAP has provided repository of pre-built bots ( and is growing continuously) and it includes Bots for JE posting using Fiori application "Upload General Journal Entries (F2548)"  automation and another one using SOAP API . But frankly speaking, i found it quite complicated to make the pre-built bots run in your system.

In this blog, we are going to see another approach to post Journal Entries (JE) using RFC "BAPI_ACC_DOCUMENT_POST" call from SAP intelligent RPA.




  • Journal Entries to be uploaded will be available in standard upload excel template and user receives the file as email attachment.

  • Bot1 is supposed to search email and save the upload file in required folder.

  • Bot is supposed to read the entries from the excel and post them in SAP and update the BAPI response message in the upload excel and

  • send the updated excel back to user over email.


The Bot workflow in this case is very simple, just one step, as posting is done via BAPI call and no screens to be recorded. So, i have just kept one step name to read Data from the template and all the processing is happening in the step (not the best approach but intention was to make it work ;-)). You, can split it into multiple steps also to make it look cleaner.

Let's see now, what is done inside this single step defined.

Note: Don't forget to activate the excel and outlook libraries to uses the same in your project.

Bot1- This is simple bot to search the email based on selection criteria, could be subject or Attachment name , sender or combination of multiple and saves the attached upload file to the system. Please check this nice blog  SAP Intelligent RPA: Save Attachments from emails   from dianamatache to see how to achieve Bot1 functionality.

Bot2- This will ready the upload file and upload in SAP and will prepare the result file and share the same with user over email.Lets see how Bot2 works and the steps involved.

Step 1 - Read the data from the Excel template using excel library methods and store the same in context variables . In this a case, i am storing the same in scenario local data variables.

As there will be more then one documents to be post , we need to read the each entry details in a loop as shown below.

Step 2 -  Set up the connection with the SAP system in which we are going to call RFC.

Step 3 - Add the BAPI to be called to the connection instance

Step 4 - Populate the RFC Header ad details structures as required with the data read from the excel


Step 5 - Call the BAPI and get the response.

Step 6 - Read the response messages and update the same in upload excel. I kept the message as is for this example, but we can format it better as needed.

Step 7 - Once all the entries from the excel are processed, save the excel and send the same as email attachment to the user.


With the, we have seen how we can use RFC calls to automate business process using SAP iRPA.

Note: Benefit of using RFC over Fiori app automation is that  RFC execution can be unattended, that can run in background. But in case of Fiori app, file selection step needs active screen session and make it to be an attended process. 

Another benefit is, no screen in RFC, which usually can cause timeout issues in Fiori app case if not handled properly or if the network is slow.

Watch the demo here


Keep Learning & Keep Sharing!!
Labels in this area