‎2008 Apr 28 7:37 AM
Hi
Friends I want to send SMS to customers mobiles using abap code .
How It possible Please help.
I have some previous posted threasds but not able to understand at all.
Should I take some third pary solution or is it possible any other way. How to use
http://www.webservicex.net/SendSMS.asmx
Thanks & Regards
SS
‎2008 Apr 28 7:40 AM
Hi,
we can send SMS from ABAP u can check this blog for coding:
/people/durairaj.athavanraja/blog/2005/07/12/send-sms-to-india-from-abap
Also Pls check the below links
http://help.sap.com/saphelp_nw04/helpdata/en/58/97c43af280463ee10000000a114084/frameset.htm
/people/ronen.fox/blog/2007/12/06/sending-sms-notification-via-business-workflow
http://www.saptechnical.com/Tutorials/Workflow/Workflow.htm
You can use the FM: 'SO_DOCUMENT_SEND_API1' &
'SO_DOCUMENT_SEND_API1_NEW'.
to send the mail,sms etc.
But you have to make some chamnges in the reciever table, jus go thru FM documnetaion once, you will fine the option for sending SMS thru either of this FM.
Below is a sample code for sending e-mail.
so, u can take help from this.
data declarations
DATA : v_sender TYPE soextreci1-receiver,
v_doc TYPE sodocchgi1,
it_paklist TYPE STANDARD TABLE OF sopcklsti1 ,
wa_paklist TYPE sopcklsti1 ,
it_obj_head TYPE STANDARD TABLE OF solisti1 ,
it_obj_bin TYPE STANDARD TABLE OF solisti1 ,
it_obj_txt TYPE STANDARD TABLE OF solisti1 ,
it_obj_rcv TYPE STANDARD TABLE OF somlreci1 ,
wa_obj_rcv TYPE somlreci1 ,
v_desc(100).
CONSTANTS: c_start(12) TYPE c VALUE '000000000000001',
c_num(12) TYPE c VALUE '000000000000002',
c_num1(12) TYPE c VALUE '000000000010030',
c_raw(3) TYPE c VALUE 'RAW',
c_test(4) TYPE c VALUE 'TEST',
c_X(1) TYPE c VALUE 'X'.
refresh internal tables
REFRESH : it_paklist, it_obj_rcv.
clear internal tables
CLEAR : it_paklist, it_obj_rcv, v_sender.
v_sender = sy-uname.
fill internal table it_paklist
wa_paklist-head_start = c_start.
wa_paklist-head_num = c_num.
wa_paklist-body_start = c_start.
wa_paklist-body_num = c_num1.
wa_paklist-obj_name = c_test .
wa_paklist-doc_type = c_raw .
wa_paklist-transf_bin = c_X .
APPEND wa_paklist TO it_paklist.
clear: wa_paklist.
Data in the Header/subject Line
v_desc = text-005 .
v_doc-obj_name = c_objname .
v_doc-obj_descr = v_desc.
Mail text
APPEND v_desc TO it_obj_txt.
Preparing the receiver list
wa_obj_rcv-rec_type = 'U'.
wa_obj_rcv-rec_type = 'C'.
v_dlist = 'SCE_TEST'.
wa_obj_rcv-receiver = v_dlist. "Distribution list.
wa_obj_rcv-receiver = Enter the mail id .
APPEND wa_obj_rcv TO it_obj_rcv.
Call the function module to send mail
IF NOT it_obj_rcv[] IS INITIAL.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = v_doc
sender_address = v_sender
sender_address_type = 'B'
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = it_paklist
object_header = it_obj_head
contents_bin = it_obj_bin
contents_txt = it_obj_txt
receivers = it_obj_rcv
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
IF sy-subrc NE 0.
MESSAGE text-006 TYPE 'I' .
ENDIF.
ENDIF .
Regards,
Raj.
‎2008 Apr 28 8:01 AM
check this blog..
/people/durairaj.athavanraja/blog/2005/07/12/send-sms-to-india-from-abap
Amit.
‎2008 Apr 28 9:43 AM
Hi Amit.
I simply copied the code from this thread & pasted it in se38 and execute it . but I do not get any SMS or email.
Shulld I do some configurations before this .
Please explain in details.
Thanks
SS
‎2008 Apr 30 4:53 AM
‎2008 Jun 23 4:41 PM
Hi!
I don't know if you resolve your problem, but if you want to send SMS when you prepare the receiver list the way the number is transfered is as follows:
receivers-receiver = '0...0 SMS Y...YX...X'.
receivers-rec_type = 'K'. " Pager/SMS
APPEND receivers.
X...X - Mobile phone's number
Y...Y - Country's code number
0...0 - You must write as 0 as numbers have the country code.
Example Spanish mobile phone:
Country code = 0034
Phone's number = 123456789
receivers-receiver = '0000 SMS 0034123456789'.
Regards,
Vande