Skip to Content
Technical Articles
Author's profile photo Ashok Kumar M

Automate invoice extraction and posting to SAP S/4HANA Cloud using SAP BTP Digital Process Automation suite (SAP Intelligent RPA 2.0 & Workflow Management)

Manual invoice posting to SAP S/4HANA is an inefficient process. It is often effort intensive, repetitive and human error prone. Also there is usually high TCO to scale up to meet growing business needs.

Using SAP Intelligent RPA 2.0 based automation bot, invoice processing throughput and accuracy can be greatly increased. SAP Intelligent RPA 2.0 provides native SDKs for PDF, Outlook, Excel etc., using which different type of invoices can be processed in a low code/no code approach. RPA bots provide 24×7 operation and most importantly its core capabilities are continuously enhanced so it can be applied to tackle varying automation needs.

So, to showcase how SAP Business Technology Platform Extension Suite -> Digital Process Automation services like SAP Intelligent RPA 2.0 and Workflow Management can be used to automate and boost process efficiency of SAP S/4HANA invoice posting, we have created a new mission Automate Invoice Extraction from Emails and Posting them to S/4HANA in SAP Discovery Center for developers and RPA enthusiasts to easily implement this use case in a guided approach.

For those who are not familiar with SAP Discovery Center Missions:

Missions include best practices and step-by-step guidance for implementing business use cases, with well-established support from the community and mission experts, free of cost.

Once you start a mission, you create your own instance of this mission. This allows you to adapt and customize the content according to your specific needs, to invite your team members to work on the whole mission or on specific steps, and to interact with the mission coaches directly. See Getting Started with Discovery Center Missions.

Every mission contains a project board that allows you to:

  1. Get an overview of all the potential deliverables for a mission, whether it is onboarding or implementation.
  2. View fully customizable tasks that are listed as cards and categorized into phases (columns).
  3. We realize that each of your mission can be unique, this board supports that.
  4. Collaborate with your coaches.

Once you learn who your coaches are, you can contact them by adding a comment in the task by tagging them @<coach_name> and they will receive a direct message and should respond to you within a short period of time (depending on their working time zone).

  1. Align your mission with the experts.
    1. Both you and your coaches will keep track of the progress by completing each task.
    2. When working on one task Pin (the current) Card.
    3. Once a task is completed Mark (the card) as completed.
  2. Keep mission assets all in one place.


Use Case:

+ scan for emails with invoice attachments received in Microsoft Outlook
+ apply AI capability to extract information from invoice using SAP Intelligent RPA 2.0 PDF SDK
+ based on document extraction accuracy (confidence score) for each field of invoice, using SAP BTP Business Rules decide SAP S/4HANA posting mode i.e., Automatic or Manual approval-based
+ If the extraction accuracy is above set threshold, SAP Intelligent RPA 2.0 to automatically post extracted invoice to SAP S/4HANA and also add the invoice as an attachment
+ If the extraction accuracy is below set threshold, SAP Intelligent RPA 2.0 to trigger a manual approval process by creating a workflow task with extracted invoice info and invoice attachment for human processor to review and post invoice or reject


Process Flow – SAP S/4HANA Invoice Posting using SAP Intelligent RPA 2.0


Architecture – SAP S/4HANA Cloud Invoice Posting using SAP Intelligent RPA 2.0

The Project Board of this mission contain various cards that help you with set up of SAP BTP and relevant services (SAP Business Application Studio, SAP Intelligent Robotic Process Automation and SAP Work Flow Management) needed to complete this mission.


Discovery Center Mission Project Board

All the cards contain detailed step-by-step instructions and screenshots to guide you to complete the mission successfully.

cards with step-by-step- instructions and screenshots

Should you have questions/comments you can use the ‘Support’ tab of the mission to reach out to mission experts and we will be happy to guide you.

For reference, all the artifacts relevant for this mission can be accessed in GitHub.

Happy Coding 🙂

Ashok Kumar M, Archit Goel, Robby Manis

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Rivert Torres
      Rivert Torres

      great blog, Im following  step by step the mission...  I'll let you know my progress....

      Author's profile photo Shaid Greeff
      Shaid Greeff

      Is there an OCR engine as part of this solution  ?

      Author's profile photo Ashok Kumar M
      Ashok Kumar M
      Blog Post Author

      yes, its part of the SAP Intelligent RPA service.

      Author's profile photo Rogier Clarisse
      Rogier Clarisse

      Hi Ashok!

      I am trying automated invoice extraction with IRPA and have been getting the following error after running the desktop agent to process the invoice:

      (Could not upload document for information extraction: 400 "Invalid client ID(s). The provided client ID(s) does/do not exist.").

      I have tried re-subscribing to the SAP IRPA Application and all other applications in the process, made a new trial account and repeated the steps etc. and still get the same error. Of course I have also checked the client id's that I put in my JSON file, they are correct. Do you have any solution or reason for what causes this?

      Kind regards


      Author's profile photo Sumaira Rauf
      Sumaira Rauf

      There are certain tasks which are not for trial system such as communication configuration etc. I have skipped those tasks (As I am using trial version) so I am not able to achieve the target requirement, is there any way I could regenerate the same scenario with Trial version.?

      Author's profile photo Ashok Kumar M
      Ashok Kumar M
      Blog Post Author

      If the 'trial' you're referring to is S/4HANA Cloud then 'No'. The same is mentioned in the mission as well.


      S/4HANA Cloud pre-requisites


      Author's profile photo Ahamed Kalikul Jaman
      Ahamed Kalikul Jaman

      Hello All,

      Is there any API available to post the parked document which can be used in BTP Workflow?



      Author's profile photo Bhosale Swarika
      Bhosale Swarika

      What is the maximum number of invoices o the same format you can post in a day per bot?