PackagePackagetypeA library you install and call yourself.See every one →What this type is →independently maintainedindependently maintainedoriginPublished by one person or a small company outside SAP. Says nothing about quality; the readings say that.See every one →

SAP Spool PDF

An ABAP class that submits a report to the spool, typically in the background, and converts the resulting spool request into a PDF it can return as an xstring, save, show or email.

A report's output is often needed as a PDF in xstring or binary format. SAP Spool PDF submits any report to the SAP spool, typically in the background, and converts the resulting spool request into a PDF using its spool ID, which the README presents as a clean and non-intrusive way that avoids modifying standard SAP code. Unlike SAP's own cl_bp_abap_job, which only accepts parameters through a variant, it can pass them directly, via a variant, or both. The merged PDF comes back as an xstring from one chained call, and the same object saves it locally, shows it or sends it as an email attachment.

Facts

Last pushLicenceMIT

Where it sits

Lives in
Provides
Document outputABAPDocument outputcapabilityProducing a document a person receives — a printed form, a generated PDF, a filled template — and getting it to a printer or a queue rather than returning it as a payload.

Who is behind it

Victor IzbitskiyVictor IzbitskiyPersonMaintains this
In the atlas: maintains 2, contributes to 4
@victorizbitskiy
maintainer

What it declares

Every artifact

Type
Package
Origin
Independently maintained

As a package

Where it runs
Inside its host
Distributed through
abapGit

Connections1

README

quoted from victorizbitskiy/zspool_pdf under MIT, read
victorizbitskiy/zspool_pdf/README.mdOn GitHub

License: MIT ABAP 7.40sp08+ Code Statistics

Translations:

SAP Spool PDF

Submitting a report to the spool and receiving PDF.


Don't forget to click ⭐ if you like it!


Table of contents

  1. What is it?
  2. What is this for?
  3. Why not just use cl_bp_abap_job?
  4. Installation
  5. Using
  6. Diagrams
  7. How to contribute
  8. Got questions
  9. Logo

What is it?

SAP Spool PDF is a lightweight ABAP utility that simplifies generating PDFs from SAP reports. It provides a clean, object-oriented interface to submit a report to the spool and retrieve the output as a PDF file without dealing with low-level conversion logic.

What is this for?

Often, you need a report’s output as a PDF in xstring or binary format. One clean and non-intrusive way to achieve this is by submitting the report to the SAP spool (typically in the background) and then converting the spool request into a PDF using its spool ID. This approach avoids modifying standard SAP code—making it safer, upgrade-friendly, and easier to maintain.

Why not just use cl_bp_abap_job?

SAP’s standard class cl_bp_abap_job can run reports in the background—but it only supports passing parameters via a variant. (Let me know if that’s changed!) While variants work, they’re not always convenient: you either have to predefine one or create it dynamically at runtime, which adds complexity and overhead.

SAP Spool PDF gives you more flexibility. It lets you run any report in the background and generate a PDF from its output passing parameters directly, via a variant, or even both.

Thanks to its minimal and intuitive API, you can get the resulting PDF as an xstring in a single line ready to save, display, email, or process further.

Installation

Install the package using abapGit. Just clone the repository into your SAP system, and you’re ready to go!

Using

Example
   TYPES ty_pernr TYPE n LENGTH 8.
    DATA lt_pernr TYPE RANGE OF ty_pernr.

   " This example demonstrates how to generate 2-NDFL certificates (HCM module).
   " All individual PDF documents are automatically merged into a single file.

    DATA(lv_year) = '2021'.
    lt_pernr = VALUE #( sign = 'I' option = 'EQ' ( low = 00000001 ) ).
    DATA(lv_filename) = `C:\TEMP\spdf_merged_test.pdf`.

    TRY.
        DATA(lo_report) = NEW zcl_spdf_report( iv_name    = 'HRULNDFL'
                                               iv_variant = 'T1' ).

        lo_report->add_param( iv_name = 'PNPPERNR'
                              ia_data = lt_pernr ).

        lo_report->add_param( iv_name = 'P_YEAR'
                              ia_data = lv_year ).

        " Cases:
        " 1) Getting xstring
        DATA(lv_pdf) = lo_report->submit_to_sap_spool( )->get_merged_pdf( )->to_xstring( ).
        
        " 2) Save and show PDF
        lo_report->get_merged_pdf( )->save_local( lv_filename )->show( ).
   
        " 3) Send email
        lo_report->get_merged_pdf( )->send( iv_email    = 'test@test.com'
                                            iv_filename = lv_filename
                                            iv_subject  = 'This is an email with a PDF attachment' ).
      CATCH zcx_spdf_exception
            cx_rspo_spoolid_to_pdf INTO DATA(lx_e).
        WRITE lx_e->get_text( ).
    ENDTRY.

Diagrams

UML Class Diagram

UML Class Diagram

How to contribute

will help you. Contributions are welcome! Please follow the official contribution guide from abapGit to get started.

Got questions?

If you have any questions, feature ideas, or just want to share feedback - feel free to open a new (GitHub issue).

Project logo designed by pixel-buddha

MIT, read
Document output
  1. abap2xlsxLibrary that reads and generates Excel spreadsheets from ABAP
  2. zcl_docxABAP class filling a tagged Word .docx template with data
  3. zcl_pdfStandalone ABAP class drawing PDFs without Adobe Document Server
  4. XTTABAP template engine for Excel, Word, HTML and PDF
  5. SAP Forms Service by AdobeAdobe Document Services on BTP for print and interactive PDFs
  6. HandlebarsABAPSingle-file Handlebars templating for ABAP 7.40 SP02 and up
  7. open-abap-pdfStandalone PDF generator written in ABAP

Details

Sources3
Added by handdiscovered herechecked
github.com/victorizbitskiy/zspool_pdftree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
discovered viaAdded by hand
first seen in the atlas
ecosystem and domainabap, integration-and-messaging
abaplint
issues under its own abaplint configuration0
lines909
statements423
objects9
files14
analysed, main
abaplint version2.120.84
History in the atlas1
  1. First seen.
For your agent
Ref
artifact:victorizbitskiy-zspool-pdf
JSON
/artifacts/victorizbitskiy-zspool-pdf.json
MCP
Connecting an agent