Skip to Content
0
Former Member
Oct 31, 2009 at 07:39 AM

Is it possible to send mail to multiple IDs by FM CONVERT_COMM_TYPE_DATA?

132 Views

Hi

I want to send mail to multiple IDs by FM CONVERT_COMM_TYPE_DATA

(This FM is triggered on creation of Sales Order to send the sale order details to the customer)

As of now Exporting Parameter LVS_COMM_VALUES-ADSMTP-SMTP_ADDR is passed by single mail ID.Field SMTP_ADDR is of lenght 241,but ia have requiement to send mail to multiple users(more than 20).Is it possible to use the same FM/(Please tell me if there is any suitable replacement for this FM)

LVS_COMM_VALUES-ADSMTP-SMTP_ADDR = wa_member-address.

    CALL FUNCTION 'CONVERT_COMM_TYPE_DATA'
       EXPORTING
            PI_COMM_TYPE          = LVS_COMM_TYPE
            PI_COMM_VALUES    = LVS_COMM_VALUES
            PI_SCREEN                 = US_SCREEN
*           PI_NEWID                   =
            PI_COUNTRY              = US_COUNTRY
            PI_REPID                     = LVF_PROGRAM
            PI_SNAST                  = LVS_SNAST
       IMPORTING
            PE_ITCPO                   = LVS_ITCPO
            PE_DEVICE                 = LVF_DEVICE
            PE_MAIL_RECIPIENT    = LVS_RECIPIENT
            PE_MAIL_SENDER       = LVS_SENDER
       EXCEPTIONS
            COMM_TYPE_NOT_SUPPORTED   = 1
            RECIPIENT_CREATION_FAILED = 2
            SENDER_CREATION_FAILED    = 3
            OTHERS                    = 4.

    IF SY-SUBRC <> 0.
      RETCODE = SY-SUBRC. "Handling multiple return code check
      SYST-MSGTY = 'E'.
      PERFORM PROTOCOL_UPDATE.
    ENDIF.

Thanks & cheers