Skip to main content

Troubleshooting Guide

This guide helps you resolve common issues when using ERPL with DuckDB and SAP systems.

Installation Issues

Extension Installation Fails

Problem: INSTALL 'erpl' command fails with an error.

Solutions:

  1. Check DuckDB Version: Ensure you're using DuckDB 0.10.1

    SELECT version();
  2. Verify Internet Connection: The extension is downloaded from the internet

    curl -I http://get.erpl.io
  3. Try Manual Installation: Download and install manually

    INSTALL '/path/to/erpl.duckdb_extension';
    LOAD 'erpl';

Extension Not Found After Installation

Problem: LOAD 'erpl' returns "Extension not found".

Solutions:

  1. Check Installation: Verify the extension was installed

    SELECT * FROM duckdb_extensions() WHERE extension_name = 'erpl';
  2. Restart DuckDB: Close and reopen your DuckDB session

  3. Check File Permissions: Ensure DuckDB can access the extension directory

Connection Issues

SAP Connection Fails

Problem: sap_connect() returns an error.

Common Causes and Solutions:

  1. Invalid Host or System Number

    -- Verify your SAP system details
    SELECT sap_connect(
    host = 'correct-sap-server.com', -- Check hostname
    system_number = '00', -- Verify system number
    client = '100', -- Confirm client
    user = 'your-username',
    password = 'your-password'
    );
  2. Network Connectivity Issues

    # Test network connectivity
    ping your-sap-server.com
    telnet your-sap-server.com 3200 # Default SAP port
  3. SAP User Account Issues

    • Verify username and password
    • Check if account is locked
    • Ensure account has RFC authorizations

Permission Denied Errors

Problem: sap_read_table() returns permission errors.

Solutions:

  1. Check RFC Authorizations: Contact your SAP administrator
  2. Verify Table Access: Ensure your user can access the specific table
  3. Test with Different Table: Try a table you know you have access to

Performance Issues

Slow Query Performance

Problem: SAP queries are running slowly.

Optimization Tips:

  1. Use Filters: Limit data with WHERE clauses

    SELECT * FROM sap_read_table('KNA1') 
    WHERE LAND1 = 'DE' -- Filter by country
    LIMIT 1000;
  2. Select Specific Columns: Only retrieve needed fields

    SELECT KUNNR, NAME1 FROM sap_read_table('KNA1');
  3. Use Pagination: Process data in chunks

    SELECT * FROM sap_read_table('KNA1') 
    LIMIT 1000 OFFSET 0;

Memory Issues

Problem: DuckDB runs out of memory with large SAP tables.

Solutions:

  1. Increase Memory Limit: Set higher memory limit for DuckDB
  2. Process in Batches: Use LIMIT and OFFSET for large tables
  3. Optimize Queries: Use more selective WHERE clauses

SAP-Specific Issues

Table Not Found

Problem: sap_read_table('TABLENAME') returns "Table not found".

Solutions:

  1. Check Table Name: Verify the exact table name (case-sensitive)
  2. List Available Tables: Use sap_show_tables() to see what's available
  3. Check Client: Ensure you're connected to the correct SAP client

Function Module Errors

Problem: Calling SAP function modules fails.

Common Issues:

  1. Function Not Remote-Enabled: Verify the function module is RFC-enabled
  2. Parameter Mismatch: Check function module interface
  3. Authorization Issues: Ensure you have permission to call the function

Debugging Tips

Enable Verbose Logging

Enable detailed logging to diagnose issues:

SET log_level = 'debug';

Test Basic Connectivity

Start with simple tests:

-- Test basic connection
SELECT sap_connect(...);

-- List available tables
SELECT * FROM sap_show_tables() LIMIT 5;

-- Try a simple table read
SELECT * FROM sap_read_table('T000') LIMIT 1;

Check SAP System Status

Verify your SAP system is accessible:

# Check if SAP system is running
ping your-sap-server.com

# Test RFC port (usually 3200 + system number)
telnet your-sap-server.com 3200

Getting Additional Help

Self-Service Resources

  1. Documentation: Check our complete documentation
  2. Examples: Review key tasks for common scenarios
  3. GitHub Issues: Search existing issues

Community Support

  1. GitHub Discussions: Ask questions in GitHub Discussions
  2. Stack Overflow: Tag questions with erpl and duckdb
  3. LinkedIn: Connect with other users on LinkedIn

Professional Support

For enterprise support and consulting:

Error Code Reference

Common Error Codes

Error CodeDescriptionSolution
RFC_ERRORGeneral RFC communication errorCheck network connectivity and SAP system status
AUTH_FAILEDAuthentication failedVerify username and password
PERMISSION_DENIEDInsufficient permissionsContact SAP administrator for RFC authorizations
TABLE_NOT_FOUNDSAP table doesn't existVerify table name and client
FUNCTION_NOT_FOUNDFunction module not foundCheck function name and RFC enablement

Log Analysis

When reporting issues, include:

  1. DuckDB Version: SELECT version();
  2. ERPL Version: SELECT * FROM duckdb_extensions() WHERE extension_name = 'erpl';
  3. Error Message: Complete error text
  4. SAP System Info: Version, client, system number
  5. Query: The exact SQL query that failed

This information helps us provide faster and more accurate support.