09-10-2008 1:29 PM
Hi Gurus,
I am facing a problem wherein the notification mail is configured to be sent a particular distribution list but the mail is actually being sent to the sender.
Useful answers will be rewarded.
09-10-2008 2:44 PM
Review this fragment of code with your program:
FORM send_mail.
data:OWNER LIKE SOUD-USRNAM.
DATA: message_content LIKE soli OCCURS 10 WITH HEADER LINE,
receiver_list LIKE soos1 OCCURS 5 WITH HEADER LINE,
packing_list LIKE soxpl OCCURS 2 WITH HEADER LINE,
listobject LIKE abaplist OCCURS 10,
compressed_attachment LIKE soli OCCURS 100 WITH HEADER LINE,
w_object_hd_change LIKE sood1,
compressed_size LIKE sy-index.
Fot external email id
receiver_list-recextnam = ''.
receiver_list-recesc = 'E'.
receiver_list-sndart = 'INT'.
receiver_list-sndpri = '1'.
FOr internal email id
loop at users.
receiver_list-recnam = users-low."sy-uname .
receiver_list-esc_des = 'B'.
receiver_list-DIALOG_REC = 'X'.
receiver_list-SNDEX = 'X'. " Express-Mail
receiver_list-ACONE = '1'.
APPEND receiver_list.
endloop.
General data
w_object_hd_change-objla = sy-langu.
w_object_hd_change-objnam = 'Title'.
w_object_hd_change-objsns = 'P'.
Mail subject
w_object_hd_change-objdes = 'Subject'.
Mail body
APPEND 'label 1' TO message_content.
CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
compressed_size = compressed_size
TABLES
in = t_abaplist
out = compressed_attachment.
DESCRIBE TABLE compressed_attachment.
CLEAR packing_list.
packing_list-transf_bin = 'X'.
packing_list-head_start = 0.
packing_list-head_num = 0.
packing_list-body_start = 1.
packing_list-body_num = sy-tfill.
packing_list-objtp = 'ALI'.
packing_list-objnam = 'Object name'.
packing_list-objdes = 'Description'.
packing_list-objlen = compressed_size.
APPEND packing_list.
owner = 'OCC'.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
object_hd_change = w_object_hd_change
object_type = 'RAW'
owner = sy-uname
TABLES
objcont = message_content
receivers = receiver_list
packing_list = packing_list
att_cont = compressed_attachment.
ENDFORM. " send_mail
09-10-2008 2:44 PM
Review this fragment of code with your program:
FORM send_mail.
data:OWNER LIKE SOUD-USRNAM.
DATA: message_content LIKE soli OCCURS 10 WITH HEADER LINE,
receiver_list LIKE soos1 OCCURS 5 WITH HEADER LINE,
packing_list LIKE soxpl OCCURS 2 WITH HEADER LINE,
listobject LIKE abaplist OCCURS 10,
compressed_attachment LIKE soli OCCURS 100 WITH HEADER LINE,
w_object_hd_change LIKE sood1,
compressed_size LIKE sy-index.
Fot external email id
receiver_list-recextnam = ''.
receiver_list-recesc = 'E'.
receiver_list-sndart = 'INT'.
receiver_list-sndpri = '1'.
FOr internal email id
loop at users.
receiver_list-recnam = users-low."sy-uname .
receiver_list-esc_des = 'B'.
receiver_list-DIALOG_REC = 'X'.
receiver_list-SNDEX = 'X'. " Express-Mail
receiver_list-ACONE = '1'.
APPEND receiver_list.
endloop.
General data
w_object_hd_change-objla = sy-langu.
w_object_hd_change-objnam = 'Title'.
w_object_hd_change-objsns = 'P'.
Mail subject
w_object_hd_change-objdes = 'Subject'.
Mail body
APPEND 'label 1' TO message_content.
CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
compressed_size = compressed_size
TABLES
in = t_abaplist
out = compressed_attachment.
DESCRIBE TABLE compressed_attachment.
CLEAR packing_list.
packing_list-transf_bin = 'X'.
packing_list-head_start = 0.
packing_list-head_num = 0.
packing_list-body_start = 1.
packing_list-body_num = sy-tfill.
packing_list-objtp = 'ALI'.
packing_list-objnam = 'Object name'.
packing_list-objdes = 'Description'.
packing_list-objlen = compressed_size.
APPEND packing_list.
owner = 'OCC'.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
object_hd_change = w_object_hd_change
object_type = 'RAW'
owner = sy-uname
TABLES
objcont = message_content
receivers = receiver_list
packing_list = packing_list
att_cont = compressed_attachment.
ENDFORM. " send_mail
06-12-2009 10:11 AM
Hi,
Please check the different routines in the interface programs.... Also check your driver program... The mail parameters might be getting reassigned .....