Application Development and Automation 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: 
Read only

SMS through ABAP Program

Former Member
0 Likes
1,502

Hi Experts,

How can we send sms through ABAP program. What are the web services required? Is there any tutorial/resource on this topic?

Regards.

Abdullah

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,099

Hi Ismail,

Check this Blog:

/people/durairaj.athavanraja/blog/2005/07/12/send-sms-to-india-from-abap

Regards,

Ravi

6 REPLIES 6
Read only

Former Member
0 Likes
1,100

Hi Ismail,

Check this Blog:

/people/durairaj.athavanraja/blog/2005/07/12/send-sms-to-india-from-abap

Regards,

Ravi

Read only

Former Member
0 Likes
1,098

Hi...

Go through this code.....

REPORT y_sms_to_india620.

DATA: http_client TYPE REF TO if_http_client .

DATA: wf_string TYPE string ,

result TYPE string ,

r_str TYPE string .

DATA: result_tab TYPE TABLE OF string.

SELECTION-SCREEN: BEGIN OF BLOCK a WITH FRAME .

PARAMETERS: mail(100) LOWER CASE,

m_no(20) LOWER CASE ,

m_mss(120) LOWER CASE.

SELECTION-SCREEN: END OF BLOCK a .

START-OF-SELECTION .

CLEAR wf_string .

CONCATENATE

'http://www.webservicex.net/SendSMS.asmx/SendSMSToIndia?MobileNumber='

m_no

'&FromEmailAddress='

mail

'&Message='

m_mss

INTO wf_string .

CALL METHOD cl_http_client=>create_by_url

EXPORTING

url = wf_string

IMPORTING

client = http_client

EXCEPTIONS

argument_not_found = 1

plugin_not_active = 2

internal_error = 3

OTHERS = 4.

CALL METHOD http_client->send

EXCEPTIONS

http_communication_failure = 1

http_invalid_state = 2.

CALL METHOD http_client->receive

EXCEPTIONS

http_communication_failure = 1

http_invalid_state = 2

http_processing_failed = 3.

CLEAR result .

result = http_client->response->get_cdata( ).

REFRESH result_tab .

SPLIT result AT cl_abap_char_utilities=>cr_lf INTO TABLE result_tab .

LOOP AT result_tab INTO r_str.

WRITE:/ r_str .

ENDLOOP .

Reward if it helps u...

Read only

athavanraja
Active Contributor
0 Likes
1,098

some mobile phone service providers provide a feature where in you can send a email to a phone number (countrycode+mobilephonenumbe@serviceprovider.com) which will get devliered as sms to the receiver.

if your service provider is providing this, then the simplest option would be to sending email from ABAP.

else

you need to get SMS gateway service from one of the service providers and use that for sending SMS. (whether to use webservice, http client will depend on the service providers offering)

Regards

Raja

Read only

0 Likes
1,098

CALL METHOD http_client->receive

EXCEPTIONS

http_communication_failure = 1

sy-subrc = 1 is comming, how can i handle it?

Read only

Former Member
0 Likes
1,098

Hello,

<b>please check this:</b>

http://help.sap.com/saphelp_nw04/helpdata/en/58/97c43af280463ee10000000a114084/frameset.htm

/people/anilkumar.vippagunta2/blog/2005/07/20/developing-web-application-without-writing-single-line-of-code-my-first-web-log

<b>/people/durairaj.athavanraja/blog/2005/07/12/send-sms-to-india-from-abap

http://www.webservicex.net/WS/WSDetails.aspx?CATID=4&WSID=59

/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap

Reagrds,

Beejal

**Reward if this helps

Read only

sap_btp
Explorer
0 Likes
1,098

CALL METHOD http_client->receive

EXCEPTIONS

http_communication_failure = 1

Sy-subrc = 1 is comming, how can i handle it?