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 EBELN as the column name
  • mindzie's data transformation relies on standard SAP field names

How to ensure technical names in SE16N:

  1. Go to Settings -> Display
  2. Uncheck "Column Descriptions" or "Display Descriptions"
  3. Verify your exported header row shows names like EBELN|BUKRS|BSTYP|AEDAT not Purchasing 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.


SE16N (General Table Display) is the preferred method for extracting SAP table data.

Step 1: Access SE16N

  1. Log into SAP GUI
  2. In the command field (top left), type: SE16N
  3. Press Enter

Step 2: Enter Table Name

  1. In the "Table" field, enter the table name (e.g., EKKO)
  2. Press Enter or click the Execute button

Step 3: Configure Display Settings (Important!)

Before executing, adjust settings for complete data extraction:

  1. Go to menu: Settings -> Display
  2. Set "Maximum Number of Hits" to a high value (e.g., 999999999)
  3. 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

  1. Click the Fields button or go to Edit -> Fields
  2. Select all fields you need (or click Select All for complete extraction)
  3. 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:

  1. Find the date field (e.g., AEDAT, ERDAT, BUDAT)
  2. Enter the date range in format: YYYYMMDD
Example filter for 2023-2024 data:
AEDAT: [20230101] to [20241231]

Step 6: Execute the Query

  1. Press F8 or click the Execute button
  2. Wait for results to display (may take time for large tables)

Step 7: Export to Spreadsheet/CSV

Option A: Using the Export Icon

  1. Look for the Download icon (arrow pointing down into a tray) in the toolbar
  2. Click it to open export options
  3. Select Spreadsheet

Option B: Using Keyboard Shortcut

  1. Press Shift + F8 or Ctrl + Shift + F7
  2. Select Spreadsheet option

Option C: Using Menu

  1. Go to: List -> Export -> Spreadsheet
  2. 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

  1. Choose a save location on your local drive
  2. Use naming convention: TableName_YYYYMMDD.txt
    • Example: EKKO_20240315.txt
  3. Click Save

Step 10: Verify the Export

  1. Open the file in a text editor (Notepad++, VS Code - NOT Excel)
  2. 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

  1. Enter transaction: SE16
  2. Enter table name and press Enter
  3. Set selection criteria (date ranges, filters)
  4. Important: Change "Width of Output List" to 1023
  5. Click Execute (F8)
  6. 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

  1. Enter transaction: SQVI
  2. Create a new QuickView
  3. Select base table and join tables
  4. Define fields and filters
  5. 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

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:

  1. Open the .txt file in Excel:

    • File -> Open -> Select the .txt file
    • Choose "Delimited" in the wizard
    • Select "Tab" as delimiter
    • Complete the wizard
  2. 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:

  1. In SE16, enter selection criteria
  2. Go to: Program -> Execute in Background (or press F9)
  3. In Background Print dialog:
    • Uncheck "Print Immediately"
    • Uncheck "Delete After Output"
  4. Save the job as "Immediate"
  5. Monitor in transaction SM37
  6. 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:

  1. Only select required fields instead of "Select All"
  2. Focus on fields specified in the extraction requirements
  3. 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.csv
  • BKPF_20240315.csv
  • CDPOS_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:

  1. Go to Settings -> User Parameters
  2. Increase "Maximum number of hits"
  3. Or apply date filters to reduce data

Issue: Columns Are Truncated

Cause: List width too narrow

Solution:

  1. Before executing, set "Width of Output List" to 1023
  2. Or use SE16N instead of SE16

Issue: Export Takes Too Long / Times Out

Cause: Too much data for online processing

Solution:

  1. Use background processing (Strategy 2 above)
  2. Split by date ranges
  3. Filter by organizational units

Issue: File Opens Incorrectly in Excel

Cause: Excel auto-formatting

Solution:

  1. Don't double-click to open
  2. Use File -> Open -> Text Import Wizard
  3. Specify correct delimiter
  4. Set date columns as "Text" to preserve format

Issue: Missing Time Fields in CDPOS/CDHDR

Cause: UTIME field not extracted

Solution:

  1. Ensure UTIME is in selected fields
  2. Verify it's populated in source table
  3. Contact SAP Basis if field is empty

Issue: Error "No Authorization"

Cause: Missing table read permissions

Solution:

  1. Contact your SAP Security team
  2. Request read access to specific tables
  3. Provide the table list from extraction requirements

Issue: Special Characters Display as "?"

Cause: Character encoding mismatch

Solution:

  1. Export as "Unconverted" format
  2. Open with UTF-8 encoding
  3. 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:

  1. Login to SAP GUI

  2. Open SE16N

    • Type SE16N in command field, press Enter
  3. Enter Table

    • Table: EKKO
    • Press Enter
  4. Configure Settings

    • Settings -> Display
    • Max Hits: 999999999
    • List Width: 1023
  5. Set Date Filter

    • Field: AEDAT (Creation Date)
    • From: 20230101
    • To: 20241231
  6. Select Fields

    • Click "Fields" button
    • Click "Select All"
    • Confirm
  7. Execute

    • Press F8
    • Wait for results (may take 1-5 minutes)
  8. Verify Results

    • Check row count in status bar
    • Scroll to verify all columns visible
  9. Export

    • Press Shift + F8
    • Select "Spreadsheet"
    • Choose "Text with Tabs"
    • Save as: EKKO_20240315.txt
  10. Validate

    • Open in Notepad++
    • Verify header row
    • Check first/last rows
    • Confirm no truncation

Support

If you encounter issues not covered in this guide:

  1. Note the exact error message
  2. Record which table and transaction you're using
  3. Document the steps you followed
  4. Contact mindzie support with this information

Helpful Resources

SAP Community Articles: