XTT
An ABAP template engine that merges data, including nested structures, tables and trees, into Excel, Word, HTML and PDF templates prepared in ordinary editors with markers in curly brackets.
Automating a recurring report usually means starting from a report the business already has and rebuilding its layout in code. XTT instead takes that existing report, edited in Excel, Word or Adobe LiveCycle Designer with markers in curly brackets that formulas, charts and pivot tables are linked to, and merges ABAP data, including nested structures, tables and trees, straight into those markers by calling merge(). The result is then downloaded, sent or shown in place by calling download(), send() or show(). It is installed with abapGit, after EUI, the library by the same maintainer that the current versions depend on.
Facts
Where it sits
Who is behind it
In the atlas: maintains 2, contributes to 4@bizhukamaintainerMaxim KenzhebayevContributes to this
In the atlas: contributes to 3@kenzhemaxmonty79Contributes to this
In the atlas: contributes to 1@monty792 contributors
What it declares
Every artifact
- Type
- Package
- Origin
- Independently maintained
As a package
- Where it runs
- Inside its host
- Distributed through
- abapGit
Connections
Producing printed forms, PDFs and filled templates for people
Download
README
quoted from bizhuka/xtt under Apache-2.0, readNow full documentation available here https://bizhuka.github.io/xtt
Xml template toolkit
XTT helps you to automate your reporting routine in SAP
- Get existing report from your customers
- Use preferable editor (MS Excel, Word or Adobe LiveCycle Designer) and replace some parts of it with markers inclosed in curly brackets
- Link all formulas, charts and pivot tables to this marksers
- In abap call
merge()method to pass all data including nested strucures, tables and trees - Use
download( ) | send( ) | show( )method for appropreate action - That's all!
Template

Code
" Template storage class (tr OAOR -> zcl_xtt_file_oaor, external sources -> ZCL_XTT_FILE_RAW)
DATA(lo_file) = NEW zcl_xtt_file_smw0( 'Z_TEMPLATE_ID.XLSX' ).
" Excel (Use ZCL_XTT_WORD_DOCX, ZCL_XTT_PDF for word and pdf respectively)
DATA(lo_xtt) = NEW zcl_xtt_excel_xlsx( io_file = lo_file ).
" R is a marker in the IV_TEMPLATE
lo_xtt->merge( iv_block_name = 'R'
is_block = VALUE ts_root(
begda = pn-begda
endda = pn-endda
t = lt_alv
) ).
" Download to sap_tmp. You could specify path. Show SaveAs dialogue
" Call SHOW( ) for inplace mode
lo_xtt->download( ).Others providing
Compare all 8 on the Document output page →- abap2xlsxabap2xlsxA library that reads and generates .xlsx Excel workbooks directly from ABAP data, without exporting through a list viewer, installed through abapGit and tested from SAP_ABA 731.independent, abapLibrary that reads and generates Excel spreadsheets from ABAP
- zcl_docxzcl_docxAn ABAP class that fills a Word .docx template tagged with content controls, with a report, ZDOCX_GET_TYPES, that generates the ABAP types the template needs; the document opens in Word or returns as an xstring.independent, abapABAP class filling a tagged Word .docx template with data
- zcl_pdfzcl_pdfA standalone ABAP class that draws simple PDFs without Adobe Document Server: text in built-in fonts, text fitted into a box and rectangles, returned as a raw string to store, send or display.independent, abapStandalone ABAP class drawing PDFs without Adobe Document Server
- SAP Forms Service by AdobeSAP Forms Service by AdobeAdobe Document Services on BTP: renders print and interactive PDF forms from stored templates, called over a REST API from a cloud application or connected to an ABAP system.sap official, btpAdobe Document Services on BTP for print and interactive PDFs
- HandlebarsABAPHandlebarsABAPA single-file Handlebars templating implementation for ABAP 7.40 SP02 and up that fills a template from an ABAP structure or table, with block helpers, partials and custom helpers.independent, abapSingle-file Handlebars templating for ABAP 7.40 SP02 and up
- open-abap-pdfopen-abap-pdfA standalone PDF generator written in ABAP that builds a multi-page document from text, lines, rectangles and circles placed at given coordinates and returns it as a string or an xstring.community org, abapStandalone PDF generator written in ABAP
- SAP Spool PDFSAP Spool PDFAn 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.independent, abapSubmits an ABAP report to the spool and converts the output to PDF
Details
Sources
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
abaplint
Flavors
“" Template storage class (tr OAOR -> zcl_xtt_file_oaor, external sources -> ZCL_XTT_FILE_RAW)” — bizhuka/xtt — README, Code
Contributors
History in the atlas
- First seen.
For your agent
- Ref
artifact:bizhuka-xtt- JSON
- /artifacts/bizhuka-xtt.json
- MCP
- Connecting an agent