We need to provide an OData service for the long texts of a document. These texts are stored in STXH/STXL and are accessed by READ_TEXT FM and similar. We are working with S/4HANA 2020 system and ABAP RAP model (well, trying to, at least).
Using CDS views, the only option to provide these texts is to use a virtual element, as explained here and here. All is well but there is max length of 1033 characters in CDS string. We are dealing with some very long texts, unfortunately, that will exceed that.
Question: in 2022, how do we resolve this? Should we forget about CDS views and just use completely custom implementation in SEGW? Is there any other option? Splitting text into several variables or separate records would be undesirable.
Edit: this scenario does not involve SAP Fiori / UI5, so we don't care for CDS advantages in this area.
Thank you!