I've created a simple http extension ( Z-class implementing IF_HTTP_EXTENSION~HANDLE_REQUEST ) to set the custom http header field through:
CALL METHOD server->response->set_header_field( name = 'Access-Control-Allow-Origin' value = '*' ).
Then I've tried to register this class as handler for my service at: /sap/bc/srt/rfc/sap/zservice
but it was not possible, I've got the error message: SHTTP-824: You cannot use this transaction to change the service
It was possible to register the handler at higher level at: /sap/bc/srt/rfc/sap but it doesn't work, the additional http header field is not send with the response.
Is it somehow possible to extend the response of web service through http extension?