SapCap (SAP Capture) is a GUI tool for automating the capture, mapping, and digitization of data from PDFs directly into SAP GUI
- Interactive PDF Viewer — Navigation, zoom, rectangular selection of areas for data extraction.
- Visual Mapping — Define extraction areas (absolute rectangle, anchor-based, or regex per page) and assign them to profile fields.
- Smart Search — Automatically locate sections in the PDF using anchor text.
- Digitization — Extract data from multiple PDFs using reusable mapping profiles.
- Advanced Fuzzy Matching — Smart fuzzy string matching for materials/codes with stop-word handling, alphanumeric code detection, and type penalties.
- Name ↔ ID Database — Load Excel/CSV files to auto-complete IDs from names.
- SAP Execution — Automate SAP transactions via COM, including table filling, navigation, status bar handling, and retries.
- Automatic Renaming — Rename digitized PDFs by extracting IDs from the SAP status bar.
- Exportable Profiles — Save/load JSON profiles with fields, tables, sequences, mappings, conditions, and quick buttons.
- Drag & Drop — Drag PDFs directly onto the interface.
- Themes —
ttkbootstrapUI (default theme:superhero).
- OS: Windows (requires
win32com.clientfor SAP GUI) - SAP GUI installed and configured
- Python: 3.11+
- Dependencies: See
requirements.txt
# Clone
git clone https://github.com/yourusername/SapCap.git
cd SapCap
# Create virtual environment
python -m venv venv
.\venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run
python SapCap.py- Go to the Profile tab and define fields, tables, and SAP step sequences.
- Save the profile as JSON (
Ctrl+S).
- On the Main tab, load one or more PDFs.
- On the PDF tab, select extraction areas in the viewer and assign them to profile fields.
- Click Digitize to extract data from mapped PDFs.
- The extracted data appears in the Data tab.
- With data ready, click Execute SAP to automate SAP GUI filling.
- Load an Excel/CSV file with two columns (Name, ID) to auto-complete IDs.
SapCap/
├── SapCap.py # Main application source code
├── requirements.txt # Python dependencies
├── pyproject.toml # Project metadata
├── SapCap.spec # PyInstaller spec file
├── build_exe.py # Helper script for building
├── README.md # This file
└── LICENSE # MIT License
~/SAPAutomation/
├── Profiles/ # JSON profile files
├── PDFs/ # Input PDFs
├── Exports/ # Data exports
├── Templates/ # Profile templates
└── Databases/ # TXT/CSV/XLSX databases
| Package | Purpose |
|---|---|
ttkbootstrap |
Modern themed UI |
PyMuPDF |
PDF reading and extraction |
pandas |
Data handling and Excel/CSV |
fuzzywuzzy |
Fuzzy string matching |
python-Levenshtein |
Fuzzy matching speed-up |
Pillow |
PDF page rendering |
pywin32 |
COM Automation for SAP GUI |
tkinterdnd2 |
File drag & drop |
MIT — see LICENSE.
Created by Leriart — SAP automation made easy.