Beyond READ_TEXT: Decoding SAPscript Long Texts (STXL) with SQLScript in CDS/AMDP
STXL stores a SAPscript long text as a compressed ABAP cluster container — LZ77 plus canonical Huffman — so the only official reads are READ_TEXT, one call per text, and its mass variant READ_TEXT_TABLE, both of which ship every decompressed line to the application server and stay invisible to ABAP CDSABAP CDSThe modelling layer of ABAP Cloud — view entities, projections and annotations defined above database tables, delivered with the platform rather than installed.sap official, abap. The author reverse-engineered that on-disk format and ported the decoder into SQLScript, wrapped in an AMDP procedure and exposed through CDS table functions, turning long texts into a joinable, filterable column read directly in the database. On ABAP 7.56 a table function needs the driver-and-filter pattern shown because a parameter cannot bind to a calling column; on ABAP 7.58/S/4HANA 2023 the same result becomes a parameter-less CDS scalar function with true filter push-down.
Where it sits
Who is behind it
Properties
About this work
For data-modelling
Details
Graph
Source
History
- Entered the atlasDiscovered via SAP Community · abap-development-tag.
For your agent
- Ref
content:beyond-read-text-decoding-sapscript-long-texts-stxl-with-sqlscript-in-cds-amdp- JSON
- /content/beyond-read-text-decoding-sapscript-long-texts-stxl-with-sqlscript-in-cds-amdp.json
- MCP
- Connecting an agent