Skip to end of metadata
Go to start of metadata

Example Overview

Problem Statement

There are situations when a company has a bunch of invoices with a similar format which they need to post into some external system like SAP. Usually, it takes a lot of time to open each invoice and extract needed information from it and enter it into SAP. This sample shows how to extract both searchable and image-only PDFs using OCR and XPath. 

The difference between searchable and image-only PDFs is that text in searchable PDF documents can be selected, copied, and marked up. So, instead of using OCR, you can open it with the Mozilla Firefox browser and copy required information using XPaths. 

Existing Manual Process
An employee needs to open each PDF manually, copy required information, then log in to SAP, find the MIRO transaction and post the previously copied data into the system, which usually takes about 15 minutes for one invoice.
Automation Solution
Instead of extracting all the required information in invoices manually, the bot scrapes it using optical character recognition in case of image-only PDFs, and XPaths – in searchable PDFs. Then, the bot posts this information to your SAP system.

Example Overview Video

See the video showing how our bot works.

Installation and Getting Started

  1. Extract the sample folder and drop it into your default Workspace in WorkFusion Studio (C:\Users\username\workfusion-workspace\rpae_project).
  2. Open the sample in WorkFusion Studio.
  3. Go to Window > Preferences, expand WorkFusion Studio, and select the Secrets Vault tab.
  4. Press the Add button and enter your secret entry values:
    1. Alias – SAP_creds
    2. Key – your SAP username
    3. Value – your SAP password
  5. Press Apply and Close.
  6. Copy input files from the Invoices folder to any appropriate folder and edit the following variables:
    1. folder_path – the path to the input files with invoices in PDF format

    2. sap_path – the path to saplogon.exe

    3. tax_code – code of the tax in your SAP GUI, which is set here

  7. Set the default zoom level for Adobe Acrobat Reader to 100%
  8. Click on the Play recording button.

Download Example

In this example

2 REUSABLE components

  • Log in to the SAP GUI desktop client
  • Fill in an invoice form and post it in SAP

Preconditions

Install to your PC: 

  • SAP GUI v. 7.40-7.50 connected to the environment
  • WorkFusion Studio (RPA Express)
  • Adobe Acrobat Reader (recommended version 19.012)
  • Mozilla Firefox

Example Workflow

  • No labels