cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to export CSV file with standard and custom API S/4HANA Cloud public edition

QuyVu
Participant
0 Kudos
1,083

My customer request some requirements about processing CSV in S/4HANA Cloud. 

  1. Can I enhance logic of a standard API( ex OData, SOAP) to return CSV file for client who call API. Can I enhance logic of a standard API to store a CSV file in server or local? (S/4HANA Cloud-standard APIs)
  2. Can I create a custom API(ex OData, HTTP service) to return CSV file for client who call API. Can custome API store a CSV file in server or local?

About custom API, I created a simple HTTP service. But when I call FM GUI_DOWNLOAD to store a CSV file, I get an error that is using FM GUI_DOWNLOAD is not permitted.

I don't have technical knowledge to resolve this customer request. So, can hep me and give me knowledge related to my customer's request?

Best regards

Accepted Solutions (0)

Answers (1)

Answers (1)

varunvenkat
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

1) The S/4HC standard APIs only support JSON/XML formats. One option to consider therefore would be to use the Integration Suite (a.k.a CPI) as a middleware where you can have a mapping logic to convert the XML structure to a CSV file (see an example here

2) The only possibility to create a "custom" APi would be a custom CDS View published as an external API. However this custom API only supports an XML format as well, so in this case, you would also need a middleware to carry out an XML to CSV mapping.

Best regards
Varun