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: 

How to send a mailt to cell pone number or pager

Former Member
0 Kudos

Hi,

Here we are running several jobs a day and we would like to send a mail or information to cell phone number or pager when the job is failed.

Is any body have any idea how do we send a mail to Cell number or Pager. If any body knows please advice me ASAP..as it is kind of urgent requirement which is to be fixed immediately.

Thanks alottt in advance

-Srisa

17 REPLIES 17

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

I have done this in the past. All you need to do is know the address for the phone or pager. Usually the text messaging is set up as an email address. This is how it was in my case. I used the program below as a test, entered the appriopriate mail address, and my phone was ringing the next minute.




report zrich_0003 .

data: maildata type sodocchgi1.
data: mailtxt  type table of solisti1 with header line.
data: mailrec  type table of somlrec90 with header line.

start-of-selection.

  clear:    maildata, mailtxt,  mailrec.
  refresh:  mailtxt, mailrec.

  maildata-obj_name = 'TEST'.
  maildata-obj_descr = 'Test'.
  maildata-obj_langu = sy-langu.

  mailtxt-line = 'This is a test'.
  append mailtxt.

  mailrec-receiver = 'yournumber@yourcellularprovider.com'.
  mailrec-rec_type  = 'U'.
  append mailrec.


    call function 'SO_NEW_DOCUMENT_SEND_API1'
         exporting
              document_data              = maildata
              document_type              = 'RAW'
              put_in_outbox              = 'X'
         tables
              object_header              = mailtxt
              object_content             = mailtxt
              receivers                  = mailrec
         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.

Regards,

Rich Heilman

0 Kudos

Hi Rich,

This is really useful. can you advise me, do we need to use it in the application or else when exactly it will get triggered? Or, do we need to schedule this job seperaly?

shylesh

0 Kudos

It really depends on what the process is, you can put this code in the application itself, but you have to know when to fire it. You can't really schedule this program as is, as it really won't help you out. This program is just an example of how to send an email to a email address.

What exactly is the process.

Regards,

Rich Heilman

0 Kudos

I have written a program in the past that looks at abended jobs and sends an email to specific people, you can enter the jobs that you want to look at on the selection screen and you can enter the recipients in the selection screen as well, all you need to do is supply the job names and the email address(text messaging addresses) Are you interested, if so, please email me at the address on my business card and I will send you the program code.

Regards,

Rich Heilman

0 Kudos

Hi Rich,

Since, i din't created this post, i don't know how to award the points for this, (let me know if there is a way).

Presently i am not developing any application on this but i love to watch this forum and keep a track of information which may really useful or to increase my skills.

shylesh

0 Kudos

Oh yes, sorry. I usually notice other posters, but I missed it this time. If you are interested in the program, you may email me.

Regards,

Rich Heilman

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Arnab, please test out my sample above or you can email me and I can send you our program that we are currently using to notify us of any batch jobs that abend abnormally. It does send text messageing to phones and emails.

Please make sure award points for helpful answers and makr your posts as solved when solved completely. Thanks.

Regards,

Rich Heilman

0 Kudos

Hi Rich,

Thanks alot for sending me the code but unfortunately i am not able to test it properly.

actually i have verizonwireless cell phone so i have just added this line

mailrec-receiver = '7327108486@verizonwireless.com'.

but i am not getting any message or call to my cell phone, would you please suggest me am i supposed to change any settings or any thing to make this program work.

I really appreciate your help, but please do send me the complete code or any settins if at all we need to do...

Sorry for replying you late cause i was totally fed up in the meeting since morning to till now.

Please reply me ASAP.

Thanks alot in advance.

-Arnab

0 Kudos

Hi arnab, I use verizon wireless as well, I have tested this example program with my address and it works good. You will need to use your number and @vtext.com.

7175555555@vtext.com

Also, the email server must be configured in SCOT.

P.S. There's nothing worse then an all day meeting when you are trying to get something working.

Regards,

Rich Heilman

0 Kudos

Hi Rich,

i tried changing mailrec-receiver = 7327108486@vtext.com

as per your suggestion, but it didnot work for me.

i guess i have to check whether the email server must be configured SCOT or not.

i am not sure about it where do i need to ceck this?.

0 Kudos

Go to transaction SCOT. There should be something configured under INT. Your basis team should be able to take care of this.

Regards,

Rich Heilman

0 Kudos

IF it is configured, you still may need to force the "Send" process, put you cursor on the number(if its working, you should see a number other than 0 under INT) and hit F8, you will get a dialog, enter INT. This will "Send" the mail.

REgards,

Rich Heilman

0 Kudos

Hi Rich,

I have checked in SCOT , it is showing as all ZEROES only in INT as shown below..so it is not configured right.

is there any i can do it without basis guys help.

Sorry to trouble you with silly questions. please suggest me.

INT 0 0 0 0 0:00 0:00

NODE1 0 0 0 0:00 0:00

SMTP 0 0 0 0:00 0:00

0 Kudos

I don't know the config as it needs to be tied to an email server like MS exchange. I would talk to your basis people about setting up the SAPconnect. Once it is setup, your program will work.

If you found any of these answers helpful, please make sure to award points to them. Also, make sure to mark as solved when solved completely. Thanks.

Regards,

Rich Heilman

Former Member
0 Kudos

Hi Rich,

We are trying to do the same, send pager to people,or text message to mobile if , load fails, and can you tell me what kind of confuguration I will ask my basis to do , in SCOT , so that I can get messages in my Tmobile.

Great post.Thanks.

Tina

0 Kudos

Hi Tina. You basis people need to configure for your email server. Really, all a text message to cell phone is; is an email. If your system is configured to work with your email server, it is just like sending an email. You can test this with your regular email inbox. Send an email to your tmoble text messaging address. This is usually your cell phone number @ domain.com. Here the domain will be tmobiles domain used for text messaging.

Regards,

Rich Heilman

0 Kudos

Did not know , paging or texting is as simple as this.

Thanks a ton!!

PS: Wish I could award points