🚀 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
Tool | Purpose | Required For |
---|---|---|
abapGit | Downloads code from GitHub | ✅ Primary installation method |
SAPLink | Legacy installation tool | ⚠️ Only for systems < SAP_ABA 702 |
🎯 Installation Methods
Method 1: abapGit Online Installation (Recommended)
abapGit is like a bridge between GitHub (where the code lives) and your SAP system. 1
Step 1: Install abapGit
Check if abapGit is already installed
- Go to transaction
SE38
- Look for report
ZABAPGIT_STANDALONE
- If it exists, skip to Step 2
- Go to transaction
Install abapGit (if not present)
- Visit: https://docs.abapgit.org/guide-install.html
- Download the latest
zabapgit_standalone.prog.abap
file - Create a new program
ZABAPGIT_STANDALONE
in SE38 - Copy/paste the downloaded content
- Save and activate
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)
- Go to transaction
SE80
- Right-click on your system → Create → Package
- Enter your chosen package name
- Add description: "abap2xlsx Excel Library"
- Save in a transport request (for Z packages)
Step 3: Clone the Repository
Run abapGit
- Execute report
ZABAPGIT_STANDALONE
- The abapGit interface will open
- Execute report
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
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
Visit GitHub Repository
- Go to: https://github.com/abap2xlsx/abap2xlsx
- Click the green "Code" button
- Select "Download ZIP"
- Save the file (e.g.,
abap2xlsx-master.zip
) to your local computer
Alternative: Download Specific Release
- Go to: https://github.com/abap2xlsx/abap2xlsx/releases
- Choose your desired version (latest recommended)
- Download the "Source code (zip)" file
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
Run abapGit
- Execute report
ZABAPGIT_STANDALONE
- The abapGit interface will open
- Execute report
Import ZIP File
- Click "New Offline"
- Enter a repository name (e.g., "abap2xlsx")
- Select your package (created in Step 3)
- Click "Create offline repo"
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
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)
Method 3: SAPLink Installation (Legacy Systems Only)
⚠️ Only use this method for SAP systems older than SAP_ABA 702 1
Prerequisites
- Install SAPLink from http://www.saplink.org
- Install SAPLink plugins (complete nugg package recommended) 3
Installation Steps
- Download the
.nugg
file from the build folder - Execute report
ZSAPLINK
- Select "Import Nugget" and locate your file
- Check "overwrite originals" only if updating existing installation 4
Critical: Activation Order
Objects must be activated in this specific sequence: 5
- All domains
- All data elements
- Database Tables/Structures (except specific ones listed)
- Table Types (except specific ones listed)
- All interfaces/classes
- Remaining structures
- Remaining table types
- 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) orZABAP2XLSXDEMOS
(transportable) - ⚠️ Don't use formats like
ZABAP2XLSX_DEMOS
(causes issues)
Step 2: Install Demos (Online Method)
- In abapGit, click "New Online"
- Enter URL:
https://github.com/abap2xlsx/demos
- Select your demo package
- Click "Clone online repo" and "Pull"
Step 2: Install Demos (Offline Method)
- Download ZIP from: https://github.com/abap2xlsx/demos
- In abapGit, click "New Offline"
- Create offline repository for demos
- Import the demos ZIP file
- 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
Problem | Solution |
---|---|
Objects won't activate | Follow the exact activation order for SAPLink installations |
HTTPS connection fails | Use offline ZIP method instead |
ZIP import fails | Ensure ZIP file is not corrupted, try re-downloading |
Package naming conflicts | Use unique package names, avoid underscore patterns |
Missing dependencies | Ensure all SAPLink plugins are installed (legacy method) |
abapGit not found | Install abapGit standalone program first |
📚 Your First Excel Program
Here's a simple example to get you started:
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
- Explore Demo Programs - Run various
ZDEMO_EXCEL*
reports to see capabilities - Read the Documentation - Check the wiki for advanced features
- Join the Community - Ask questions on SAP Community Network
- Start Small - Begin with simple Excel generation before complex formatting
🆘 Getting Help
- SAP Community: Search for "abap2xlsx" at https://community.sap.com/
- GitHub Issues: Report bugs at https://github.com/abap2xlsx/abap2xlsx/issues
- Slack Channel: #abap2xlsx in SAP Mentors & Friends Slack
📖 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!