0

We have a use case where we integrate with S4HANA Odata service using a technical user We do not specify language anywhere while calling the service

The service returns response where some elements of response are language dependent (e.g. units) we need to know which language was determined at S4HANA side and used for returning the elements based on the language.

How can we identify the language of the response in cloud SDK> Regards, Apoorv

  • Could you please expand your question to cover: Is there a reason you don't pro-actively set the language (via the locale setting)? Are you running your application on Cloud Foundry or another environment? Which OData service are you using? – MatKuhr Jul 27 '20 at 16:20
  • And also how do you authenticate your user on the S/4HANA system? – MatKuhr Jul 27 '20 at 17:15
  • I would agree with @MatKuhr. Setting the language pro-actively would be an easier solution. Just add `sap-language` as header to the OData request. To your original question: I'm not aware of any technical solution to get multi-language responses for a single request. – Alexander Dümont Sep 07 '20 at 12:58

1 Answers1

0

To my knowledge it is generally not possible to obtain the language of an S/4HANA OData service via an OData request. I recommend setting the sap-language header proactively.

There might be other means of getting the S/4HANA language set for a specific user that I am not aware of. But unless an OData service implements an endpoint for specifically the user language I believe it cannot be retrieved as part of the OData response.

MatKuhr
  • 505
  • 4
  • 13