SAP Data Extraction Guide
This guide explains how to extract data from SAP ERP tables and export them to CSV files for process mining analysis with mindzie.
[CRITICAL] Use Technical Field Names, NOT Display Names
| REQUIREMENT | When exporting SAP data, you MUST use the original database column names (technical field names like EBELN, EBELP, AEDAT), NOT the display names or descriptions (like "Purchasing Document", "Item", "Created On"). |
Why this matters:
- Display names vary by language and SAP configuration
- Technical field names are consistent across all SAP systems
- Table joins are impossible without matching technical field names - for example, joining EKKO (headers) to EKPO (items) requires both files to have
EBELNas the column name - mindzie's data transformation relies on standard SAP field names
How to ensure technical names in SE16N:
- Go to Settings -> Display
- Uncheck "Column Descriptions" or "Display Descriptions"
- Verify your exported header row shows names like
EBELN|BUKRS|BSTYP|AEDATnotPurchasing Doc|Company Code|Doc Type|Created On
| Correct Header (Technical Names) | Wrong Header (Display Names) |
|---|---|
EBELN\|BUKRS\|BSTYP\|AEDAT |
Purchasing Doc\|Company Code\|Doc Type\|Created On |
If you export with display names, the data cannot be processed and you will need to re-extract.
Before You Begin
Verify Your Access
Before starting, confirm you have:
- SAP GUI installed and configured
- Valid SAP login credentials
- Read access to required tables (your IT team can verify this)
- Sufficient local disk space for exported files
- The list of tables to extract (provided by mindzie)
Understand Your Data Requirements
Review the extraction requirements document provided by mindzie. It specifies:
- Which tables to extract (e.g., EKKO, EKPO, BKPF, BSEG)
- Required date ranges
- Any specific filters to apply
- Expected data volumes
Plan Your Extraction
| Data Volume | Recommended Approach |
|---|---|
| < 100,000 rows | Direct export via SE16N |
| 100,000 - 500,000 rows | Export with date filters, batch if needed |
| > 500,000 rows | Background processing or date-range batching |
Transaction Codes for Data Export
SAP provides several transactions for viewing and exporting table data:
| Transaction | Name | Best For |
|---|---|---|
| SE16N | General Table Display | Most extractions (recommended) |
| SE16 | Data Browser | Simple single-table exports |
| SQVI | QuickViewer | Joining multiple tables |
| SE37 | Function Builder | RFC_READ_TABLE (programmatic) |
Recommendation: Use SE16N for most extractions. It provides the best balance of features and ease of use.
Method 1: SE16N Export (Recommended)
SE16N (General Table Display) is the preferred method for extracting SAP table data.
Step 1: Access SE16N
- Log into SAP GUI
- In the command field (top left), type:
SE16N - Press Enter
Step 2: Enter Table Name
- In the "Table" field, enter the table name (e.g.,
EKKO) - Press Enter or click the Execute button
Step 3: Configure Display Settings (Important!)
Before executing, adjust settings for complete data extraction:
- Go to menu: Settings -> Display
- Set "Maximum Number of Hits" to a high value (e.g., 999999999)
- Set "List Width" to 1023 (maximum) to capture all columns
Alternatively, use the Settings button on the toolbar.
Critical Setting:
Maximum Number of Hits: 999999999
List Width: 1023
Step 4: Select Fields to Display
- Click the Fields button or go to Edit -> Fields
- Select all fields you need (or click Select All for complete extraction)
- Confirm with Enter
Tip: For process mining, select ALL fields unless specifically instructed otherwise. mindzie will filter what's needed.
Step 5: Apply Filters (If Required)
If your extraction requires date filters:
- Find the date field (e.g., AEDAT, ERDAT, BUDAT)
- Enter the date range in format:
YYYYMMDD
Example filter for 2023-2024 data:
AEDAT: [20230101] to [20241231]
Step 6: Execute the Query
- Press F8 or click the Execute button
- Wait for results to display (may take time for large tables)
Step 7: Export to Spreadsheet/CSV
Option A: Using the Export Icon
- Look for the Download icon (arrow pointing down into a tray) in the toolbar
- Click it to open export options
- Select Spreadsheet
Option B: Using Keyboard Shortcut
- Press Shift + F8 or Ctrl + Shift + F7
- Select Spreadsheet option
Option C: Using Menu
- Go to: List -> Export -> Spreadsheet
- Or: System -> List -> Save -> Local File
Step 8: Choose Export Format
When the format dialog appears:
| Format | Extension | When to Use |
|---|---|---|
| Text with Tabs | .txt | Best for large datasets - recommended for mindzie |
| Spreadsheet (XLSX) | .xlsx | Smaller datasets, Excel compatibility |
| Unconverted | .txt | Raw data, preserves all formatting |
For mindzie: Select "Text with Tabs" or "Unconverted"
Step 9: Save the File
- Choose a save location on your local drive
- Use naming convention:
TableName_YYYYMMDD.txt- Example:
EKKO_20240315.txt
- Example:
- Click Save
Step 10: Verify the Export
- Open the file in a text editor (Notepad++, VS Code - NOT Excel)
- Verify:
- Header row is present
- Data rows look complete
- No truncated columns
- Record count matches expected
Method 2: SE16 Export (Alternative)
SE16 (Data Browser) is simpler but has more limitations.
Step-by-Step Process
- Enter transaction:
SE16 - Enter table name and press Enter
- Set selection criteria (date ranges, filters)
- Important: Change "Width of Output List" to
1023 - Click Execute (F8)
- Export via: Edit -> Download -> Spreadsheet
SE16 Limitations
- Maximum 1024 characters width (may truncate wide tables)
- Lower row limits than SE16N
- Can cause system performance issues with large tables
Method 3: SQVI Quick View (For Complex Queries)
Use SQVI when you need to join multiple tables or create custom queries.
When to Use SQVI
- Joining master data with transaction data
- Creating custom field selections
- Applying complex filter logic
Basic SQVI Process
- Enter transaction:
SQVI - Create a new QuickView
- Select base table and join tables
- Define fields and filters
- Execute and export results
Note: SQVI requires additional SAP knowledge. Contact your SAP Basis team or mindzie support if you need assistance with complex queries.
Export Format Options
Available Formats in SAP
| Format | Description | Pros | Cons |
|---|---|---|---|
| Unconverted | Raw text, pipe-delimited | Fastest, preserves all data | Requires conversion |
| Text with Tabs | Tab-separated values | Good for large files | Tab handling in Excel |
| Spreadsheet | Excel format (XLS/XLSX) | Opens directly in Excel | Row limits, formatting issues |
| Rich Text | RTF format | Preserves formatting | Very slow, large files |
| HTML | Web format | Browser viewable | Not suitable for analysis |
Recommended Format for mindzie
Primary Choice: Text with Tabs (.txt)
- Works for all data sizes
- No row limitations
- Preserves data integrity
Alternative: Unconverted (.txt)
- Best for very large datasets
- Uses pipe (|) delimiter
- Requires specifying delimiter when opening
Converting Tab-Delimited to CSV
If you need true CSV format:
Open the .txt file in Excel:
- File -> Open -> Select the .txt file
- Choose "Delimited" in the wizard
- Select "Tab" as delimiter
- Complete the wizard
Save as CSV:
- File -> Save As
- Choose "CSV (Comma delimited)"
- Use UTF-8 encoding if available
Or use a text editor to find/replace tabs with commas.
Handling Large Datasets
Signs You Have a Large Dataset
- Query takes more than 5 minutes
- SAP displays "Maximum hits reached" warning
- Export fails or times out
- File size exceeds 500MB
Strategy 1: Date Range Batching
Split the extraction by date ranges:
Batch 1: AEDAT 20230101 to 20230630 -> EKKO_2023H1.txt
Batch 2: AEDAT 20230701 to 20231231 -> EKKO_2023H2.txt
Batch 3: AEDAT 20240101 to 20240630 -> EKKO_2024H1.txt
Then combine files (keeping only one header row).
Strategy 2: Background Processing (SE16)
For very large tables:
- In SE16, enter selection criteria
- Go to: Program -> Execute in Background (or press F9)
- In Background Print dialog:
- Uncheck "Print Immediately"
- Uncheck "Delete After Output"
- Save the job as "Immediate"
- Monitor in transaction SM37
- Once complete, access spool and save to local file:
- System -> List -> Save -> Local File
Strategy 3: Field Reduction
If you don't need all columns:
- Only select required fields instead of "Select All"
- Focus on fields specified in the extraction requirements
- This reduces file size and export time
Strategy 4: Company Code / Plant Filtering
If applicable, filter by organizational units:
BUKRS (Company Code): [1000]
WERKS (Plant): [P001]
Export each unit separately and combine.
CSV Format Requirements for mindzie
File Specifications
| Requirement | Value |
|---|---|
| Encoding | UTF-8 |
| Delimiter | Comma (,) or Tab or Pipe (|) |
| Text Qualifier | Double quotes (") |
| Header Row | Required - first row |
| Date Format | YYYYMMDD or YYYY-MM-DD |
| Time Format | HHMMSS or HH:MM:SS |
File Naming Convention
TableName_YYYYMMDD.csv
Examples:
EKKO_20240315.csvBKPF_20240315.csvCDPOS_20240315.csv
Handling Special Characters
SAP may export special characters that need attention:
| Character | Issue | Solution |
|---|---|---|
| Commas in text | Breaks CSV structure | Ensure text is quoted |
| Line breaks | Creates false rows | Replace with spaces |
| German umlauts | Encoding issues | Use UTF-8 encoding |
| Currency symbols | Display issues | Keep as-is, mindzie handles |
Common Issues and Solutions
Issue: "Maximum Number of Entries Reached"
Cause: Default row limit hit
Solution:
- Go to Settings -> User Parameters
- Increase "Maximum number of hits"
- Or apply date filters to reduce data
Issue: Columns Are Truncated
Cause: List width too narrow
Solution:
- Before executing, set "Width of Output List" to 1023
- Or use SE16N instead of SE16
Issue: Export Takes Too Long / Times Out
Cause: Too much data for online processing
Solution:
- Use background processing (Strategy 2 above)
- Split by date ranges
- Filter by organizational units
Issue: File Opens Incorrectly in Excel
Cause: Excel auto-formatting
Solution:
- Don't double-click to open
- Use File -> Open -> Text Import Wizard
- Specify correct delimiter
- Set date columns as "Text" to preserve format
Issue: Missing Time Fields in CDPOS/CDHDR
Cause: UTIME field not extracted
Solution:
- Ensure UTIME is in selected fields
- Verify it's populated in source table
- Contact SAP Basis if field is empty
Issue: Error "No Authorization"
Cause: Missing table read permissions
Solution:
- Contact your SAP Security team
- Request read access to specific tables
- Provide the table list from extraction requirements
Issue: Special Characters Display as "?"
Cause: Character encoding mismatch
Solution:
- Export as "Unconverted" format
- Open with UTF-8 encoding
- Verify SAP GUI code page settings
Validation Checklist
Before sending files to mindzie, verify:
File Structure
- Header row present with column names
- Consistent delimiter throughout file
- No blank rows in middle of data
- File opens correctly in text editor
Data Completeness
- All required columns are present
- Date/time fields are populated (not empty)
- Row count matches expected volume
- Date range covers required period
Format Compliance
- File encoding is UTF-8
- Date format is consistent (YYYYMMDD)
- No truncated columns
- Special characters preserved correctly
File Delivery
- File naming follows convention
- Files compressed if over 50MB
- Secure transfer method used
- Extraction date documented
Quick Reference
SE16N Export - Quick Steps
1. Transaction: SE16N
2. Enter table name
3. Set Max Hits: 999999999
4. Set List Width: 1023
5. Select fields (or Select All)
6. Apply date filters if needed
7. Execute (F8)
8. Export: Shift+F8 -> Spreadsheet -> Text with Tabs
9. Save as: TableName_YYYYMMDD.txt
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
| F8 | Execute query |
| Shift + F8 | Export to spreadsheet |
| Ctrl + Shift + F7 | Export (alternative) |
| Ctrl + Y | Select mode for copy |
| Ctrl + C | Copy selected data |
Common Table Names
| Table | Description | Typical Size |
|---|---|---|
| EKKO | Purchase Order Headers | Medium |
| EKPO | Purchase Order Items | Large |
| EBAN | Purchase Requisitions | Medium |
| BKPF | Accounting Doc Headers | Large |
| BSEG | Accounting Doc Items | Very Large |
| CDHDR | Change Doc Headers | Large |
| CDPOS | Change Doc Items | Very Large |
| LFA1 | Vendor Master | Small |
| MARA | Material Master | Medium |
Sample Extraction Workflow
Example: Extracting EKKO (Purchase Order Headers)
Objective: Extract 2 years of purchase order headers
Steps:
Login to SAP GUI
Open SE16N
- Type SE16N in command field, press Enter
Enter Table
- Table: EKKO
- Press Enter
Configure Settings
- Settings -> Display
- Max Hits: 999999999
- List Width: 1023
Set Date Filter
- Field: AEDAT (Creation Date)
- From: 20230101
- To: 20241231
Select Fields
- Click "Fields" button
- Click "Select All"
- Confirm
Execute
- Press F8
- Wait for results (may take 1-5 minutes)
Verify Results
- Check row count in status bar
- Scroll to verify all columns visible
Export
- Press Shift + F8
- Select "Spreadsheet"
- Choose "Text with Tabs"
- Save as: EKKO_20240315.txt
Validate
- Open in Notepad++
- Verify header row
- Check first/last rows
- Confirm no truncation
Support
If you encounter issues not covered in this guide:
- Note the exact error message
- Record which table and transaction you're using
- Document the steps you followed
- Contact mindzie support with this information
Helpful Resources
SAP Community Articles: