2021 May 28 6:23 AM
Hi there
Is there a way to change the OData output to csv? In my idea I change the $format to CSV like this “$format=CSV” and I get a file with csv. Is there a way to program an exit to change the format of the response and to convert the response to a mime file?
Regards
Henning
2021 May 28 7:13 AM
from the URL directly it is not possible I believe. But u can read the data and parse as shown below.
https://ui5.sap.com/#/topic/f1ee7a8b2102415bb0d34268046cd3ea
2021 May 28 7:38 AM
Thanks for the info but I am not firm with ui5. If I am not wrong, I need a client for parsing the JavaScript. In my destination Environment, it should be as simple as possible. Most of the work should be done in ABAP.
2021 May 28 7:45 AM
Hi Henning,
the OData spec allows additional formats:
http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/part1-protocol/odata-v4.0-errata03-...
However, I'm not aware of any additional formats or extension points
The old SAP Gateway had an option to specify excel for $format, but I don't know if this is supported in RAP
As such, like the real expert and great community member Mahesh has pointed out, you would need to request JSON format, ideally with filters and selects, to make the payload smaller, and then parse it on client side