Skip to content

🚀 Getting Started with abap2xlsx - A Beginner's Guide

For ABAP developers new to open source and Git

This guide will walk you through installing and using abap2xlsx in your SAP system, even if you've never worked with Git or open source projects before.

📋 What You'll Need Before Starting

System Requirements

  • SAP System: Minimum SAP_ABA 731 (may work on older versions)
  • Developer Access: Ability to create packages and transport objects
  • HTTPS Support: Your SAP system must be able to connect to GitHub (for online method)

🔧 Required Tools

ToolPurposeRequired For
abapGitDownloads code from GitHub✅ Primary installation method
SAPLinkLegacy installation tool⚠️ Only for systems < SAP_ABA 702

🎯 Installation Methods

abapGit is like a bridge between GitHub (where the code lives) and your SAP system. 1

Step 1: Install abapGit

  1. Check if abapGit is already installed

    • Go to transaction SE38
    • Look for report ZABAPGIT_STANDALONE
    • If it exists, skip to Step 2
  2. Install abapGit (if not present)

  3. Handle HTTPS Certificates (if needed)

    • If your system uses two-factor authentication
    • Go to transaction STRUST
    • Import certificates from https://api.github.com

Step 2: Create Your Package

🎨 Package Naming Guide:

  • $ABAP2XLSX - For testing/learning (local package, won't be transported)
  • ZABAP2XLSX - For production use (transportable package)
  1. Go to transaction SE80
  2. Right-click on your system → Create → Package
  3. Enter your chosen package name
  4. Add description: "abap2xlsx Excel Library"
  5. Save in a transport request (for Z packages)

Step 3: Clone the Repository

  1. Run abapGit

    • Execute report ZABAPGIT_STANDALONE
    • The abapGit interface will open
  2. Add New Repository

    • Click "New Online"
    • Enter Git repository URL: https://github.com/abap2xlsx/abap2xlsx.git
    • Select your package (created in Step 2)
    • Click "Create package" if prompted
  3. Download the Code

    • Click "Clone online repo"
    • Click "Pull" to download all abap2xlsx objects
    • Wait for the process to complete (may take several minutes)

Method 2: abapGit Offline Installation (For Restricted Networks)

Use this method when your SAP system cannot connect directly to GitHub or when you need to work with a specific version.

Step 1: Download ZIP File from GitHub

  1. Visit GitHub Repository

  2. Alternative: Download Specific Release

Step 2: Install abapGit (if not already done)

Follow the same abapGit installation steps from Method 1, Step 1.

Step 3: Create Your Package

Follow the same package creation steps from Method 1, Step 2.

Step 4: Import ZIP File via abapGit

  1. Run abapGit

    • Execute report ZABAPGIT_STANDALONE
    • The abapGit interface will open
  2. Import ZIP File

    • Click "New Offline"
    • Enter a repository name (e.g., "abap2xlsx")
    • Select your package (created in Step 3)
    • Click "Create offline repo"
  3. Upload ZIP Content

    • In the offline repository view, click "ZIP"
    • Click "Import ZIP"
    • Browse and select your downloaded ZIP file
    • Click "Import"
    • The system will extract and process the ZIP contents
  4. Install Objects

    • After ZIP import, click "Pull"
    • Review the objects to be imported
    • Click "Pull" to install all abap2xlsx objects
    • Wait for the process to complete

Step 5: Verify Installation

Check these objects exist and are active:

  • Class ZCL_EXCEL (main workbook class)
  • Class ZCL_EXCEL_WRITER_2007 (creates Excel files) 2
  • Class ZCL_EXCEL_WORKSHEET (manages worksheets)

⚠️ Only use this method for SAP systems older than SAP_ABA 702 1

Prerequisites

Installation Steps

  1. Download the .nugg file from the build folder
  2. Execute report ZSAPLINK
  3. Select "Import Nugget" and locate your file
  4. Check "overwrite originals" only if updating existing installation 4

Critical: Activation Order

Objects must be activated in this specific sequence: 5

  1. All domains
  2. All data elements
  3. Database Tables/Structures (except specific ones listed)
  4. Table Types (except specific ones listed)
  5. All interfaces/classes
  6. Remaining structures
  7. Remaining table types
  8. Demo reports

🎮 Installing Demo Programs

Demo programs show you how to use abap2xlsx and are great for learning.

Step 1: Create Demo Package

  • Package name: $ABAP2XLSXDEMOS (local) or ZABAP2XLSXDEMOS (transportable)
  • ⚠️ Don't use formats like ZABAP2XLSX_DEMOS (causes issues)

Step 2: Install Demos (Online Method)

  1. In abapGit, click "New Online"
  2. Enter URL: https://github.com/abap2xlsx/demos
  3. Select your demo package
  4. Click "Clone online repo" and "Pull"

Step 2: Install Demos (Offline Method)

  1. Download ZIP from: https://github.com/abap2xlsx/demos
  2. In abapGit, click "New Offline"
  3. Create offline repository for demos
  4. Import the demos ZIP file
  5. Click "Pull" to install demo programs

Step 3: Try Your First Demo

  • Execute report ZDEMO_EXCEL1
  • This creates a simple Excel file
  • If it works, your installation is successful! 🎉

🔍 Troubleshooting Common Issues

ProblemSolution
Objects won't activateFollow the exact activation order for SAPLink installations
HTTPS connection failsUse offline ZIP method instead
ZIP import failsEnsure ZIP file is not corrupted, try re-downloading
Package naming conflictsUse unique package names, avoid underscore patterns
Missing dependenciesEnsure all SAPLink plugins are installed (legacy method)
abapGit not foundInstall abapGit standalone program first

📚 Your First Excel Program

Here's a simple example to get you started:

abap
REPORT zdemo_my_first_excel.

DATA: lo_excel     TYPE REF TO zcl_excel,
      lo_worksheet TYPE REF TO zcl_excel_worksheet,
      lo_writer    TYPE REF TO zcl_excel_writer_2007.

" Create new workbook
CREATE OBJECT lo_excel.

" Get active worksheet
lo_worksheet = lo_excel->get_active_worksheet( ).

" Add some data
lo_worksheet->set_cell( ip_column = 'A' ip_row = 1 ip_value = 'Hello' ).
lo_worksheet->set_cell( ip_column = 'B' ip_row = 1 ip_value = 'World!' ).

" Create writer and save
CREATE OBJECT lo_writer.
" Add your save logic here

🎯 Next Steps

  1. Explore Demo Programs - Run various ZDEMO_EXCEL* reports to see capabilities
  2. Read the Documentation - Check the wiki for advanced features
  3. Join the Community - Ask questions on SAP Community Network
  4. Start Small - Begin with simple Excel generation before complex formatting

🆘 Getting Help

📖 Understanding the Basics

What is Git?

Git is a version control system that tracks changes in code. Think of it like a detailed history of every change made to the abap2xlsx library.

What is GitHub?

GitHub is a website that hosts Git repositories (code projects). The abap2xlsx code lives on GitHub and is freely available.

What is abapGit?

abapGit is a tool that brings Git functionality to SAP systems, allowing you to download and manage open source ABAP code.

Online vs Offline Installation

  • Online: Direct connection to GitHub, always gets latest version, requires internet access
  • Offline: Uses downloaded ZIP files, works in restricted networks, allows version control

🎉 Congratulations! You're now ready to create Excel files from your ABAP programs using abap2xlsx!