Send SMS using CL_BCS fail

Hi
I have created a HTTP node in SCOT called SMS for sending SMS's to customers. In my program I use class CL_BCS to send the message. But the message is never sent. In SOST I see the error: Cannot process message, no route from <user> to <phone number>. I think the reason is that in SCOT (System Status) the messages are under PAG but not in my node 'SMS' as I expected but in W/o nodes. Any ideas why the message is not correct node?
CODE:
  CALL METHOD CL_BCS=>CREATE_PERSISTENT
    RECEIVING
      RESULT = lr_sms.
  CALL METHOD CL_DOCUMENT_BCS=>CREATE_DOCUMENT
    EXPORTING
      I_TYPE        = 'RAW'
      I_SUBJECT     = 'TEST'
      I_TEXT        = lt_text
    RECEIVING
      RESULT        = lr_document.
  l_sms_num = i_mobile.
  CALL METHOD CL_CAM_ADDRESS_BCS=>CREATE_SMS_ADDRESS
    EXPORTING
      I_SERVICE = 'SMS'
      I_NUMBER  = l_sms_num
    RECEIVING
      RESULT    = lr_rec
  CALL METHOD lr_sms->ADD_RECIPIENT
    EXPORTING
      I_RECIPIENT = lr_rec
      I_EXPRESS   = 'X'.
  CALL METHOD lr_sms->SET_DOCUMENT
    EXPORTING
      I_DOCUMENT = lr_document.
  CALL METHOD lr_SMS->SEND
    RECEIVING
      RESULT = l_bool.
I've made sure that settings in SA14 are maintained: Pager Service = SMS, USE = SMS Service

thank you for looking into this thread,
i have configured the in scot.
currently sending all RAW type as TXT. this has resolved my issues.

Similar Messages

  • Send mail using CL_BCS through function module, run in background task.

    Hi,
    I am running a function module in Background task. in this function module I am sending mail using CL_BCS class.
    but mail is not generated. if I run the same function Module in foreground mail generated successfully....
    can anyone please tell me the reason behind this.

    Hi i realise that The LIST_TO_ASCII thing is not working correctly in background because the the list-processing in beckground is working not the same as in dialog i think.
    I can only get the last page of the list out when running in background. Any solution to this?
    my code:
        CALL FUNCTION 'LIST_TO_ASCI'
             EXPORTING
                  list_index         = sy-lsind
             TABLES
                 list_dyn_ascii = downtab
             EXCEPTIONS
                  empty_list         = 1
                  list_index_invalid = 2
                  OTHERS             = 3.
        IF sy-subrc NE 0.
          EXIT.
        ENDIF.
    Thanks ,
    LH

  • Want to send sms using java

    I am developing a stand alone application in java that contains sending sms to certain numbers.
    I want to send sms using java and my phone connected to my pc by usb cable(Not through Bluetooth).
    I am using Linux operating system (Arch linux).
    I tried a few libraries that uses the the online sms portals,but for some reasons i dont want to pay those sites.(just want it to be done using my simcard cause its economical).
    Help appreciated

    880667 wrote:
    I am developing a stand alone application in java that contains sending sms to certain numbers.
    I want to send sms using java and my phone connected to my pc by usb cable(Not through Bluetooth).
    I am using Linux operating system (Arch linux).
    I tried a few libraries that uses the the online sms portals,but for some reasons i dont want to pay those sites.(just want it to be done using my simcard cause its economical).
    Help appreciatede First thing you need to check: are you able to access other services my connecting you mobile by USB to machine (Line GPRS, calling). Because it requires the calling or SMS port access. And you said it is economical by sending SMS using mobile it depends. But most of the times, it is better to use the SMS service provider getway. They provide the details either http or FTP, we just need to put or message in the accepitng form, rest of the things are done by the service provide.

  • Sending SMS using PL/SQL

    hello friends..
    i want to send sms using pl/sql.. so i tried send_email procedure..
    but how to find Mobile Address:- to send email(sms) ?
    [email protected] - how to find domain name
    can any one help me..
    Thanks
    PROCEDURE SEND_EMAIL(pFmUser IN VARCHAR2,
    pToUser IN VARCHAR2,
    pSubject IN VARCHAR2 DEFAULT NULL,
    pBody IN VARCHAR2 DEFAULT NULL) IS
    SenderName VARCHAR2(50);
    SenderAddress Varchar2(200); -- := '<[email protected]>';
    vToReceivers varchar2(200);
    EmailServer varchar2(200); --:= 'smtp_server';
    ServerPort NUMBER:=25;
    UserName VARCHAR2(200);
    UserPass VARCHAR2(200);
    conn UTL_SMTP.CONNECTION;
    crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
    mesg VARCHAR2( 4000 );
    mesg_body varchar2(4000);
    vCount NUMBER:=0;
    vNextPos NUMBER:=0;
    vStr NUMBER:=0;
    vPos NUMBER;
    vChk NUMBER;
    pToList VARCHAR2(4000);
    BEGIN
    conn:= utl_smtp.open_connection( EmailServer, ServerPort);
    utl_smtp.ehlo(conn,EmailServer);
    --utl_smtp.helo( conn, EmailServer );
    utl_smtp.command( conn, 'AUTH LOGIN');
    utl_smtp.command( conn, utl_raw.cast_to_varchar2( utl_encode.base64_encode( utl_raw.cast_to_raw( UserName ))) );
    utl_smtp.command( conn, utl_raw.cast_to_varchar2( utl_encode.base64_encode( utl_raw.cast_to_raw( UserPass ))) );
    utl_smtp.mail( conn, SenderAddress);
    utl_smtp.rcpt( conn, pToList);
    mesg:=
    'Date: '||TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss' )|| crlf ||
    'From: "'||SenderName||'" '||SenderAddress|| crlf ||
    'Subject: '||pSubject|| crlf ||
    'To: '||pToList|| crlf||
    pBody||crlf||crlf;
    utl_smtp.data( conn, mesg );
    utl_smtp.quit( conn );
    EXCEPTION
    WHEN OTHERS THEN RAISE_APPLICATION_ERROR(-20001,SQLERRM);
    END;

    user10502250 wrote:
    i want to send sms using pl/sql.. so i tried send_email procedure..
    but how to find Mobile Address:- to send email(sms) ?
    [email protected] - how to find domain name
    Exactly. You cannot simply send a SMS as an e-mail. The mail (SMTP) server needs to have a plug-in of sorts that enables it to forward a specially formatted e-mail it receives as an SMS.
    More then a decade ago, some cellular providers provided such mail servers - allowing you to specify the cellular number as either the recipient address or as the e-mail subject, with the body containing the actual SMS message.
    Due to this feature being abused and the cost of SMS transport being unrecoverable, this (as a public feature) has long since been discontinued by most, if not all, cellular network providers.
    So no, there is no magic domain(s) you can use to (spam) mobile numbers with SMS.
    If you want a SMS solution, you need to talk to a cellular provider about the products they have for 3rd party SMS integration.
    Alternatively, you need to use a dedicated cellphone, hooked up via USB/Bluetooth to a server, and use that as your SMS transport mechanism.

  • I cannot send sms using TC65 modem

    I wrote test program to send sms. When program tryig to open conection(MessageConnection), he catches ConnectionNotFoundException (null):
    String url = "sms://+37256844491";
    MessageConnection mc = (MessageConnection)Connector.open(url);
    Does anybody can help me?

    I need to make communication via sms between phone and modem. It is not good if these sms messages will be stored in memory of a mobile phone or modem. For this i need to recieve and transmit these messages using current sms port, then i'll be able to intercept them and they will not be stored in memory of a mobile phone or modem.
    If modem supports this kind of sms sending - via GPRS connection. Why i cannot use wma classes, which give me the opportunity to send sms using their methods? It is something unreal.
    Maybe problem in configuration of GPRS connection. I know that this configuration is made by "AT^SJNET" command. Example: AT^SJNET="gprs","*99***1#","internet","","",30. These settings are used by "(MessageConnection)connector"
    I configured many others settings at the modem using AT commands, which are need to connect to the Internet via GPRS.
    Maybe i don't know some nuances.
    I tried to connect to the Internet via GPRS connection from my PC and i got this connection. I tried to connect using AT commands and i did not get it.
    If i told something wrong, please correct me.
    Edited by: _denisjuk on Nov 17, 2007 4:18 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Cannot send sms using pc suite Ver 7

    Hi - i have updated to pc suite version 7 - every time i send an sms it says message failed. Everything else is working fine - it seems pc suite will not pick up any of my message folders. Can anyone help please??? I am using the sirocco 8800

    Hi malakhi75,
    I can send sms from phone, but not thruogh Nokia Communication Centre. It seems to be an issue
    also find similar issue in
    /discussions/board/message?board.id=pcsuite&thread.id=27461

  • Sending Email using cl_bcs from a badi implementation

    Hi,
    I have written my code to send Email, inside AFTER_SAVE method of BADI Implementation of DOCUMENT_MAIN01.
    Now this method of cl_bcs requires COMMIT WORK for the mail to be sent. And inside BADI implementation, we cannot write a COMMIT statement.
    What is a workaround for this? While going through few other posts, I came across remote enabled FMs.
    Is that the only way? Can I use some additions like STARTING NEW TASK etc. Following is the call used in case of cl_bcs:
       CALL METHOD G_REF_SEND_REQUEST->SEND(
              EXPORTING
                I_WITH_ERROR_SCREEN = 'X'
             RECEIVING
                RESULT              = G_SENT_TO_ALL ).
    I also tried using SO_NEW_DOCUMENT_SEND_API1 STARTING NEW TASK and it works fine. But the subject length is a constraint their.
    Please suggest.
    Thanks in advance.

    Hi friend.
    *& Report  ZTEST_273068_EMAIL_CL_BCS
    REPORT  ZTEST_273068_EMAIL_CL_BCS.
    CONSTANTS:
        gc_subject TYPE so_obj_des VALUE 'ABAP Email with CL_BCS',
        gc_raw     TYPE char03 VALUE 'RAW'.
      DATA:
        gv_mlrec         TYPE so_obj_nam,
        gv_sent_to_all   TYPE os_boolean,
        gv_email         TYPE adr6-smtp_addr,
        gv_subject       TYPE so_obj_des,
        gv_text          TYPE bcsy_text,
        gr_send_request  TYPE REF TO cl_bcs,
        gr_bcs_exception TYPE REF TO cx_bcs,
        gr_recipient     TYPE REF TO if_recipient_bcs,
        gr_sender        TYPE REF TO cl_sapuser_bcs,
        gr_document      TYPE REF TO cl_document_bcs.
      TRY.
          "Create send request
          gr_send_request = cl_bcs=>create_persistent( ).
          "Email FROM...
          gr_sender = cl_sapuser_bcs=>create( sy-uname ).
          "Add sender to send request
          CALL METHOD gr_send_request->set_sender
            EXPORTING
              i_sender = gr_sender.
          "Email TO...
          gv_email = '[email protected]'.
          gr_recipient = cl_cam_address_bcs=>create_internet_address( gv_email ).
          "Add recipient to send request
          CALL METHOD gr_send_request->add_recipient
            EXPORTING
              i_recipient = gr_recipient
              i_express   = 'X'.
          "Email BODY
          APPEND 'Hello world! My first ABAP email!' TO gv_text.
          gr_document = cl_document_bcs=>create_document(
                          i_type    = gc_raw
                          i_text    = gv_text
                          i_length  = '12'
                          i_subject = gc_subject ).
          "Add document to send request
          CALL METHOD gr_send_request->set_document( gr_document ).
          "Send email
          CALL METHOD gr_send_request->send(
            EXPORTING
              i_with_error_screen = 'X'
            RECEIVING
              result              = gv_sent_to_all ).
          IF gv_sent_to_all = 'X'.
            WRITE 'Email sent!'.
          ENDIF.
          "Commit to send email
          COMMIT WORK.
          "Exception handling
        CATCH cx_bcs INTO gr_bcs_exception.
          WRITE:
            'Error!',
            'Error type:',
            gr_bcs_exception->error_type.
      ENDTRY.
    Just Execute it.
    Regards,
    Thrimu

  • Sending email using CL_BCS in the background with subject line 255 chars

    Hello Gurus,
           Following is the sample code,. When I run in the foreground, I am getting the mail, with proper subject line. However my output medium type is '5-'External Send#. When I am trying to run this in my output program, it is resulting in dump.
           When I keep 'COMMIT WORK',  I am getting a dump saying tText * Invalid COMMIT WORK in an update function module.*
           When I remove this 'COMMIT WORK', I am still getting the error, saying Screen output without connection to user. (The current ABAP program "SAPLSTXC" statements could not be executed.)
          Hoping for a quick solution.
    Regards,
    Shaheen
    REPORT  Z_CL_BCS_TEST.
    * Trying classes
    DATA: send_request        TYPE REF TO cl_bcs.
    DATA: li_main_text        TYPE bcsy_text,
          lw_main_text        LIKE LINE OF li_main_text.
    DATA: document            TYPE REF TO cl_document_bcs.
    DATA: recipient           TYPE REF TO if_recipient_bcs.
    DATA: sender              TYPE REF TO if_sender_bcs.
    DATA: l_mtitle            LIKE sodocchgi1-obj_descr.
    DATA: sent_to_all         TYPE os_boolean.
    DATA: bcs_exception       TYPE REF TO cx_bcs.
    DATA: lv_sub TYPE string.
    TRY.
    *     -------- create persistent send request ------------------------
        send_request = cl_bcs=>create_persistent( ).
    *     -------- create and set document---------------
    *     Email title
        l_mtitle = 'attachment'.
        lv_sub = 'Email Title : I want to try for a subject which is more than 50 chars. will this work?'.
        CALL METHOD send_request->set_message_subject
          EXPORTING
            ip_subject = lv_sub.
    *     Fill the body of the mail
        REFRESH li_main_text.
        lw_main_text = 'This is test email'.
        APPEND lw_main_text TO li_main_text.
        CLEAR: lw_main_text.
        lw_main_text = 'Regards'.
        APPEND lw_main_text TO li_main_text.
        CLEAR: lw_main_text.
    *     Create Email Object
        document = cl_document_bcs=>create_document(
          i_type    = 'RAW'
          i_text    = li_main_text
          i_subject = l_mtitle ).
    *     Add document object to send request
        send_request->set_document( document ).
    *     add recipient (e-mail address)
        recipient =
            cl_cam_address_bcs=>create_internet_address(
                  'Shaheen.Taori at solvay.com' ).           " changed the email id purposefully
    *     Add recipient object to send request
        CALL METHOD send_request->add_recipient
          EXPORTING
            i_recipient = recipient
            i_express   = 'X'.
    *     ---------- send document ---------------------------------------
    *    sent_to_all = send_request->SEND_WITHOUT_DIALOG( I_WITH_ERROR_SCREEN = ' ').
        CALL METHOD send_request->SEND_WITHOUT_DIALOG.
    *      EXPORTING
    *        e_sent_to_all = 'X'.
    *    IF sent_to_all IS INITIAL.
    *      MESSAGE 'Erorr while sending email ' TYPE 'E'.
    *      EXIT.
    *    ENDIF.
          COMMIT WORK.
    *   exception handling
      CATCH cx_bcs INTO bcs_exception.
        MESSAGE i865(so) WITH bcs_exception->error_type.
    ENDTRY.

    Try using method SEND instead of SEND_WITHOUT_DIALOG.
    Also try calling method SET_SEND_IMMEDIATELY before calling method SEND.
    Use below code lines,
    send_request->set_send_immediately( i_send_immediately = 'X' ).
    sent_to_all = send_request->send( i_with_error_screen = 'X' ).   " Instead of CALL METHOD send_request->SEND_WITHOUT_DIALOG.

  • How to send SMS using java

    Dear All
    How we can send SMS(Short Message Service) to mobile phones using java.
    By Registering in some sites and using that user name and password we can send SMS.
    But after some limited SMS we have to pay for further use.
    I need some thing which we can use as free.
    Can any one help me
    Thanks in Advance

    The easiest way would be to send a regular email to a Email to SMS gateway.
    Check out the list of Email to SMS gateways at http://en.wikipedia.org/wiki/SMS_gateways

  • Sending SMS using mobile phone connection.

    Hi all,
    I want to develop a feature to send SMS from my java application by using mobile phone.
    I am new to java.
    tell me how to connect the mobile phone from my applicatio and how do i send the SMS.
    Hoping your help sooner....
    Thanks and regards,
    Suresh Dhandauthapani.

    Hi junaid,
    Thanx for the response...One more doubt....Is it possible to send sms from pc to mobile directly using the sms server without the intervention of a service provider?If yes plzzz suggest me the steps to establish such a setup.
    Once Again..Thanx in Advance...
    R.PRASATH KRISH...
    Message was edited by:
    RPRASATHKRISH

  • Send SMS Using Oracle Database Automatically

    Hi ALL:
    I want to send SMS from Oracle Database 9i automatically. Which reg. software can I use?

    Hello,
    Here is the Oracle Forms forum.
    You would have more chances to get answers by posting in the Database forum ;D
    Francois

  • Is it possible to send sms using java ?

    dear all ,
    I am doing one project . In which i want to send sms to mobile phone using java
    Any one knows please help me immediately ......
    I want this one to be immediately ...
    Thank you

    The answer's right here...
    http://www.java-answers.com/index.php?topic=12.0

  • Is it possible to send sms using N-GAGE -qd?

    Hello Friends,
    If we want to send sms, we have to register our sms connection using "PushRegistery", so that AMS can take care of this connection. but there is no PushRegistery api in MIDP1.0 that n-gage needs.
    so what is the way for N-GAGE-QD/MIDP1.0.
    Is there any alternative for PushRegistery?

    Hello Friends,
    If we want to send sms,
    we have to register our sms connection using
    "PushRegistery", so that AMS can take care of this
    connection. but there is no PushRegistery api in
    MIDP1.0 that n-gage needs.why do you need to register connection? is it specific to N-Gage?
    so what is the way for
    N-GAGE-QD/MIDP1.0.
    Is there any alternative
    for PushRegistery?use RMS...

  • Code to send sms using j2ee application

    Hi all,
    this is shashi kant,
    plz send me the code to sent a sms using j2ee applications.
    or tell me the api these are used to  develop this kind of application.
    thanks
    my email id is---- [email protected]

    I'm working on a project to send SMS from a MIDlet
    to a servlet and back to the MIDlet through a
    SMSC.can anybody send a sample code for me to get
    help ?you should have a sms server .
    your MIDlet send the parameters to the servlet (mobile phone, message, ..) and, after, the servlet send a request to the sms center and he send to the mobile number the message !
    good luck

  • [Newbie] Can I send sms using J2ME WT ?

    Hi,
    i need to write a midlet (midp 1.0) able to send sms.
    (for Nokia midp1.0 phone)
    Using Wireless Toolkit can I do it?
    Or, as i think, i need anyway a midp 2.0 phone?
    Thanks for answer
    and sorry if this is an old answer
    Matteo

    thanks for answer.
    if i well understand, i cant add WMA package in my project to build an application that will work on phone not supporting wma ...i need that phone support s WMA in own hardware..
    and Nokia SMS API ?
    Can i use it on all j2me phone? Or i need that SMS Api are inside phone?
    is truth ?

Maybe you are looking for