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: 

Problem in sending SMS?

Former Member
0 Kudos

Hello friends,

I am trying to send SMS through ABAP i am using the code like ..

REPORT ZEMAIL.

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 .

But i am getting error like....

<?xml version="1.0" encoding="utf-8"?>

<SMSResult xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.webserviceX.NE

<FromEmailAddress>a.dahiya"at"cmpny.com</FromEmailAddress>

<MobileNumber>919949xxxxxx</MobileNumber>

<Provider>Not Covered</Provider>

<State>Not Covered</State>

<Status>Not Covered</Status>

</SMSResult>

I am using airtel number to trigger SMS...

Please i have commented with is task but i am not able to send SMS nor email please help me with this issue..its like very very..urgent.

Thks points will be rewared.

7 REPLIES 7

Former Member
0 Kudos

Please can anybody help with this. i have tried but i am inable to achieve it .

Waiting for someones help.

Thks

former_member189059
Active Contributor
0 Kudos

Hello,

The code you mentioned calls a publicly available webservice.

It uses the e-mail method to send SMSes

Therefore, it will only work if the Network provider (Airtel in your case) supports sending an SMS via email

Unfortunately very few providers provide this

I'm not sure about other cities, but in Mumbai only BPL mobile provides this support

Former Member
0 Kudos

Hi Venkateshwar,

Please check these links

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

/people/thomas.jung3/blog/2004/09/07/sending-e-mail-from-abap--version-46d-and-lower--api-interface

Best regards,

raam

Former Member
0 Kudos

Hi

I tested the Program ....there is no problem first try to send with the website directly if the message is going there.with that number test u r program...............in my case i gote the folloing message

testign

<?xml version="1.0" encoding="utf-8"?>

<SMSResult xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.webserviceX.

<FromEmailAddress>email address</FromEmailAddress>

<MobileNumber>9000000000</MobileNumber>

<Provider>Airtel</Provider>

<State>Andhra Pradesh</State>

<Status>Message has been sent successfuly</Status>

</SMSResult>

0 Kudos

Hello thks foryour interest can i know how to send directly from website.

thks

0 Kudos

Hi,

U can try the SMS sending websites

[www.earnbyadds.com]

[www.way2sms.com]

Thanks,

Vinod.

aditya_niyogi
Participant
0 Kudos

Hi,

Most likely you are facing a DNS issue, correct the following and it should work. If not contact your basis and tell them to configure the ICM for HTTP.


START-OF-SELECTION .
CLEAR wf_string .
CONCATENATE
'http://173.201.44.188/SendSMS.asmx/SendSMSToIndia?MobileNumber='
m_no
'&FromEmailAddress='
mail
'&Message='
m_mss
INTO
wf_string .

Hope this helps.

Thanks,

Aditya