Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Notification is being sent to the Sender himself instead of receiver.

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

2 REPLIES 2

Former Member
0 Kudos

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

0 Kudos

Hi,

Please check the different routines in the interface programs.... Also check your driver program... The mail parameters might be getting reassigned .....