on 08-16-2012 5:41 PM
Hello,
We are using the e-mail alerts sending by the standard. Now we need to change the the sender to "NOREPLY@xx".
The standard FM used in to send e-mails and alerts is SALRT_CREATE_API. We checked this FM but we couldn't found any way to change the sender.
How can we do this?
Thanks & Regards,
SM
Hi,
I think you can maintain the sender email address in SPRO
go to CRM->Marketing->Marketing planning and campaign management->maintain sender addresses for E Mail
Thanks and Regards
Shanto Aloor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, Susana.
You can configure from which e-mail address alerts are sent defining alert user at: IMG -> CRM -> Basic Functions -> Alert Management -> Central Alert Server Configuration. There is a field User in Inbound Processing section. His e-mail will be used then for sending e-mail notifications out. Otherwise current (system) user which trigger alert sending will be used. Check method SEND in class CL_ALERT_MANAGER.
For instance there is a code in this method (ls_conf-alertuser is from table SALRTCONF which is maintained in above settings):
* set reply_to
* Get reply_to object
IF NOT ls_conf-alertuser IS INITIAL.
lo_reply_to = cl_sapuser_bcs=>create( ls_conf-alertuser ).
* Add reply_to
CALL METHOD lo_send_request->set_reply_to
EXPORTING
i_reply_to = lo_reply_to.
ENDIF.
Hi Andrei,
I've made what you suggest and when I checked the method SEND in class CL_ALERT_MANAGER the variable ls_conf-alertuser is filled with the user mantained in the table SALRTCONF.
But the construction of the e-mail sender is made in the following instruction:
* Get sender object: either alert user (from configuration) or current user
IF ( sy-uname = 'SAPSYS' OR sy-batch = 'X' ) AND NOT ls_conf-alertuser IS INITIAL."#EC *
l_uname = ls_conf-alertuser.
But here if I run the program in background the sy-batch variable is allways empty (without X), so the instrution l_uname = ls_conf-alertuser is never verified.
Any sugestion to this problem?
Tks & Regards,
Susana Morgado
I've checked, and the very beginning of SALRT_CREATE_API sy-batch is filled.
But when I checked the sy-batch in SEND method of CL_ALERT_MANAGER this is empty.
Z_PROGRAM:
...
CALL FUNCTION 'ZCRM_MOVIMENTOS_SEND_ALERT'
EXPORTING
i_category = 'ZALERTA_SEGMENT'
i_bp_id = wa_but000-partner
* i_task_id = wa_orderadm_h-object_id
* i_task_description = wa_orderadm_h-description
i_bp_text = wa_but000-name_org1
i_bp_seg_mes = periodo
i_id_segment = wa_ztab00003n-zzfld00000r.
...
In attached the FM ZCRM_MOVIMENTOS_SEND_ALERT (the FM SALRT_CREATE_API is called in the end of this).
Thanks for your help.
I'd start from creating a watchpoint on sy-batch. As far as it is filled at the start and is not at the end then something reset it in the middle. So perhaps you'll be able to identify the place using watchpoint.
If I have a chance I'll try myself to do a similar example tomorrow and get back here.
Sorry, I haven't explain me correctly.
1 - First I tried to use a breakpoint with the program running in background (though SM50).
I put the breakpoint in method SEND in class CL_ALERT_MANAGER:
(line 200)
**Get sender object: either alert user (from configuration) or current user
IF ( sy-uname = 'SAPSYS' OR sy-batch = 'X' ) AND NOT ls_conf-alertuser IS INITIAL."#EC *
l_uname = ls_conf-alertuser.
Here I checked that the sy-batch was initial.
2 - Then I tried to use an watchpoint on sy-batch = ' '
I ran the program in background but the program doesn't stop when sy-batch is initial.
I can't understand what's going on?
Could you help please?
Thanks for your help and time.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.