{"ref":"content:beyond-read-text-decoding-sapscript-long-texts-stxl-with-sqlscript-in-cds-amdp","page":"/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","generated":"2026-10-28","drafted_with_ai":true,"entity":{"id":"beyond-read-text-decoding-sapscript-long-texts-stxl-with-sqlscript-in-cds-amdp","title":"Beyond READ_TEXT: Decoding SAPscript Long Texts (STXL) with SQLScript in CDS/AMDP","url":"https://community.sap.com/t5/technology-blog-posts-by-members/beyond-read-text-decoding-sapscript-long-texts-stxl-with-sqlscript-in-cds/ba-p/14468331","content_type":"blog","published_on":"source:sap-community","explains":[{"ref":"capability:data-modelling","applies_to":{"ecosystems":["abap"]}}],"summary":"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 CDS](artifact:abap-cds). 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.","short":"Decoding SAPscript long texts from STXL with SQLScript","author":"aamelin1","published":"2026-08-20","provenance":{"discovered_via":[{"source":"source:sap-community","channel":"abap-development-tag"}],"first_seen":"2026-10-02"},"drafted_with_ai":true},"readings":{"liveness":[{"label":"Checked against the source","tier":"unknown","evidence":"nobody has checked it"},{"label":"Source reachable","tier":"unknown","evidence":"not crawled"},{"label":"Age","tier":"good","evidence":"published 2 months ago"}],"compatibility":[{"label":"Version","tier":"unknown","evidence":"no version declared"},{"label":"Moved since?","tier":"good","evidence":"no recorded change after 2026-08-20"},{"label":"Findings","tier":"good","evidence":"none flagged"}],"reach":[{"value":2131,"unit":"views"},{"value":2,"unit":"comments"},{"value":9,"unit":"likes"}]},"signals":{"views":2131,"likes":9,"comments":2,"metrics_at":"2026-10-25"},"series":null,"edges":{"authors":[]}}