Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9159

Re: If i created Purchase order in SAP BP then i want to send a SMS

$
0
0

Hi,

Fisrt you need a SMS provider with a username and password, once you purchased or free registerd with any provider, you will get link and a template(structure of message). Use the below code to send SMS while adding the order..

 

 

private void SapApplication_FormDataEvent(ref SAPbouiCOM.BusinessObjectInfo BoInfo, out bool BubbleEvent)

        {

            BubbleEvent = true;

            SAPbouiCOM.BoEventTypes EventEnum = 0;

            EventEnum = BoInfo.EventType;

            if (BoInfo.FormTypeEx == "142" & EventEnum == SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD & BoInfo.BeforeAction == false & BoInfo.ActionSuccess == true)

            {

                try

                {

                        string msg = CardName + " " + "Bill No." + BillNo + " " + "dated " + InvDate + " " + "Qty." + Quantity + " boxes" + " Amt." + DocTotal + " issued.";

                        System.Net.WebRequest wr = System.Net.HttpWebRequest.Create("LINK FOR SENDING SMS -CONCATENATE THE MESSAGE HERE");

                        HttpWebResponse response = (HttpWebResponse)wr.GetResponse();

                        System.IO.StreamReader reader = new System.IO.StreamReader(response.GetResponseStream(), System.Text.Encoding.UTF8);

                        string strResult = reader.ReadToEnd();

                        reader.Close();

                        Global.SapApplication.StatusBar.SetText("SMS Send Successfully", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success);

                }

                catch (Exception e)

                {

                    Global.SapApplication.MessageBox(e.Message, 1, "Ok", "", "");

                }

            }

        }

 

 

Thanks

Vibin


Viewing all articles
Browse latest Browse all 9159

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>