You are on page 1of 21

Community

Ask a Question Write a Blog Post Login

Technical Articles

Ajeya H L
March 17, 2021
| 5 minute read

SAP RPA 2.0: No Code – Low Code Project Demo for PDF
Data Extraction Using Conditions and Loops
 4  20  4,908
Follow

 Like
Introduction:
We are going to see how SAP Intelligent RPA can help simplify invoice consolidation process using simple steps. We will start from
creating a project, building the RPA and even Testing it successfully.
 RSS Feed
For the demo, we are considering a use case of any business receiving multiple invoices over email, the process to consolidate into a single
sheet to verify / review being a very tedious and time-consuming task sometimes leading to human errors as well. We are going to see the
ease of use for complex functions like PDF read, Value Lookups etc., along with usage of loops, conditional statements in the workflow to
show codeless consumption experience that SAP Intelligent RPA provides.
This framework can be used to build and test rapid prototypes. Any data from any number of PDF files can be processed within minutes
from creating a project, building the RPA with easy, very readable configuration steps and test it to see results.

We can also see all the different options like the process, the web capture and automations that are available to us as a centrally accessible
bundle from SAP Intelligent RPA 2.0.

PDF is one the most used formats by many individuals and organizations to exchange information. It is widely used to create business
related documents and therefore plays an important part in most process automations

Intelligent RPA 2.0 introduced PDF SDK which allows you to extract data from the documents with the help of user-friendly and
convenient activities. It’s part of the Cloud Studio and can extract text from machine readable/generated PDF’s.

As part of the SAP Community, Do participate in the SAP Intelligent RPA Tutorials Challenge 2021 (reference link: SAP IRPA Tutorials
Challenge 2021) to share more and learn more!

Overview:
At the start “Get File Collection” returns all the files in a specified folder path then a “foreach” loop is applied to execute set of commands
until every File from “Get file Collection” is processed for required data.

Inside the loop for the first file in the folder collection we use “Open PDF” to open an instance of PDF document then “Search Text Items”
to search text items that matches the search string and returns the position of the string, if match is not found 0 value is returned, if matches
is found values is extracted from that opened PDF else the PDF instance is closed and released

For fetching “Order Id” and “Grand Total” we use “Get Text After” step which will retrieve multiple words after the given search string by
using “numWords” parameter which gets number of words that is entered by the user after the search string is found in the document.

This process continues for every file in the folder collection then the process ends getting us the required information from the documents.

The final automation workflow:


 

First Step: Project and Package

We will create a New Project and we generate a Package from the project

. Create a New Project


 

The SAP Intelligent RPA Core SDK is required. So make sure this package is added to your project. If the Core SDK package is not
available on your tenant, you can acquire it from the Store

. Next Step: Select Dependencies – Manage Dependency and Add Dependency


 

. After Adding the Dependencies will get the packages List shown in the below image

.  Next Step is Automation – Select Create – Automation

. The Configure agent version is displayed – select your latest version and Confirm
 

. Next step we will get the below screen and next we will drag and drop the required activities
 

Sample Document

. First Step in Automation – Drag and drop the “Get File Collection” from the Activities and give the    Folder path in which the PDF is
save to the input parameters
 

. Next step in Automation – Drag and drop the “For Each” from the Activities. Inside the Loop Open PDF to open an instance of PDF
Document which open each file in the given folder.
 

. Next step in Automation – Drag and drop the “Search Text items (PDF)”. Give the search string value in the input parameters, to search
text items in that PDF which returns the position of the string in the document.
 

. Next step in Automation – Drag and drop the “Condition” from the Activities. According to Condition Expression “Step4.textitems.
length! =0” if expression is true then it executes the “Get Text After” workflow else it displays Message saying invalid document.
 

. Next step in Automation – Drag and drop the “Get Text After (PDF)” from the Activities and give the search string value in the input
parameters and also give the number of words to get from the PDF document in “numWords”  and same as the next Get Text After(PDF).
 

. Next step in Automation – Drag and drop the “Open Message Dialog” from the Activities is used to Display the Message
. Last step in Automation – Drag and drop the “Close and Release PDF” from the Activities  
 

. Final Results of this Automation

Link to the running bot with details


Canarys | No code - Low code project demo for PDF Data Extraction

Link to the running bot in simplified version 


Canarys | No code - Low code project demo on SAP Cloud Studio

Conclusion:
We can extract the data that we are displaying on screen to multiple options like an excel spreadsheet or directly to an email etc., very easily
using the SAP intelligent RPA bundle of features with codeless experience.

With this blog post, the intention is to get customers, business managers and RPA developers into thinking about using SAP Intelligent RPA
2.0 into various automation opportunities by showcasing the simple steps required to achieve great results. Also, to start the conversation
about utilizing the various options available within SAP Intelligent RPA 2.0 to make these scenarios a reality.

This automation will benefit the roles business Process Lead, Business Process Analyst, Business Process SME, Process Executioner.

I hope you found this tutorial helpful. Please provide feedback in the comment section and feel free to ask any questions in the SAP
Intelligent RPA Q&A area (link for reference: https://answers.sap.com/tags/73554900100800002142)

 
 

Alert Moderator

Assigned Tags

SAP Intelligent Robotic Process Automation

Conditions and Loops

Low / No Code Development

No Code - Low Code

PDF Data Extraction

SAP Intelligent RPA 2.0

SAPRPA2.0_TutorialChallenge2021
Similar Blog Posts 
SAP Intelligent Robotic Process Automation 2.0: Best Practices Series
By
Peter Engel Dec 15, 2020

“No code” with SAP Intelligent RPA 2.0 Part II


By
Alexis NAIBO Sep 21, 2020

RPA Challenge with SAP Intelligent RPA 2.0 : build it in one hour, run it in one second!
By
Christophe PUGET Oct 07, 2020

Related Questions 
How to use SAP Intelligent RPA 2.0 call API
By
Joanna Qiu Mar 18, 2021

Extract code built on RPA 2.0 Cloud version to be used on Desktop Agent
By
Izni Ismail Jan 26, 2022

SAP IRPA 2.0 not available for partner license


By
Lars Heppner Dec 07, 2020

4 Comments
You must be Logged on to comment or reply to a post.

Chirihan CHERGUI
March 22, 2021 at 9:43 am

Thanks Ajeya! great blog!

Like 1 | Share

Michelle Crapo
March 23, 2021 at 11:52 am

I really like a blog with a great "how to do it" not just you can do it.  Nice job.

What I wonder when I look at something pulling in a PDF is can it be done easier?   I am in a very small IT group.   So when we look at something like
third party PDFs.  It's so much easier to bring in a company to do it.   There are several really good ones out there.

My point is simple.  I love this blog for step by step, and perhaps a smaller integration.  But I would also explore other available options.  There
companies out there that offer a service when it comes to PDFs.  Some of them even have "SAP" in their name. 

Like 2 | Share

Nikhil Bansal
May 10, 2021 at 4:31 am

Hi Ajeya,

Thanks for the article, it was helpful.


In case as per the sample pdf we have to read line items, then how are you going to achieve that?

In your sample - line item has just 1 line, but it could vary (3, 5, 7 etc.). It also, could go to next page in the PDF.

Have you tried this use case? Can you please share more details on this?

Regards,

Nikhil

Like 0 | Share

arghadip kar
May 11, 2021 at 3:30 am

Nice Blog. I would prefer use Machine Learning process for Data Extraction to extract data. Please build one with this process.

Thanks

Arghadip

Like 0 | Share

Find us on
Privacy Terms of Use

Legal Disclosure Copyright

Trademark

Newsletter Support

You might also like