03-15-2007 6:41 AM
Hi All,
May you please provide a procedure to create a distribution list in SAP and also sample code if possible to send notifications to the created disribution list.
Please help
MM
03-16-2007 3:10 AM
Hi,
Type SBWP>Select "Environment Lists from the menu>Press Create button will take you to creating distribution list. You can create distribution list as shared or private.
Once you have created the distribution list you can send mails using
call function 'SO_DLI_READ_API1'
exporting
dli_name = soid-objnam " << distribution list name
shared_dli = 'X'
tables
dli_entries = i_distlist
exceptions
dli_not_exist = 1
operation_no_authorization = 2
parameter_error = 3
x_error = 4
others = 5.
if sy-subrc <> 0.
else.
loop at i_distlist.
if i_distlist-member_adr is initial.
move i_distlist-member_nam to i_user-bapibname.
call function 'BAPI_USER_GET_DETAIL'
exporting
username = i_user-bapibname
importing
address = wa_address
tables
return = i_return.
move wa_address-e_mail to wa_receiver-receiver.
append wa_receiver to i_receiver.
else.
move i_distlist-member_adr to wa_receiver-receiver.
append wa_receiver to i_receiver.
endif.
endloop.
endif.
After you have all receivers from the distribution list and their email addresses.
Then using SO_OBJECT ***** function module you send mail to distribution list members.
aRs
03-16-2007 3:55 AM
hi
good
go through this
Creating a SAP mail distribution lists
Transaction code SO23
X Shared distribution lists
Name : ZXXXX
Title : XXXXX Mail Distribution
Don't enter anything in the Folder field.
Folder : Click the down arrow
Next screen :
Folder Name : ZXXXX
Folder Title : Mailing address
Folder Area : Shared
Click Create Folder
Next screen :
Indexing : Tick
Specify the 'Retention period of a document in this folder (days)'.
Choose the 'Folder access authorization'.
Finish, click the Enter button.
Click the tabstrips 'Distri. list content' to type in your mailing list.
Save your entries.
Finally, test it by sending a mail via the distribution list ZXXXX.
thanks
mrutyun^