cancel
Showing results for 
Search instead for 
Did you mean: 

How can I set/read HTTP headers and set HTTP response code using ABAP code?

srinivas_cheruku
Explorer
0 Kudos

Hi All,

I am new to ABAP coding and I would really appreciate your help.

I want to open a browser from ABAP code with HTTP header and response code set and then read HTTP headers set in the request - Is this possible?

If so, can anyone share the code or point me to a tutorial or some page that shows the steps to achieve this?

Thanks,
Srini

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

See the interfaces IF_HTTP_REQUEST and IF_HTTP_RESPONSE.

Former Member
0 Kudos

You might have found out it yourself but just for the sake of completeness I'm adding to my response. You can certainly set HTTP headers when using the HTTP client to call an URL but in Web Dynpro ABAP you don't have access to the request object (at least not through public APIs) hence you can't parse the HTTP headers. The only feasible solution is to implement a custom ICF handler, parse the HTTP headers in it and call the receiving WDA with URL parameters (or use some other data sharing functionality).

Answers (1)

Answers (1)

Former Member
0 Kudos