Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Use of FM: HTTP_POST

0 Kudos

Hi There

Hope You can help!

We are going to use HTTP post and HTTP get to communicate with one of our suppliers (Tech Data)

So now we have found the FM HTTP_POST and HTTP_GET modules.

But do we need further installation/set up of RFC or so to use these modules?

We have the URL to use as endpoint.

We also have build an example XML string (copied from Tech Data documentation)

But when calling the HTTP_POST in debug mode we can see a "OpenSSL not available" error!

Hope to get some hints from anyone out there!

Have a nice day

Best regards

Carsten

7 REPLIES 7

sabirshah1
Participant
0 Kudos

Yes you have to create RFC to call HTTP_POST and HTTP_GET.

0 Kudos

Hi Sabir Shah

Thanks for Your answer. Could You give me an example on the RFC used to call the HTTP_POST??

Best regards

Carsten

0 Kudos

Kindly check http_post there is fm called as rfc like

Call Function HTTP_POST DESTINATION DEST_NAME.

0 Kudos

Hi,

If you are getting SSL Error,  ( specially if your URL has https) then please use STRUST T-code to install the Certificate with the  help of BASIS people and then in the  SM59 T-Code, create the RFC Destination under the "HTTP Connections to External Server".

Please make sure to use the Installed Certificate name in the Logon&Security under SSL Certificate and assign a name under the Authorization for Destination.

If the Connection Test in SM59 shows all ok ,then use this name as the RFC_DESTINATION in the HTTP_POST method .

Regards,

Pallavi

Former Member
0 Kudos

Carsten,

Pallavi's suggestion to look into the STRUST and SM59 transactions will likely help you resolve the SSL errors.

One other tip I'd like to offer as long as you are looking into using HTTP, is to consider using the HTTP class CL_HTTP_CLIENT instead of the function modules. I find that the class is easier to use and has better documentation.

Here's a link to the standard documentation: Example Program: Executing an HTTP Request - Components of SAP Communication Technology - SAP Librar... '

And here's a link to a blog post I found useful for actually using the class:

Thanks,

Brian

0 Kudos

Hi all

Can't' we just use the existing HTTP or HTTPA RFC connections for using the HTTP_POST module?

Best regards

Carsten

0 Kudos

Hi,

Whether you are using the FM HTTP_POST or call method ( CALL METHOD cl_http_client=>create_by_url ) If you are getting SSL error means you need RFC.

And these RFC destinations are created with SSL certificate specific to the URL for which you wish to send the Data.

The certificate must be installed first by BASIS ppl in STRUST for the URL ( downloaded or provided by the client relevant for this URL) and set the RFC destination with this certificate .

Regards,

Pallavi