03-03-2012 5:50 AM
Hi ,
I am sending an Excel file attachment in XLS format to the distrubution list using FM :SO_NEW_DOCUMENT_ATT_SEND_API1
I have passed the parameters as follows:
reclist-REC_TYPE = 'C'.
reclist-COM_TYPE = 'INT'.
reclist-NOTIF_DEL = 'X'.
reclist-NOTIF_NDEL = 'X'.
reclist-RECEIVER = p_DLIST.
APPEND reclist.
but i am receiving error message :
Exception from the class CX_SEND_REQ_BCS was caught
when I am passing the receiver as email address, its working fine.
Please let me know what is the issue?
Tjhanks and regards,
Madhuri
03-03-2012 6:25 AM
Hi,
Try
RECLIST-REC_TYPE = 'U'. "internet users
RECLIST-RECEIVER = '<name>@address.com'. " try one like youe first address
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
RECLIST-RECEIVER = p_DLIST. " put the list
RECLIST-REC_TYPE = 'P'.
APPEND RECLIST.
Also check this wiki [http://wiki.sdn.sap.com/wiki/display/Snippets/Howtosendmailtoadistributionlistoragroup+ID]
Ben
03-03-2012 7:55 AM
hi Benson,
If I mention as above , its still not sending any email to any of the distribution list id.
Edited by: madhuri sonawane on Mar 3, 2012 1:29 PM
03-03-2012 8:47 AM
Hi,
RECLIST-RECEIVER = 'p_DLIST'. " distributor in SAP Mail
RECLIST-REC_TYPE = 'C'. " put it as C .
APPEND RECLIST.
Please check the distributor list in SAP Mail - TR 'SO23' that it is properly maintained or not.
'P' for Private distribution list
'C' for Shared distribution list
03-03-2012 9:46 AM
Dear Madhuri,
Try to use a loop at internal table which contains the email address and append it to the receivers list.
LOOP AT IT_ZLTCBMAIL INTO WA_ZLTCBMAIL.
T_RECEIVERS-RECEIVER = WA_ZLTCBMAIL-MLIDUSER.
T_RECEIVERS-REC_TYPE = 'U'.
T_RECEIVERS-COM_TYPE = 'INT'.
T_RECEIVERS-NOTIF_DEL = 'X'.
T_RECEIVERS-NOTIF_NDEL = 'X'.
APPEND T_RECEIVERS.
ENDLOOP.
03-03-2012 5:32 PM
Hi,
Refer this -
Set shared_dli as per your DL..shared or Private.
DATA: i_distlist TYPE STANDARD TABLE OF SODLIENTI1.
call function 'SO_DLI_READ_API1'
exporting
dli_name = 'ZDISTR_LIST'
shared_dli = ' '
tables
dli_entries = i_distlist
exceptions
dli_not_exist = 1
operation_no_authorization = 2
parameter_error = 3
x_error = 4
others = 5.
After you get the receivers in i_distlist, loot at it and append all the email addresses in i_receivers which will be of type as in SO_NEW_DOCUMENT_ATT_SEND_API1
Regards,
Harsh Bansal
03-05-2012 8:05 AM
Thanks Harsh,
Resolved with your suggestion.
But don't know what was the problem with mentioning the distribution list directly with type 'C'. Do you have idea on this?
regards,
Madhuri
Edited by: madhuri sonawane on Mar 5, 2012 1:35 PM
03-05-2012 8:40 AM