cancel
Showing results for 
Search instead for 
Did you mean: 

Can we connect third party(SMS provider's) system using RFC with RESTful API?

former_member456271
Participant
0 Kudos

Hi Gurus,

My requirement is to send SMS from SAP System.

I have searched in SAP blogs and Community, every one is suggesting to create Prot in SCOT and SICF to trigger SMS.

So, my question is "IS THERE ANOTHER WAY i,e RFC TO CONNECT THIRD PARTY's SMS SERVER?" using REST API. Because SMS provider given us only REST API.

If possible how?

Waiting for reply!!

Thanks & Regards,

Harish.

matt
Active Contributor

There's many posts about how to consume a RESTful web service.

Accepted Solutions (0)

Answers (2)

Answers (2)

nick_giannakis
Explorer

You should check the abap class CL_HTTP_CLIENT.

As a quick reference you can do the following

  • call method cl_http_client=>create_by_url / create_by_destination (if you need to provide login credentials, prefer "by_destination")
  • create an instance of cl_rest_http_client.
  • create a request by calling the if_rest_client~create_request_entity of the previous created instance (if needed).
  • create a body string (/ui2/cl_json can be helpful..) and pass that into request (if needed)
  • call the appropriate http method (post , get etc) for the rest created instance (eg lo_rest_client->if_rest_resource~post( lo_request ) ).
  • get response by calling if_rest_client~get_response_entity.
  • deserialize the response by calling the predefined methods, and also by getting the response as string data (/ui5/cl_json_parser can also by helpful here..)
Sandra_Rossi
Active Contributor

Not via RFC, but you create a RFC destination of type HTTP in SM59, and use the CL_HTTP_* classes to communicate (or CL_REST_* classes if you prefer). Cf the many existing posts.