New line problem in sending sms through SAP

Hi all,
I need to send sms through sap. I have a code working fine.
constants: c_tab type c value cl_abap_char_utilities=>NEWLINE.
concatenate 'Sales INFO-' date3  into line1 separated by space.
  move 'Order Input' to line2.
  concatenate 'Day: Rs.' day_oamt   into line3 separated by space.
  concatenate 'MTH: Rs.' month_oamt into line4 separated by space.
  concatenate 'YTD: Rs.' yord       into line5 separated by space.
  move 'Billing' to line6.
  concatenate 'Day: Rs.' day_bamt   into line7 separated by space.
  concatenate 'MTH: Rs.' month_bamt into line8 separated by space.
  concatenate 'YTD: Rs.' ybill      into line9 separated by space.
concatenate line1 line2 line3 line4 line5 line6 line7 line8 line9 into text separated by C_TAB
concatenate '+91' m_no+len(10) into m_no.
'http://************************************='
  M_NO
  '&msg='
   text
    '&************************************************=text'
   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( ).
I am able to send the message but it gets displayed in one line.
SALES INFO- <dd.mm.yyyy> Order Input DAY: Rs.123 MTH: Rs.123 YTD: Rs.123 Billing DAY: Rs.123 MTH: Rs.123 YTD: Rs.123
What I need to do is this.
SALES INFO- <dd.mm.yyyy>
Order Input
DAY: Rs.123
MTH: Rs.123
YTD: Rs.123
Billing
DAY: Rs.123
MTH: Rs.123
YTD: Rs.123

Have you tried with line feed?
i.e.
instead of:
constants: c_tab type c value cl_abap_char_utilities=>NEWLINE.
try:
constants: c_tab type c value cl_abap_char_utilities=>CR_LF.

Similar Messages

  • How to Send SMS through SAP?

    Hello friends,
                      I got know tht Function module SO_OBJECT_SEND is used to send SMS to customer after inquiry is created. Here in receivers pass the values as mobilenumber "at"domain.com/org etc....but i am not getting the correct information an anyone share me the procedure for triggering SMS?
    Thks points will be rewarded for helpful answer.

    Hi Venkateswar,
    As i already tld u have to pass same parameters which we will pass for mail sending. U can get plenty of sample codes for mail sending in SDN itself. Only difference is data of receivers parameter. Check below code.
          SELECT SINGLE cell_carr_string
          FROM zcarrier
          INTO w_carr
          WHERE zcarrier EQ wa_zsent-cell_carrier.
          IF sy-subrc EQ 0.
            REFRESH i_rec[].
            CONCATENATE wa_zsent-cell_number
                                    w_carr  INTO w_email.
    i_rec-receiver = w_email.*
    i_rec-rec_type = 'U'.              "internet*
            APPEND i_rec.
    ENDIF.
              CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
                EXPORTING
                  document_data                    = doc_chng
               document_type                    = 'RAW'
                TABLES
               object_content                   = objcont
                  receivers                        = i_rec
             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
    Thanks,
    Vinod.

  • Send SMS through GSM modem

    Hello,
    We have a requirement of sending SMS after PGI . Could anybody please help me on how to use GSM Modem to send SMS through SAP?

    Hey, I can give you another tip. I am using a very reliable integration program. Its name is Ozeki NG SMS Gateway. I hope they dont cut my tip out, because this software is very useful and stable. You are also able to add this message sending function to different clients for example HP Openview or Sharepoint etc.
    Sorry again, I did not intend to advertise or something like that.
    http://www.sms-integration.com/
    Have a nice day
    Jozef

  • How to send sms through java program?

    hi,
    i am trying to send sms through java program.i am usining ubuntu 6.04.i am using modem MC35i.i use the jSMSEnjine.jar and rxtxcomm.jar.
    these are the following program.
    import org.jsmsengine.*;
    import java.util.*;
    class SendMessage
         public static void main(String[] args)
              int status;
              // Create jSMSEngine service.
         CService srv = new CService("Com2",9600);
              //CService srv = new CService("COM2",9600);
              System.out.println();
              System.out.println("SendMessage(): sample application.");
              System.out.println(" Using " + srv._name + " " + srv._version);
              System.out.println();
              try
                   //     Initialize service.     
                   srv.initialize();
                   Thread thread =Thread.currentThread();
                   thread.sleep(1000);
                   System.out.println(srv);
                   //     Set the cache directory.
                   srv.setCacheDir(".\\");
                   //     Set the phonebook.
                   //     srv.setPhoneBook("../misc/phonebook.xml");
                   //     Connect to GSM device.
                   status = srv.connect();
                   //     Did we connect ok?
                   int st=CService.ERR_OK;
                   System.out.println(st);
                   System.out.println(status);
                   if (status == CService.ERR_OK)
                        //     Set the operation mode to PDU - default is ASCII.
                        srv.setOperationMode(CService.MODE_PDU);
                        // Set the SMSC number (set to default).
                        srv.setSmscNumber("");
                        //     Print out GSM device info...
                        System.out.println("Mobile Device Information: ");
                        System.out.println("     Manufacturer : " + srv.getDeviceInfo().getManufacturer());
                        System.out.println("     Model : " + srv.getDeviceInfo().getModel());
                        System.out.println("     Serial No : " + srv.getDeviceInfo().getSerialNo());
                        System.out.println("     IMSI : " + srv.getDeviceInfo().getImsi());
                        System.out.println("     S/W Version : " + srv.getDeviceInfo().getSwVersion());
                        System.out.println("     Battery Level : " + srv.getDeviceInfo().getBatteryLevel() + "%");
                        System.out.println("     Signal Level : " + srv.getDeviceInfo().getSignalLevel() + "%");
                        //     Create a COutgoingMessage object and dispatch it.
                        //     *** Please update the phone number with one of your choice ***
    // String smsLengthTest="Hi"+"\nTesting is going on.Test for sending unlimited number of charecter.So you will get N number of SMS.Initially I trancate the whole string by 70 charecter.Later I will put it upto 90 charecter.Some chararecter should kept for header portion.I don't know the total number.It is just test.If you got the sms u should appreciate me...This is Ripon...I have written sms program";
    String smsLengthTest="Hi\n"+"This is Govindo";
    int mao=smsLengthTest.length();
    System.out.println("Length of sms :"+mao);
    String smsNo="9433314095";
    smsNo="+91"+smsNo;
    if(mao<70)
    COutgoingMessage msg = new COutgoingMessage(smsNo,smsLengthTest);
    //     Character set is 7bit by default - lets make it UNICODE :)
    //     We can do this, because we are in PDU mode (look at line 63). When in ASCII mode,
    //          this does not make ANY difference...
    msg.setMessageEncoding(CMessage.MESSAGE_ENCODING_UNICODE);
    if (srv.sendMessage(msg) == CService.ERR_OK) System.out.println("Message Sent!");
    else System.out.println("Message Failed!");
    else
    // COutgoingMessage msg = new COutgoingMessage(smsNo,smsLengthTest);
    // LinkedList messageList;
    // messageList = new LinkedList();
    // messageList.add(msg);
    // LinkedList maooo=new LinkedList();
    // maooo=srv.splitLargeMessages(messageList);
    int sizelength=0;
    int counter=0;
    sizelength=smsLengthTest.length();
    System.out.println("SMS length :"+sizelength);
    int smsCntr=sizelength/70;
    System.out.println("smsCntr :"+smsCntr);
    counter=smsCntr+1;
    int j=70;
    int k=0;
    try
    for(int i=0;i<smsCntr;i++)
    String test="";
    test=test+i;
    test=smsLengthTest.substring(k,j);
    System.out.println(test);
    System.out.println(test.length());
    COutgoingMessage msg = new COutgoingMessage(smsNo, test);
    System.out.println("hi this is suman" + smsNo);
    //     Character set is 7bit by default - lets make it UNICODE :)
    //     We can do this, because we are in PDU mode (look at line 63). When in ASCII mode,
    //          this does not make ANY difference...
    msg.setMessageEncoding(CMessage.MESSAGE_ENCODING_UNICODE);
    if (srv.sendMessage(msg) == CService.ERR_OK) System.out.println("Message Sent!");
    else System.out.println("Message Failed!");
    k=k+70;
    j=j+70;
    catch(Exception e)
    System.out.println("Error...1");
    e.printStackTrace();
    e.getMessage();
    String lastPortion=smsLengthTest.substring(k);
    System.out.println(lastPortion);
    COutgoingMessage msg = new COutgoingMessage(smsNo, lastPortion);
    //     Character set is 7bit by default - lets make it UNICODE :)
    //     We can do this, because we are in PDU mode (look at line 63). When in ASCII mode,
    //          this does not make ANY difference...
    msg.setMessageEncoding(CMessage.MESSAGE_ENCODING_UNICODE);
    if (srv.sendMessage(msg) == CService.ERR_OK) System.out.println("Message Sent!");
    else System.out.println("Message Failed!");
                        // Disconnect from GSM device.
                        srv.disconnect();
                   else System.out.println("Connection to mobile failed, error: " + status);
              catch (Exception e)
                   e.printStackTrace();
              System.exit(0);
    the error is:
    SendMessage(): sample application.
    Using jSMSEngine API 1.2.6 (B1)
    org.jsmsengine.CService@addbf1
    0
    -101
    Connection to mobile failed, error: -101
    please help me,its very urgent.

    come back in about 5 years, we may have time for you by then.
    In the meantime, how about contacting the people who wrote that library and asking them nicely for help (rather than trying to order people to drop whatever they're doing and jump through hoops to accommodate your every wish as you're doing here)?

  • SMS through SAP ABAP program

    Hello Guys..
    I am creating a program which is basically alert program. As per the requirement if delivery is pending as on date , a SMS need to send the sales guys.
    is there any  stranded function for that, which help me ragarding the same. Mobile no of all are maintain in z table..
    Regards
    Swati....

    Hello,
    please check this:
    http://help.sap.com/saphelp_nw04/helpdata/en/58/97c43af280463ee10000000a114084/frameset.htm
    Re: SMS through SAP
    /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
    /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
    Re: SMS through SAP
    Reagrds,
    Beejal
    **Reward if this helps

  • SMS through SAP ABAP in ECC 6.0

    hi
    i want to send the SMS through SAP ABAP,for that I need any FM or any other thing.
    currenlty user send SMS through the TCODE SO01,but i want to do it through abap code.
    please tell me is there any FM exits in SAP to do this,or any other code i have to write.
    regds
    vipin

    Hi Vipin,
    Just check if the
    FM - SO_DYNP_SHORT_MESSAGE
            SO_NEW_DOCUMENT_ATT_SEND_API1
    is useful for you.
    If helpful award points
    Regards,
    Vivek
    I think the below FM would be more helpful, check -
    1. SO_DOCUMENT_SEND_API1
    2. SO_DOCUMENT_SEND_API1_NEW
    Edited by: Vivek on Feb 7, 2009 2:57 PM

  • Which Mobile Networks Operator could be used to send SMS through SKYPE in China?

    Which Mobile Networks Operator could be used to send SMS through SKYPE in China?

    I actually found a workable solution, based off of your suggestion.
    Sprint has partnered with Google to integrate native Google Voice onto the iPhone, using your existing Sprint phone number, for free. The only downside is, you loose visual voicemail. But, you can set Google Voice to transcribe my voicemails and send them via email, which I hear can be quite funny when it gets it wrong.
    But, not being a fan of Google's "all or nothing" approach, where they take over all your sms, voicemail, and calls, I opted to set up a free account and use Google Hangouts app to make outgoing calls. Using it this way, with out applying for a Google Voice number, or switching  my Sprint number over to Google, the caller ID just says "No Caller ID", which is ideal, since having an additional phone number pop up, might lead to confusion as to which one to use to contact me.
    So, thanks for pointing me  in  the right direction.  It's not perfect, as I imagine many friends will kick me over to voicemail when the see "no caller ID" pop up on  their phones, but it'll get the job done.
    Problem solved.

  • Sending SMS from SAP

    Hi Experts,
    I have requirement where i need to send SMS to the client whenever their request has been responded.
    For Ex: If the user requesting for some upgrade from the current Plan of their mobile.(From Prepaid to Postpaid)
    if request has been responded they should be intimated through SMS from SAP.
    Is there any interface for that?
    Kindly throw some light on this issue.
    Higher points will be rewarded for useful inputs
    Thanks in Advance,
    Dharani

    Please check these links:
    SMS through SAP
    https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/thread.jspa%3FforumID%3D50%26threadID%3D15685%26messageID%3D120429%23120429
    Sending SMS from SAP
    SMS from ABAP
    sending SMS
    If you can afford searching the forum, you can find many more threads on the same topic.
    Hope this helps.
    Kind Regards
    Eswar

  • Problem in sending SMS?????????

    hi all,
    i have problem in sending sms using wma.its arises exception about "port format", whats the problem is???? anybody help me??

    firstway
    Please be clear on this. I have not accused you or anyone else of being dishonest. I have merely stated a point of fact, that sending a mail to an unknown recipient is not good policy.
    Forums are anyhow meant for open discussion, not as a gateway to private communication.
    No offence, but my daily schedule is just busy enough to make me not want to engage in Yahoo! or any other chat.
    All the best, Darryl
    ** Did you notice the starting date of this thread?

  • Problem in sending mail through dynamics actions

    Hi Friends,
    I have a problem in sending mail through dynamics actions . In this  we pass a subroutine in dynamics actions which send an mail when promotion action occured.
    Problem is that sometimes it will  send an mail or sometimes not. I have no idea to solve this problem.
    Can anyone suggest me .
    Thanks ,
    Anish
    Moderator message : Duplicate post locked.
    Edited by: Vinod Kumar on Sep 5, 2011 9:45 AM

    Hi,
    Check that all the bindings have been done in proper way as it is configured.. Try to do the binding manualy..This could also be the problem..
    thank You

  • Problem with sending sms - nokia x3

    Hello,
    I've got a problem with sending sms in my nokia x3 - actually with recently used number. I sent messages, but the list is the same. There is only one number although I used many more. I removed this number from the list, but is still here. I also tried to turn off the phone and pull out the battery, restart factory setting but there's no change.
    Could somebody help me, please?
    p.s. Sorry, but my english isn't well. I hope the post is understood

    Check if there is any relation with the LOG... When you clear the log.. (selecting ALL).. is it removing details from the RECENTLY USED too...
    To confirm this select Clear Log.. and check if that one no. you are talking about still remains or not.. If its no more there means you must have cleared the log just before using the last no. that is appearing..
    --------------------------------------------------​--------------------------------------------------​--------------------------------------------------​--If you find this helpful, pl. hit the White Star in Green Box...

  • What are the steps for sending SMS through IMS5.1

    I have IMS 5.1 solaris version and I want to send SMS through this Messaging server, Is there any need for the gateway/any other server/requirements for accomplishing this?

    iPlanet Messaging Server 5.2 supports one-way email to an SMS gateway.For SMS channel configuration please refer to
    http://docs.iplanet.com/docs/manuals/messaging/technotes/5.2sms.html

  • Force a new line when editing a SMS

    Does anybody know how I can force a new line when editing a SMS for instance,
    Starting the SMS with:
    Dear xxx
    Now I start editing the SMS on a new line....
    Solved!
    Go to Solution.

    Press the 0 button 3x times quickly usually works for me.
    S.
    History: Motorola MR30, Nokia: 7110, 7650, N70, N80, N82, X6 (32GB), Samsung Galaxy SII
    Current: Samsung Galaxy Note3 Black

  • Is it possible to send SMS through java

    Hi all
    I m a student and as a part of my project I need to create an SMS server(SMS gateway). Can we send SMS through Java and if yes then send me the code for the same . Also on which GSM Modem will it Work , I've heard about Nokia GSM Modem N32. Kindly Guide me regarding the Same.
    Regards
    MoComp

    Hi all
    I m a student and as a part of my project I need to
    create an SMS server(SMS gateway). Can we send SMSSo YOU need to write it.
    through Java and if yes then send me the code for theIt's possible, as there are several commercial offerings out there.
    But as YOU need to write it it won't do for you to try and trick someone else into writing it so you can submit it as your own.
    same . Also on which GSM Modem will it Work , I've
    heard about Nokia GSM Modem N32. Kindly Guide me
    regarding the Same.All depends on how you implement it.
    A real server would have its own hardware and software to pipe directly into the network of a telco, and a contract with that telco to use their network to send messages.

  • SMS through SAP B1

    Can someone help me in SDK codes for sending SMS from SAP B1.
    Can i get the sample source code for the same.
    I also want to know can i use the SMS Message dynamically.
    Thanks & Regards
    Shiv

    Hi,
    As Told by arun, U need to get the details from an SMS service provider.
    The general logic is, The SMS provider would be providing u with a API which u need to use in your application, in turn the API would contact the SMS webserver and send the SMS.
    Let me know if u require details of an SMS service provider.
    Hope it helps,
    Vasu Natari.

Maybe you are looking for

  • Acrobat increases size of file when no text is present

    I an using Acrobat 9.  I have a certificate returned from the printers and the size is 115Kb.  I have put 8 lines of text on the entire document and the email size increase to 2985 Kb - no images or pictures in my text.  If I remove all the text and

  • How can I get Apple to give me an activation key for QT Pro that works?

    Stopping at the Genius Bar last night, they suggested I upgrade my QT Viewer to Pro so I could move some of my digital video over to my iPone. I followed the purchase/download instructions and after putting in the activation code, I was NOT redirecte

  • Flash Builder 4.5 for PHP Licensing with CS5 Subscription

    its unclear to me if we subscribe to CS5 Master Collection or Web Premium, but want the PHP edition how you go about that, can the upgrade be part of the subscription, if not can the subscription builder be upgraded?

  • Item search based on decision point status

    hi, i am trying add items to a review.  i want to add only those items which are in a particular status of a decision point.  Currently, i could not find any option in Add-> search when i am in review screen.  Can there be any configuration through w

  • FileVault 2 - Safe for SSD?

    Hi, Is it safe to use FileVault 2 on an SSD that has been installed after purchase, not an SSD that came with the MacBook? Can FileVault be undone if the performance is no good? Thanks.