cancel
Showing results for 
Search instead for 
Did you mean: 

Mail to Support Team During the creation of Support Message

Former Member
0 Kudos

Hi,

In Solution Manager 4.0,what configuration I have to do so that it can send mail to all the members of the corresponding Support team during the creation of Support Message?.I have done the required configuration so as to send mail to the key user,message processor..etc during the status change and its working fine.

Regards,

Cherry

Accepted Solutions (0)

Answers (2)

Answers (2)

MariaJoãoRocha
Contributor
0 Kudos

Hi,

We are using BADI to send mail to the message creator. See Note 571782 - Basis notification: Badi during the saving.

Here is our implementation:

************************************************************************

*

  • Programa :

*

  • Criado por :

*

  • Data Criação: 01-04-2005

*

  • Código Tarefa: SMSD

*

  • Breve descrição: Envio automático de mail para o criador da mensagem

*

  • Histórico Alterações

*

  • Data Alterado por Marca/Comentários

  • ---------- -------------- ------------------------------------------

************************************************************************

method if_ex_dno_event_save~create_notif .

************************************************************************

  • variáveis

************************************************************************

data: wa_dnoc_type_text type dnoc_type_text.

data: wa_notif_t type dnod_notif_t.

data: it_message_content type standard table of soli,

wa_message_content type soli.

data: wa_object_hd_change type sood1.

data: it_receiver_list type standard table of soos1,

wa_receiver_list type soos1.

data: packing_list type standard table of soxpl.

data: compressed_attachment type standard table of soli.

data: t_text_lines type standard table of tline,

wa_text_lines type tline.

data: name type thead-tdname.

data: wa_changed_by type crmd_orderadm_h-changed_by,

wa_object_id type crmd_orderadm_h-object_id.

data: wa_receiver type soos1-recextnam.

data: wa_prioridade(40).

************************************************************************

  • processo

************************************************************************

*----

-


general data

wa_object_hd_change-objla = sy-langu.

wa_object_hd_change-objnam = 'Object name'.

  • wa_object_hd_change-objsns = 'P'.

wa_object_hd_change-objsns = 'F'.

wa_object_hd_change-objcp = ' '.

*----

-


mail subject

if sy-mandt = '300'.

concatenate 'TESTES:mensagem/' i_notif-numb '/' i_notif-subject

into wa_object_hd_change-objdes.

else.

concatenate 'Mensagem/' i_notif-numb '/' i_notif-subject

into wa_object_hd_change-objdes.

endif.

*----

-


Mail body

*----- Prioridade

clear wa_prioridade.

select single txt_long into wa_prioridade

from scpriot

where langu = 'P'

and priority = i_notif-priority.

if sy-mandt = '300'.

wa_message_content =

'A sua mensagem foi registada no SAP Support Desk de TESTES, com'.

concatenate wa_message_content

'o seguinte nível de prioridade:'

wa_prioridade

'.' into wa_message_content

separated by space.

append wa_message_content to it_message_content.

else.

wa_message_content =

'A sua mensagem foi registada no SAP Support Desk, com'.

concatenate wa_message_content

'o seguinte nível de prioridade:'

wa_prioridade

'.' into wa_message_content

separated by space.

append wa_message_content to it_message_content.

endif.

*----- Descrição da mensagem

  • obter o id de texto e o tipo de objecto

select single tdobject tdid

into (wa_dnoc_type_text-tdobject, wa_dnoc_type_text-tdid)

from dnoc_type_text

where type_notif = 'SLF1'

and type_text = '99'.

if sy-subrc is initial.

  • chamar a função de leitura de textos

clear t_text_lines[].

loop at it_notif_t into wa_notif_t

where type_text = '99'.

name = wa_notif_t-guidl.

endloop.

call function 'READ_TEXT'

exporting

client = sy-mandt

id = wa_dnoc_type_text-tdid

language = wa_notif_t-language

name = name

object = wa_dnoc_type_text-tdobject

tables

lines = t_text_lines

exceptions

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

others = 8.

endif.

append ' ' to it_message_content.

append 'Descrição da mensagem: ' to it_message_content.

append ' ' to it_message_content.

loop at t_text_lines into wa_text_lines.

replace '/(' with ' ' into wa_text_lines-tdline.

append wa_text_lines-tdline to it_message_content.

endloop.

append ' ' to it_message_content.

append ' ' to it_message_content.

append ' ' to it_message_content.

concatenate 'A caixa postal emissora deste mail'

'é exclusivamente para o envio de mensagens.'

into wa_text_lines-tdline

separated by space.

append wa_text_lines-tdline to it_message_content.

append ' ' to it_message_content.

append 'SAP Support Desk' to it_message_content.

*----- obter o criador da mensagem

  • obter o id de texto e o tipo de objecto

select single tdobject tdid

into (wa_dnoc_type_text-tdobject, wa_dnoc_type_text-tdid)

from dnoc_type_text

where type_notif = 'SLF1'

and type_text = 'SD'.

if sy-subrc is initial.

*----

-


receivers

  • chamar a função de leitura de textos

clear t_text_lines[].

loop at it_notif_t into wa_notif_t

where type_text = 'SD'.

name = wa_notif_t-guidl.

endloop.

call function 'READ_TEXT'

exporting

client = sy-mandt

id = wa_dnoc_type_text-tdid

language = wa_notif_t-language

name = name

object = wa_dnoc_type_text-tdobject

tables

lines = t_text_lines

exceptions

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

others = 8.

endif.

loop at t_text_lines into wa_text_lines

where tdline cs 'sy-uname'.

concatenate wa_text_lines-tdline+27(12) '@mail.pt'

into wa_receiver.

endloop.

wa_receiver_list-sel = 'X'.

wa_receiver_list-recesc = 'B'.

wa_receiver_list-recesc = 'U'.

wa_receiver_list-recnam = 'U-'.

wa_receiver_list-recextnam = wa_receiver.

wa_receiver_list-adr_name = wa_receiver.

wa_receiver_list-sndex = 'X'.

wa_receiver_list-sndpri = i_notif-priority.

wa_receiver_list-mailstatus = 'E'.

append wa_receiver_list to it_receiver_list.

wa_receiver_list-sel = 'X'.

wa_receiver_list-recesc = 'B'.

wa_receiver_list-recesc = 'U'.

wa_receiver_list-recnam = 'U-'.

wa_receiver_list-recextnam = 'A@MAIL.PT'.

wa_receiver_list-adr_name = 'A@MAIL.PT'.

wa_receiver_list-sndex = 'X'.

wa_receiver_list-sndpri = i_notif-priority.

wa_receiver_list-mailstatus = 'E'.

wa_receiver_list-sndbc = 'X'.

append wa_receiver_list to it_receiver_list.

wa_receiver_list-sel = 'X'.

wa_receiver_list-recesc = 'B'.

wa_receiver_list-recesc = 'U'.

wa_receiver_list-recnam = 'U-'.

wa_receiver_list-recextnam = 'B@MAIL.PT'.

wa_receiver_list-adr_name = 'B@MAIL.PT'.

wa_receiver_list-sndex = 'X'.

wa_receiver_list-sndpri = i_notif-priority.

wa_receiver_list-mailstatus = 'E'.

wa_receiver_list-sndbc = 'X'.

append wa_receiver_list to it_receiver_list.

  • append wa_receiver to it_message_content.

  • data: wa_teste type zteste.

*----

-


send mail

call function 'SO_OBJECT_SEND'

exporting

object_hd_change = wa_object_hd_change

object_type = 'RAW'

tables

objcont = it_message_content

receivers = it_receiver_list

packing_list = packing_list

att_cont = compressed_attachment

exceptions

active_user_not_exist = 01

communication_failure = 02

component_not_available = 03

folder_not_exist = 04

folder_no_authorization = 05

forwarder_not_exist = 06

note_not_exist = 07

object_not_exist = 08

object_not_sent = 09

object_no_authorization = 10

object_type_not_exist = 11

operation_no_authorization = 12

owner_not_exist = 13

parameter_error = 14

substitute_not_active = 15

substitute_not_defined = 16

system_failure = 17

too_much_receivers = 18

user_not_exist = 19

x_error = 20.

commit work.

  • chamar o programa de envio de mails

wait up to 2 seconds.

submit rsconn01 with mode = 'INT'

and return.

endmethod.

Best regards,

Maria João Rocha

Former Member
0 Kudos

Hey Maria,

I am using the same procedure to send email to support team. But my BADI is throwing an exception of "OBJECT NOT SENT". I used the same code in my Transaction server and it works perfectly for sending out an email. But in Solution Manager it is throwing this exception. Can you please tell me what could be wrong, Is there any patch level of any component needed to be maintained to use SO_OBJECT_SEND function?

Regards

Bilal Nazir

Former Member
0 Kudos

Hi...

In Badi the message type is SLF1 but in Solman 4.0 the message default is SLFN..please verify this point..

Best regards..

Claudenir Bispo

Former Member
0 Kudos

Hi,

Whether any body has got a solution for this?

Regards,

Cherry

0 Kudos

Cherry,

You probably would like an other solution but how a bout sending the mail to a mail group in stead of to one person ? A mail group is a single mail recipient as well. This way you will reach every one that is in the mail group ?

Lando

Former Member
0 Kudos

Hi,

I managed to achive this as per one of the note.buy applying a Badi.

Regards,

Cherry

Former Member
0 Kudos

Hi Cherry,

The Note no and the BADI name would be helpful for folks trying to look out answer for similar scenario.

Please let us know...

Thanks.

Sri

Former Member
0 Kudos

Hi Sri,

Yes , here it is

Note 812385 - Partner determination: BAdI COM_PARTNER_BADI and access seq

Regards,

Cherry

Former Member
0 Kudos

Hi Cherry,

could you please give some more detail as to how you used the BAdI and Access Sequence, specifically the 4 steps of the Procedure? The note is a little vague as to how to accomplish sending the Support Team an email.

thanks.

Former Member
0 Kudos

Hi Cherry,

The problem that im facing right now is exactly same as yours, where mail notif can not be sent out to Support Team upon a creation of new message.

Appreciate if you can let me know on what u did on the 4 points that pointed out from the note 812385.

Million thanks.