Académique Documents
Professionnel Documents
Culture Documents
HI All ,
Here i am sharing the procedure/configuration to send the message from SAP .
Go to T-code SCOT
You will see screen like this
Keep password this field blank as we have provided the same in URL itself
In Log-on tab provide user name and password for same client
Click on HANDLER List tab and provide the handler as shown below
Provide detail
Pager serv : SMS
Pager service : SMS
Use : SMS Service
Composing a SMS
Go to T-code SBWP
To monitor the process go to T-code SCOT here you can see 1 in waiting as we have given time
for 2 minutes it will send the message after 2 min only
That's all now you can check you mobile phone for Message :)
METHOD send_sms.
DATA: send_request
DATA: text
DATA:
DATA:
DATA:
DATA:
DATA:
DATA:
document
sender
recipient
bcs_exception
sent_to_all
lp_sms_num
lv_senderid
TRY.
-------- create persistent send request -----------------------send_request = cl_bcs=>create_persistent( ).
*
*
-------- create and set document ------------------------------create document from internal table with text
APPEND i_sms_body TO text.
document = cl_document_bcs=>create_document(
i_type
= 'RAW'
i_text
= text
i_length = '12'
i_subject = '' ).
*
*
*
sender =
TRY.
cl_cam_address_bcs=>create_internet_address(
i_address_string = 'sap@chemnaol.com'
i_address_name
= lv_senderid
"'SAP-MM'
i_incl_sapuser
=
).
CATCH cx_address_bcs .
ENDTRY.
RESULT
IF sent_to_all = 'X'.
= sent_to_all ).
ENDIF.
COMMIT WORK.
CATCH cx_bcs INTO bcs_exception.
RAISE sms_sending_failed.
EXIT.
ENDTRY.
ENDMETHOD.
3.Then Call the method wherever you want.
zcl_send=>send_sms(
EXPORTING
*
i_sender_id
= 'CHEMANOL'
i_sms_body
=
i_sms_to
=
*
EXCEPTIONS
*
sms_sending_failed = 1
*
others
= 2
).
IF sy-subrc <> 0.
*
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.