on 11-21-2006 1:54 PM
Hi,
I can send email to a single partner based on my action. Is it possible to send the emails to multiple partners for a single action.
Thanks in advance.
Regards,
M.R
Hi Ramu
Would be obliged if you could share the information as to how you have achieved this. I am also running with a similar problem.
Thanks in advance.
Rakesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ramu;
Here is my case;
A user creates a support notification choosing a SAP component. An action finds the responsibles of the component and adds them to the support notification, at the same time another action sends mail notifications to the responsibles. These two functionality were achieved via my own method and functions.
Best Regards,
Erkan Kaya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi;
Email notification to multiple business partners is not provided in standart SAP functions via actions. It is not related with actions and conditions. Below is the code for the related method... I may send the screenshots if you can give me your mail address... Use this method with smartform: CRM_IST_ORDER_CONFIRMATION_01
CLASS : CL_DOC_PROCESSING_CRM_ORDER
METHOD NAME: ....
METHOD DEFINITION:
IS_ARCHIVE_INDEX Importing Type TOA_DARA
IS_ARCHIVE_PARAMETERS Importing Type ARC_PARAMS
IS_CONTROL_PARAMETERS Importing Type SSFCTRLOP
IS_OUTPUT_OPTIONS Importing Type SSFCOMPOP
IO_APPL_OBJECT Importing Type Ref To OBJECT
IP_SMART_FORM Importing Type TDSFNAME
IS_MAIL_APPL_OBJ Importing Type SWOTOBJID
IS_MAIL_RECIPIENT Importing Type SWOTOBJID
IS_MAIL_SENDER Importing Type SWOTOBJID
IO_PARTNER Importing Type Ref To CL_PARTNER_PPF
IP_USER_SETTINGS Importing Type TDBOOL
IP_APPLICATION_LOG Importing Type BALLOGHNDL
ES_DOCUMENT_OUTPUT_INFO Exporting Type SSFCRESPD
ES_JOB_OUTPUT_INFO Exporting Type SSFCRESCL
ES_JOB_OUTPUT_OPTIONS Exporting Type SSFCRESOP
ET_ERROR_TAB Exporting Type TSFERROR
CT_ARCHIVE_INDEX_TAB Changing Type TSFDARA
METHOD z_anahtar_kullanici_yeni.
*This Method is used to print service order.
generally used constants of generic order
INCLUDE: crm_direct.
DATA:
control_parameters TYPE ssfctrlop.
function name
DATA: function_name TYPE rs38l_fnam,
dummy(254) TYPE c,
ls_archive_index TYPE toa_dara,
ls_orderadm_h TYPE crmt_output_orderadm_h_com,
ls_activity_h TYPE crmt_output_activity_h_com,
ls_opport_h TYPE crmt_output_opport_h_com,
ls_orgman_h TYPE crmt_output_orgman_h_com,
lt_partner_h TYPE crmt_output_partner_h_comt,
ls_partner_h TYPE crmt_output_partner_h_comt,
ls_pricingdata_h TYPE crmt_output_pricingdata_h_com,
ls_sales_h TYPE crmt_output_sales_h_com,
ls_shipping_h TYPE crmt_output_shipping_h_com,
lt_payplan_d_h TYPE crmt_output_payplan_d_h_comt,
ls_customer_h TYPE crmt_output_customer_h_com,
ls_cumulat_h TYPE crmt_output_cumulat_h_com,
lt_billing_h TYPE crmt_output_billing_h_comt,
lt_cancel_h TYPE crmt_output_cancel_h_comt,
lt_appointment_h TYPE crmt_output_appointment_h_comt,
lt_billplan_d_h TYPE crmt_output_billplan_d_h_comt,
lt_billplan_h TYPE crmt_output_billplan_h_comt,
lt_status_d_h TYPE crmt_output_status_d_h_comt,
lt_status_h TYPE crmt_output_status_h_comt,
lt_srv_subject_h TYPE crmt_output_srv_subject_h_comt,
lt_srv_reason_h TYPE crmt_output_srv_reason_h_comt,
lt_srv_result_h TYPE crmt_output_srv_result_h_comt,
ls_acs_h TYPE crmt_acs_h_com,
lt_srv_subject_i TYPE crmt_output_srv_subject_h_comt,
lt_srv_refobj_h TYPE crmt_output_srv_refobj_h_comt,
lt_srv_refobj_i TYPE crmt_output_srv_refobj_h_comt,
lt_orderadm_i TYPE crmt_output_orderadm_i_comt,
lt_orgman_i TYPE crmt_output_orgman_i_comt,
lt_pricingdata_i TYPE crmt_output_pricingdata_i_comt,
lt_pricing_i TYPE crmt_output_pricing_i_comt,
lt_product_i TYPE crmt_output_product_i_comt,
lt_sales_i TYPE crmt_output_sales_i_comt,
lt_service_i TYPE crmt_output_service_i_comt,
lt_shipping_i TYPE crmt_output_shipping_i_comt,
lt_schedlin_i TYPE crmt_output_schedlin_i_comt,
lt_customer_i TYPE crmt_output_customer_i_comt,
lt_partner_i TYPE crmt_output_partner_i_comt,
lt_item_cstics_i TYPE crmt_item_cstics_tab,
lt_billing_i TYPE crmt_output_billing_i_comt,
lt_cancel_i TYPE crmt_output_cancel_i_comt,
lt_finprod_i TYPE crmt_output_finprod_i_comt,
lt_ordprp_i TYPE crmt_output_ordprp_i_comt,
lt_appointment_i TYPE crmt_output_appointment_i_comt,
lt_billplan_d_i TYPE crmt_output_billplan_d_i_comt,
lt_billplan_i TYPE crmt_output_billplan_i_comt,
lt_orderadm_i_qt TYPE crmt_output_orderadm_i_qt_comt,
lt_schedlin_i_cf TYPE crmt_output_schedlin_i_cf_comt,
lt_status_i TYPE crmt_output_status_i_comt,
lt_working_set_e_s_bbp TYPE /1cn/working_set_e_s_bbp_t,
lv_language LIKE sy-langu,
lo_order TYPE REF TO cl_doc_crm_order,
lv_object_guid TYPE crmt_object_guid,
lv_status TYPE jstat,
lt_status TYPE TABLE OF jstat,
lv_error_tab_wrk TYPE ssferror,
ls_output_options TYPE ssfcompop,
for assignments - begin
lt_service_i_assi TYPE crmt_output_service_i_ass_comt
for assignments - end
.
fill internal structure for the output options
ls_output_options = is_output_options.
get the function name for this smart form
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = ip_smart_form
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = function_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
.
IF sy-subrc <> 0.
add an error message to processing protocol
MESSAGE i015(sppf_media) WITH ip_smart_form INTO dummy.
CALL METHOD cl_log_ppf=>add_message
EXPORTING
ip_problemclass = '1'
ip_handle = ip_application_log.
EXIT.
ENDIF.
determine the tables of the application
CALL FUNCTION 'CRM_OUTPUT_SINGLE_READ'
EXPORTING
iv_object = io_appl_object
iv_smart_form = ip_smart_form
ir_partner = io_partner
IMPORTING
es_output_orderadm_h = ls_orderadm_h
es_output_activity_h = ls_activity_h
es_output_opport_h = ls_opport_h
es_output_orgman_h = ls_orgman_h
es_output_pricingdata_h = ls_pricingdata_h
es_output_sales_h = ls_sales_h
es_output_shipping_h = ls_shipping_h
et_output_partner_h = lt_partner_h
et_output_payplan_d_h = lt_payplan_d_h
es_output_customer_h = ls_customer_h
es_output_cumulat_h = ls_cumulat_h
et_output_billing_h = lt_billing_h
et_output_cancel_h = lt_cancel_h
et_output_appointment_h = lt_appointment_h
et_output_billplan_d_h = lt_billplan_d_h
et_output_billplan_h = lt_billplan_h
et_output_status_d_h = lt_status_d_h
et_output_status_h = lt_status_h
et_output_srv_subject_h = lt_srv_subject_h
et_output_srv_reason_h = lt_srv_reason_h
et_output_srv_result_h = lt_srv_result_h
et_output_srv_refobj_h = lt_srv_refobj_h
et_output_srv_refobj_i = lt_srv_refobj_i
et_output_srv_subject_i = lt_srv_subject_i
es_output_acs_h = ls_acs_h
et_output_orderadm_i = lt_orderadm_i
et_output_orgman_i = lt_orgman_i
et_output_pricingdata_i = lt_pricingdata_i
et_output_pricing_i = lt_pricing_i
et_output_product_i = lt_product_i
et_output_sales_i = lt_sales_i
et_output_service_i = lt_service_i
et_output_shipping_i = lt_shipping_i
et_output_schedlin_i = lt_schedlin_i
et_output_partner_i = lt_partner_i
et_item_cstics_i = lt_item_cstics_i
et_output_customer_i = lt_customer_i
et_output_billing_i = lt_billing_i
et_output_cancel_i = lt_cancel_i
et_output_finprod_i = lt_finprod_i
et_output_ordprp_i = lt_ordprp_i
et_output_appointment_i = lt_appointment_i
et_output_billplan_d_i = lt_billplan_d_i
et_output_billplan_i = lt_billplan_i
et_output_orderadm_i_qt = lt_orderadm_i_qt
et_output_schedlin_i_cf = lt_schedlin_i_cf
et_output_status_i = lt_status_i
et_output_wrk_set_e_s_bbp = lt_working_set_e_s_bbp
ev_language = lv_language
for assignments - begin
et_output_service_i_assi = lt_service_i_assi
for assignments - end
.
set mail title
SELECT SINGLE caption INTO ls_output_options-tdtitle
FROM stxfadmt WHERE
formname = ip_smart_form AND
langu = lv_language.
*
IF ls_output_options-tdtitle IS INITIAL.
SELECT SINGLE caption INTO ls_output_options-tdtitle
FROM stxfadmt WHERE
formname = ip_smart_form.
ENDIF.
CONCATENATE 'Servis Masası - Yeni bir sorun açıldı:'
ls_orderadm_h-object_id INTO ls_output_options-tdtitle
SEPARATED BY space.
*----
-
is_mail_appl_obj -
-
fill this parameter if your application object is a BOR object
the output will be connected with the BOR object via SAP Office
this is done for mail and fax but not for print outputs
------>
is_mail_appl_obj-LOGSYS =
is_mail_appl_obj-OBJTYPE =
is_mail_appl_obj-OBJKEY =
is_mail_appl_obj-DESCRIBE =
------>
*----
-
*----
language of smart form----
-
determin here the language of the smart form
control_parameters = is_control_parameters.
control_parameters-langu = lv_language.
*----
-
*----
-
fill archive parameters for archive link -
-
IF is_output_options-tdarmod = '2' OR
is_output_options-tdarmod = '3'.
archive_index_tab
READ TABLE ct_archive_index_tab INTO ls_archive_index INDEX 1.
ls_archive_index-object_id = ls_orderadm_h-guid.
IF ls_archive_index-object_id IS INITIAL.
DELETE ct_archive_index_tab INDEX 1.
ELSE.
MODIFY ct_archive_index_tab FROM ls_archive_index INDEX 1.
ENDIF.
ENDIF.
*----
-
DATA : zzpartner TYPE crmt_output_partner_h_com .
DATA : zzadres TYPE so_name .
DATA : zobjkey TYPE swotobjid-objkey .
DATA: lv_user TYPE syuname,
lv_mailaddr TYPE so_name,
lv_type_id TYPE so_escape,
lv_partnno TYPE ppfdpartno,
lv_partner_no TYPE bu_partner,
lv_partner TYPE crmt_object_guid,
ls_mail_recipient TYPE swotobjid.
LOOP AT lt_partner_h INTO zzpartner .
CLEAR zzadres.
CHECK zzpartner-ref_partner_fct EQ 'ZSLFN001'.
SELECT SINGLE smtp_addr FROM adr6 INTO zzadres
WHERE addrnumber = zzpartner-addr_nr.
CHECK sy-subrc EQ 0.
lv_mailaddr = zzadres.
lv_type_id = 'U'.
CALL FUNCTION 'CREATE_RECIPIENT_OBJ_PPF'
EXPORTING
ip_mailaddr = lv_mailaddr
ip_type_id = lv_type_id
IMPORTING
ep_recipient_id = ls_mail_recipient
EXCEPTIONS
invalid_recipient = 1
OTHERS = 2.
delete the old recipient object
CALL FUNCTION 'DELETE_RECIPIENT_OBJECT_PPF'
EXPORTING
is_recipient_id = is_mail_recipient.
call function to process smart form
CALL FUNCTION function_name
EXPORTING
archive_index = is_archive_index
archive_index_tab = ct_archive_index_tab
archive_parameters = is_archive_parameters
control_parameters = control_parameters
mail_appl_obj = is_mail_appl_obj
mail_recipient = is_mail_recipient
mail_recipient = ls_mail_recipient
mail_sender = is_mail_sender
output_options = ls_output_options
user_settings = ip_user_settings
orderadm_h = ls_orderadm_h
activity_h = ls_activity_h
opport_h = ls_opport_h
orgman_h = ls_orgman_h
partner_h = lt_partner_h
pricingdata_h = ls_pricingdata_h
sales_h = ls_sales_h
shipping_h = ls_shipping_h
payplan_d_h = lt_payplan_d_h
cumulat_h = ls_cumulat_h
customer_h = ls_customer_h
acs_h = ls_acs_h
billing_h = lt_billing_h
cancel_h = lt_cancel_h
appointment_h = lt_appointment_h
billplan_d_h = lt_billplan_d_h
billplan_h = lt_billplan_h
status_d_h = lt_status_d_h
status_h = lt_status_h
srv_subject_h = lt_srv_subject_h
srv_reason_h = lt_srv_reason_h
srv_result_h = lt_srv_result_h
srv_subject_i = lt_srv_subject_i
srv_refobj_h = lt_srv_refobj_h
srv_refobj_i = lt_srv_refobj_i
orderadm_i = lt_orderadm_i
orderadm_i_qt = lt_orderadm_i_qt
orgman_i = lt_orgman_i
pricingdata_i = lt_pricingdata_i
pricing_i = lt_pricing_i
product_i = lt_product_i
sales_i = lt_sales_i
service_i = lt_service_i
schedlin_i = lt_schedlin_i
schedlin_i_cf = lt_schedlin_i_cf
shipping_i = lt_shipping_i
partner_i = lt_partner_i
item_cstics_i = lt_item_cstics_i
customer_i = lt_customer_i
billing_i = lt_billing_i
cancel_i = lt_cancel_i
finprod_i = lt_finprod_i
ordprp_i = lt_ordprp_i
appointment_i = lt_appointment_i
billplan_d_i = lt_billplan_d_i
billplan_i = lt_billplan_i
status_i = lt_status_i
working_set_e_s_bbp = lt_working_set_e_s_bbp
language = lv_language
for assignments - begin
service_i_assi = lt_service_i_assi
for assignments - end
IMPORTING
document_output_info = es_document_output_info
job_output_info = es_job_output_info
job_output_options = es_job_output_options
EXCEPTIONS
output_canceled = 1
parameter_error = 2
OTHERS = 3.
IF sy-subrc = 0.
determine header guid to set status printed
lo_order ?= io_appl_object.
lv_object_guid = lo_order->get_crm_obj_guid( ).
set status printed into the crm order
CALL FUNCTION 'CRM_STATUS_SET_INTERN'
EXPORTING
iv_objnr = lv_object_guid
iv_status = gc_status-printed
xnoauto = true
EXCEPTIONS
object_not_found = 1
status_inconsistent = 2
status_not_allowed = 3
OTHERS = 4.
ELSE.
CASE sy-subrc.
WHEN 1.
MESSAGE e016(sppf_media) INTO dummy.
WHEN 2.
MESSAGE e017(sppf_media) WITH function_name INTO dummy.
WHEN 3.
MESSAGE e018(sppf_media) WITH function_name INTO dummy.
ENDCASE.
CALL METHOD cl_log_ppf=>add_message
EXPORTING
ip_problemclass = '1'
ip_handle = ip_application_log.
ENDIF.
get error table
CALL FUNCTION 'SSF_READ_ERRORS'
IMPORTING
errortab = et_error_tab.
fill error into crm_order status
LOOP AT et_error_tab INTO lv_error_tab_wrk
WHERE msgty = gc_msgtype-error.
CALL FUNCTION 'CRM_MESSAGE_COLLECT'
EXPORTING
iv_caller_name = gc_object_name-order
iv_msgno = lv_error_tab_wrk-msgno
iv_msgid = lv_error_tab_wrk-msgid
iv_msgty = lv_error_tab_wrk-msgty
iv_msgv1 = lv_error_tab_wrk-msgv1
iv_msgv2 = lv_error_tab_wrk-msgv2
iv_msgv3 = lv_error_tab_wrk-msgv3
iv_msgv4 = lv_error_tab_wrk-msgv4
IV_ERROR_RELEVANCE = FALSE
iv_msglevel = gc_msglevel-administrator
EXCEPTIONS
not_found = 1
appl_log_error = 2
OTHERS = 3.
ENDLOOP.
ENDLOOP .
ENDMETHOD.
Hi Erkan Kaya,
I suspose the determination of the support team was successfully done in Service desk and the action to send mail being triggered correctly. But i have question, under which service message's status you want to send the mail to Support Team?
1. If you want to send the mail to support team upon a new message creation then you may need to look at OSS note 812385. Because SolMan can not determine the Support team immediately upon the new message creation.
2. If you want to send mail to support team for the rest of status change(for eg, In process, Recommended solution), then you need to populate an email address for each of the team. For eg, FICO, BC, SD, MM, etc. And then ask your mail server admin to create a distribution list/group email for each the team. For eg. email address for FICO is fico@abc.com, this is the address your mail admin need to create as a mail group, and then assign all those support consultant's email address to group fico@abc.com
FYI, the mail group creation is applicable to point 1 above as well.
Hope it helps.
Dear Ramu,
Hi. I am having the same issue .I want to sales order smart form details to sale employ who is another partner. By default in sap it is going to sol-to-party. I was struck here and not bale to send . Please give me an idea how you did . I hope you will help me in this.
Regards,
Madhu.
Edited by: madhurao123 on Sep 29, 2010 9:54 AM
Ramu,
My support team consists of 6 members and all 6 get the mail at the same time.
In my mail system Lotus Notes, I have all 6 members assigned to that e-mail address.
You should do something like that with your mail system.
Salpi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
in this case there also will be send a mail notification when just the document is changed.
There mustn't be a status change when you choose the option "Max. 1 Unprocessed Action for Each Action Definition".
Do you know something to prevent this case.
Best regards,
Jens
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think the work around is to create an action by business partner (one for the key user, one for the support team ...).
Procedure:
- Copy the action
- Change the partner
- Create the condition
Best regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ramu,
here's what I have and it works.
In SPPFCADM, under CRM_ORDER.
-Under ActionProfile: SLFN0001_ADVANCED, I have Action Definition: Z_SEND_MAIL_TO_Support_team.
-Under Partner Deteremination for the Action:
select Partner dependent, also put PartnerFunction:SLFN0003 (Support Team)
-Action Summarizatn: Max. 1 Unprocessed Action for Each Action Definition (so you can send mail if the status changed back again).
Then in condition configuration, add this action definition and create your start condition.
very important that your support team has a business partner and in this business partner you add the email address of your support team.
let me know if this helps, if not, please specifiy what you have configured.
Salpi
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.