2023 Dec 22 12:45 PM
Hello,
I have created a oData service from cds view on standard table e.g. SKA1.
The flag type of fields were going out as Boolean so I have added case statement and sending X or Space as character string. But in browser or consuming application that space value does not come through and it's an empty string. What setting in oData API or gateway can be enabled to stop this and send actual space as value .e.g xloev : " "
Thanks,
Amit.
2024 Jan 08 12:57 PM
2024 Jan 08 4:40 PM
Sigh!
Its been uphill battle to convince non-SAP application to change their code which is more than a dozen year old. Currently they use Oracle to Oracle direct database connection to read tables and we want to remove that and convert them to access via API (since SAP server is moving to cloud and on HANA) .
Its been hard to convince them to switch and Boolean type field will be major rewrite on their side, so single character field it is for now. Only this space issue is pending so they can get Space from oData API as they get Space with direct table read.
2024 Jan 08 4:49 PM
Sigh! Unfortunately I don't know how to preserve "trailing" spaces when converting ABAP-CHAR to OData-String values. Removing trailing spaces is usually exactly what you want with CHAR data.