Skip to Content
author's profile photo Former Member
Former Member

Function Module

Is there any FM that sends messgaes to distribution List of the Users(not to Individual Receipients) ..

Thanks

Vicky

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 03, 2006 at 03:52 PM

    You can use the FM <b>'SO_NEW_DOCUMENT_ATT_SEND_API1'</b>.

    Check the below code, it will send mail to the distribution list.

    DATA: lws_docdata LIKE sodocchgi1,

    li_objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,

    li_objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,

    li_objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,

    li_objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,

    li_objhex LIKE solix OCCURS 10 WITH HEADER LINE,

    li_reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.

    DATA: lws_tab_lines TYPE i,

    lws_doc_size TYPE i,

    lws_att_type LIKE soodk-objtp.

    CLEAR: lws_docdata, li_objpack, li_objhead, li_objtxt, li_objbin,

    li_objhex, li_reclist, lws_tab_lines, lws_doc_size, lws_att_type.

    REFRESH: li_objpack, li_objhead, li_objtxt, li_objbin, li_objhex,

    li_reclist.

    lws_docdata-obj_name = text-019. "EUC

    CONCATENATE co_01 text-018 co_10 text-018 ws_conf_year

    INTO ws_conf_date.

    CONCATENATE text-006 ws_conf_date INTO lws_docdata-obj_descr

    SEPARATED BY space.

    CONCATENATE text-007 ws_conf_date text-008 INTO li_objtxt

    SEPARATED BY space.

    APPEND li_objtxt.

    CONCATENATE text-009 text-010 ws_conf_date INTO li_objtxt

    SEPARATED BY space.

    APPEND li_objtxt.

    DESCRIBE TABLE li_objtxt LINES lws_tab_lines.

    READ TABLE li_objtxt INDEX lws_tab_lines.

    lws_docdata-doc_size = ( lws_tab_lines - 1 ) * 255 +

    STRLEN( li_objtxt ).

    CLEAR li_objpack-transf_bin.

    li_objpack-head_start = 1.

    li_objpack-head_num = 0.

    li_objpack-body_start = 1.

    li_objpack-body_num = lws_tab_lines.

    li_objpack-doc_type = text-020. "RAW

    APPEND li_objpack.

    li_reclist-receiver = text-014. "SGD_BUS_ANLT

    li_reclist-rec_type = text-021. "C

    APPEND li_reclist.

    li_reclist-receiver = text-013. "SGD_SAL_MNGR

    li_reclist-rec_type = text-021. "C

    APPEND li_reclist.

    li_reclist-receiver = text-012. "SGD_SAL_SUPT

    li_reclist-rec_type = text-021. "C

    APPEND li_reclist.

    • li_reclist-receiver = sy-uname.

    • li_reclist-rec_type = text-022. "B

    • APPEND li_reclist.

    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

    EXPORTING

    document_data = lws_docdata

    put_in_outbox = c_x

    commit_work = c_x

    TABLES

    packing_list = li_objpack

    object_header = li_objhead

    contents_bin = li_objbin

    contents_txt = li_objtxt

    receivers = li_reclist

    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.

    IF sy-subrc <> 0.

    ENDIF.

    Regards,

    Prakash.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 03, 2006 at 03:46 PM

    hi vicky

    u can tru FM-- MESSAGE_SEND_AS_MAIL.

    REGARDS

    jai

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 03, 2006 at 03:47 PM

    hi vicky

    u can tru FM-- MESSAGE_SEND_AS_MAIL.

    this has a table 'RECEIVERS' for users.

    REGARDS

    jai

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 03, 2006 at 03:51 PM

    HI Vicky,

    This Link matches your requirement ..

    http://help.sap.com/saphelp_erp2005vp/helpdata/en/69/c250ef4ba111d189750000e8322d00/frameset.htm

    REgards,

    Santosh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 03, 2006 at 03:57 PM

    Hi Vicky,

    You can use the Function module SM02_ADD_MESSAGE and send messages to the users logged on to a particular Application server. This is the way of broadcasting the message.

    Hope this helps.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.