Skip to Content
Product Information
Author's profile photo Martin Slavik

SAP Business One Integration with Document Information Extraction service enhancements

The purpose of this blog is to provide to you a comprehensive information about integration of SAP  Business One with Document Information Extraction service, based on the SAP Business One version 10.0 release 2105.

Document Information Extraction is an existing service (API) from SAP that automatically reads and extracts information from digital document files and scanned documents. The service is to be made available for use with SAP Business One to assist customers by removing the need to manually process documents such as invoices. The basic scenario is following

  1. SAP Business One connects to the Document Information Extraction service through Electronic Document Service and an API.
  2. Document Information Extraction service reads A/P invoices from received PDFs and JPGs before communicating the structured information, in .JSON files, to SAP Business One
  3. The response from the service, including the JSON file, is stored in system database in ECM8 table.
  4. The import process itself is maintained by the Electronic Documents Import Wizard. As a result the A/P invoice drafts are created.

 

  • The service is activated and controlled through settings in Document Settings under a new Document Information Extraction protocol.

 

  • Document Information Extraction is a cloud service that is hosted and operated through SAP Business Technology Platform. Document Information Extraction service is available for purchase separately from SAP Business One licenses.

 

Document Settings

A new tab Doc. Information Extract. is available for Document Settings (follow path Administration → System Initialization → Document Settings) with information and settings dedicated to the Document Information Extraction service:

Document Information Extraction

  • Enable Protocol
  • UAA URL
  • PDF Folder for Extraction: location on server path definition (from a Linux operating system)
  • PDF Folder for Extraction (Windows): location on server (for a Windows operating system) from where the service collects PDFs and sends them to Document Information Extraction service. Related PDFs are to be stored and saved here.
  • Client Secret: based on SAP BTP account
  • Client ID: based on SCP account
  • Service URL

Note: The Following are examples of setup for folders “PDF” that are located on SAP Business One share folder for both Linux and Windows operating systems:

 

Preparing for Document Information Extraction

  • Check that a path is set up for your attachment folder in General Settings (follow path Administration → System Initialization → General Settings → Paths).
  • Add the settings and information described above in Document Settings. In your SAP Business Technology Platform (SBTP) account, open the related Service Key and copy the relevant information to Document Settings in SAP Business One.

Note: As for HANA database there is a need to specify separately the path to the folder with documents for both Windows and Linux.

 

 

Electronic Documents Service

Document Information Extraction Service uses Electronic Documents Service to connect with SAP Business One.

 

 

Electronic Documents Import Wizard

The Electronic Document Import Wizard use in SAP Business One provides the ability to:

  • Connect imported document with base document
  • Visualize imported documents before the creation of drafts
  • Check whether imported documents are correctly recognized

 

The SAP Business One integration with Document Information Extraction service is to work through Electronic Document Import Wizard functionality in all localizations except for Brazil, Argentina, Costa Rica and Guatemala. The Electronic Document Import Wizard provides dedicated functionality for importing electronic documents to the system. For the Document Information Extraction service integration, there is the Document Information Extraction protocol under which relevant documents are imported.

The default incoming mapping determination is available now. The recommended setup includes the relevant document type A/P invoice and the identification of business partner through business partner name or Federal Tax ID as preferred options.

 

Electronic Document Import Wizard Steps

Step 1 of the Electronic Document Import Wizard gives to the user the opportunity to define the rules for the imported document. As it was mentioned earlier the document for the Document Information Extraction protocol are transferred to the system database (to ECM8 table) there is a need to define the parameters for identification of document type and Business Partner. Without these parameters there is not possible in the end of the process to create document draft.

Therefore, there is a need to provide a rule which defines how the system should identify the business partner. By default, there are defined two places – Business Partner Name and Business Partner Tax ID.

It is possible to use the system’s Electronic File Manager file or partner/user can adopt it to the required form and use it. As Data Source for the file system is using XML created out of the JSON provided from Document Information Extraction service

 

Step 2 of the Electronic Document Import Wizard provides information about the initial determination status of the available files for import. It is possible to see the status, and eventually the reason for any error, in the Message column.

In some cases, for example when there is no business partner found in the database, it is possible to correct the information in the respective data. For example, you can make a change in Business Partner Master Data and then through the option You Can Also, you can re-determine the problematic files that are available for import.

It is possible to use the selection criteria that are available in step 2 of the wizard to influence the selection of documents for processing by the wizard.

For example you can see the documents finished with error during the determination process – when system evaluates the documents stored in ECM8 table and checks whether the draft could be created. Such documents can be seen when checkbox Error is checked.

 

Step 3 of the Electronic Documents Import Wizard carries out a match of imported data from the Document Information Extraction service and previews the relevant data before document drafts are created. You can check the original document by selecting the golden arrow next to the Tax ID to compare the identified business partner, items, prices, quantity, and the identified base documents.

System tries to find the related base document. It is, at first, based on the Purchase Order value from the processed file. At second place it tries to identify the open Purchase Order relevant for the same Business Partner, which is matching items from processed document. The first successful match is proposed to the user. User can remove or replace the identified base document, by right-clicking and using the context menu.

When you choose the Operation “Generate”, the system creates a document draft. When selecting “Generate”, it is possible to set this operation for individual rows, not only for the whole document.

 

Step 4 of the Electronic Documents Import Wizard informs you of the status of the created drafts.

 

Completing the Documents 

The created drafts are viewed in the Document Draft Report and the Electronic Documents Monitor. From both locations, it is possible to finish the document from draft.

In the Document Draft Report, there are two new columns eDoc Protocol and Source File Path and Name to identify the protocol used for the import of a particular document as well as the file name/path of the original document.

 

Whats next?  

This is a short summary of possible functionality in SAP Business One. It should help you to understand the process of the integration  and the functionality in detail.  Then together with your customer you can elaborate on the possible approach, considering the number of the documents and possible benefits from using the integration with the SAP AI Business service.

No matter what is your industry it’s undeniable that with the help of AI, specifically the Document information Extraction,  can help you overcome various challenges. I would like to ask you to share your feedback or thoughts in a comment or ask questions in the Q&A tag area here: https://answers.sap.com/tags/01200615320800000816

 

The additional related materials can help you as well:

A video with a description of the overall process can be viewed at the following Web link.

 

Related documentation for the set-up of an account on the SAP Business Technology platform can be viewed at the following Web link.

 

Partners (excluding OEM) who have access to SAP PartnerEdge can view the following recording for more information on AI Business Services: Replay: SAP AI Business Services in SAP Business One

 

 

Assigned Tags

      9 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Taseeb Saeed
      Taseeb Saeed

      Thanks for sharing.

       

      Regards,

      Taseeb Saeed

      Author's profile photo Gerrit Berberich
      Gerrit Berberich

      Thanks for sharing this info.

      How flexible is the config to activate OCR for incoming Orders (to create Sales Order in SAP B1 System)?

      Your scenario describes the process of setting up the AP Invoices.

      Thanks and regards,
      Gerrit Berberich

      Author's profile photo Simona Marincei
      Simona Marincei

      Hi Gerrit, currently we only integrated in B1 the invoice scanning scenario. However we are preparing the release of couple of side-by-side bot automations for B1 using SAP Process Automation which is incorporating Document Information Extraction (DOX) which will cover some additional business scenarios like Sales Order creation based on customer Purchase Order scanning or Proof of Delivery upload on the Delivery Note and Invoice. Also these bots will be delivered as best practices templates which will allow our customers and partners to enhance and customize them to their needs or just use them as an example to define their own scanning scenarios. More then that the integrated DOX from SPA will give access to "scanning" templates which can be defined by the users so they will not be limited only to the pretrained models. BTW: soon we will have an OpenSAP course on this, so stay tuned.

      Author's profile photo Gerrit Berberich
      Gerrit Berberich

      Hi Simona,
      thanks for your quick reply. This sounds very interesting!
      As we have already the business demands and start soon the evaluation of different OCR solutions we would like to consider also SAP BTP and B1 scenario packages.
      Can you already estimate when we can expect those releases especially the SO (based on PO) creation?
      I think we could also combine in all cases an "approval workflow" by SAP BTP functionality before posting e.g. document drafts to the SAP B1 System?
      Can you please also share more info about the "OpenSAP course"? Where you will announce it (as we are no direct partner). We are quite interested and would also like to share this info in our DSAG group "SAP B1 im Konzern".
      Thanks,
      Gerrit

      Author's profile photo Limited Support User BRAIN
      Limited Support User BRAIN

      Hi Martin

      We're trying to import invoices from xml files using the Electronic Document Import Wizard

      We choose files with the "Upload Files" button, but the wizard gets stuck while trying to reach the webservice

      Is possible to use this wizard only with uploaded file, avoiding the webservice?

      thanks

      Nicola

      Author's profile photo Martin Slavik
      Martin Slavik
      Blog Post Author

      Hello Nicola,

      yes, it is possible. The question is how you use the import scenario, do you use B1i scenario package to download the data from intermediary?

      Regards,

      Martin Slavik

      SAP SME Product Management

      Author's profile photo Limited Support User BRAIN
      Limited Support User BRAIN

      Hi Martin

      thanks for your fast reply!

      do you use B1i scenario package to download the data from intermediary?

      We use B1i scenarios (edocWS / edocWS-FPA / ABLTCH) and EDS to upload data to intermediary

      but we'd like to import manually xml file with the wizard (and not get in touch with the intermediary)

      How can we manage this?

      regards

      Nicola

      Author's profile photo Sanjay Agarwal
      Sanjay Agarwal

      Hi Martin,

      It was great to know that SAP Business One is developing capabilities.

      My organization operates in the FMCG (CPG) segment which is very dynamic and demands faster deployments of solutions. These functionalities have become a need for us. The challenge I am facing in Kolkata, India is support from SAP Business One Partners to implement these for us. The turnaround time is long and they believe in bringing all solutions through ADD-ONs. As a result our system has become complicated and heavy.

      There is a general feeling that SAP Business one can no longer serve our purpose.

      It is sad that in spite of continuous development , SAP B1 support is not up the mark in India.

      Thanks & Regards

      Sanjay.

      Author's profile photo Simona Marincei
      Simona Marincei

      Hi Sanjay, I'm sorry to hear you have trouble implementing the invoice scanning functionality for B1, but it's hard to understand what your problem is and why would your OnPrem system get slower when the full scanning process happens in parallel in Cloud and just pass back the information in a draft invoice (from load pov that is similar as you would create them by hand). Also the implementation of this feature is minimal (as explained by my colleagues in this blog we provide a connector from B1 to the DOX service and the service itself is to be installed with a click through booster). I can't comment on why your partner is unable or unwilling to help you but if you open a ticket I'm sure we can help you. Have you (or your partner) opened a ticket for this issue? Note: here is the list of supported languages and countries. As you may see we support the scanning format for India (including QR) but only in English language. Is that good enough for your company?