hellostream 7 - afsug.com · about eric kreft eric kreft ca(sa), senior manager applications at...

30
hellostream 7

Upload: others

Post on 06-Apr-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

hellostream 7

Page 2: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

hello Eric Kreft & Pieter ConradiePython Imaging and OCR with SAP ERP - Fact or Fiction

AfriSam South Africa

Page 3: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

About Eric KreftEric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products literally from A(Afaria) to Z(Z transactions) across multiple business units, countries and modules.

My passion is to keep things simple and sustainable and use SAP in it’s natural “environment” to the greatest extent possible.

Page 4: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

the problem

Approximately 3000 deliveries per day

POD (Proof of Delivery) signed by customer required

Lots of paper documents to be scanned and matched

to SAP delivery note in SAP

Page 5: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

existing solution

Third party software to process scanned documents

Scanned document linked to SAP using RFC and SAP archivelink

functionality from the software

Users use software to handle errors related to documents not being

linked automatically in software

Volumes that required manual intervention quite high

Cost of licence linked to image pages scanned

Page 6: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

the options

Keep existing software solution, major cost implication due

to license model and processing backlog keeps growing

Find another solution, but needs to be Simple, Sustainable

and “Part of SAP” !!

Page 7: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

the solution

Python !!! – But Why ? Lots of packages to do just about anything (https://pypi.org)

Runs on existing infrastructure (SAP TREX is python based)

No impact on existing hardware (Used the TREX server)

Minimal additional packages needed (Some additional packages loaded to standard SUSE SAP Install)

Clean integration into SAP using SAP NW RFC SDK (PyRFC)

Has the latest OCR options – Tesseract (Google) with neural networks, open source and supported by

Google

Page 8: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

the features

SAP ERP owns the process !!

SAP “BOT” to run the process

“automatically”

Page 9: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

manual work

Image quality as scanned at plant locations

OCR is not the human eye !!

Page 10: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

process efficiency

How to handle approx. 30 – 40 % of manual images – 900 per day

Simple transaction for user, “BOT” does the rest

Full size

Cropped “OCR” image

Manual entry transaction

Page 11: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

lessons

OCR is not an exact science !!!

Image quality always an issue

Provide for manual intervention – but must be efficient

Build your own “BOT” in SAP

There must be an owner

Pilot with iterations

Be open to latest tech – SAP with Python?

Keep it SIMPLE.. – sometimes use ‘IBM’ !

Page 12: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

interesting info

https://stackabuse.com/pytesseract-simple-python-optical-character-recognition/

https://github.com/SAP/PyRFC

https://pypi.org/

Page 13: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

About Pieter ConradiePieter is a Business Applications Consultant with more than 22 years’ experience in the SAP environment. Pieter is SAP certified in both Materials Management Module as well as the Business Warehouse Application. He cut his teeth in the Plant Maintenance environment and is a self-taught ABAP programmer, developing numerous custom applications and solutions whilst employed with AfriSam. He is an avid DIYer and this passion spills over into providing solutions to the Afrisamcommunity. Pieter is currently working on a delivery execution monitoring system in the outbound logistics space, with a focus on improving on time delivery to the AfriSam customers.

Page 14: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

the end goal

Link vendor invoice images to

SAP Invoice Document

The experiences with 3rd party

provided scanning solutions

Cost effective solution for

subsidiary companies

Page 15: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

the road to success

Provide functionality to load files into

application server file system

OCR tool to split files into individual pages

Perform OCR

Save result to database for processing

Page 16: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

the road block

Complex documents can

generate numerous lines of text

At face value, making sense of

extracted data perceived to be

challenging

Page 17: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

the shortcut

Regex (Regular Expressions)

SAP’s DEMO_REGEX_TOY

Extract meaningful data to

identify supplier

Page 18: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

the direction markers along the road

OCR at times not accurate

when extracting data within

complex invoices

Extracting document parts

proved accuracy could be

enhanced

Introduce cropping functionality

Regex ruleset developed

Page 19: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

the direction markers along the road

OCR at times not accurate

when extracting data within

complex invoices

Extracting document parts

proved accuracy could be

enhanced

Introduce cropping functionality

Regex ruleset developed

Page 20: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

the direction markers along the road

OCR at times not accurate when

extracting data within complex

invoices

Extracting document parts

proved accuracy could be

enhanced

Introduce cropping functionality

Regex ruleset developed

Page 21: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

the direction markers along the road

OCR at times not accurate when

extracting data within complex

invoices

Extracting document parts

proved accuracy could be

enhanced

Introduce cropping functionality

Regex ruleset developed

Page 22: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

the well marked route

Page 23: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

the arrival at destination

Page 24: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

the arrival at destination

Page 25: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

the arrival at destination

Page 26: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

the potholes

Master data

Absent data on invoice images

Poor handling of paper documents

Poorly scanned images

Hand written images

Page 27: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

reflecting on the gems along the road

The ability of SAP to integrate with external apps

The power of Regex:

https://en.wikipedia.org/wiki/Regular_expression

https://www.regular-expressions.info/

SAP GUI toolbox: ALV, Custom controls

Page 28: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

the journey ahead

Extracting and attaching statement data to

the statement reconciliation application

Cropping and extracting image data whilst

validating by interacting with the stored

image

Rollout to all AfriSam Companies ;-)

Page 29: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

contactdetails

Name : Eric Kreft / Pieter Conradie

Company : AfriSam South Africa

Email : [email protected] / [email protected]

Contact # : 011 670 5500

Website : https://www.afrisam.co.za

Page 30: hellostream 7 - afsug.com · About Eric Kreft Eric Kreft CA(SA), Senior Manager Applications at AfriSam, with over 20 years experience in IT having implemented SAP and related products

thankyou