cancel
Showing results for 
Search instead for 
Did you mean: 

(Solved) RFC Error when using HTTP GET Request

0 Kudos

Hi guys,

I am facing problems with the function module HTTP_GET.

I am using this method to check the return code of a certain website.
When I test (via F8) my method that calls the fm HTTP_GET, the connection is created and I get a return code.
But when I navigate to the sport where the method is called in Web UI, I get the following error from the function module:
"Error opening a rfc connection (Function: 'exec_sapgui' #Function: 'exec_sapgui' #CPIC-Call: 'ThSAPOCMINIT', comm).

The function module HTTP_GET can be tested with the report RSHTTP20 which works fine as well.

Do you have any suggestions what I could try next?

Thank you very much.

Chris

Accepted Solutions (1)

Accepted Solutions (1)

SimoneMilesi
Active Contributor
0 Kudos

I would switch from the FM HTTP_GET to class cl_http_client and use it (with REST one if you need some RESTful operations).

From the message error, it seems HTTP_GET calls the SAPGui (maybe does it ask user and password via popup? ) and, in Web UI, this is not possible.

0 Kudos

This works perfectly!
Thank you very much, you saved my day 🙂

Regards
Chris

Answers (0)