on 11-02-2006 4:57 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Hi,
Whether any body has got a solution for this?
Regards,
Cherry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.