on 09-14-2007 6:22 PM
Hi Everyone,
has anyone come up with a starting condition that will send an email when the status is changed? I want one that only fires once until the status is changed to something else. It should be able to fire an infinite amount of times until the message is set to Confirmed.
I don't want one that only fires once when changed from New to In Process, and then doesn't work again if the status is changed from Proposed Solution back to In Process. And I don't want one that sends an email every time the Save button is clicked. These two examples are currently the problems I am trying to get around.
thanks,
Jason
Hi Jason,
I hope you must have implemented the required configuration as per SAP Note 691303. In the attached tutor, you will find the configuration for E0002 i.e. mail to be sent when the status is changed to In process.
You have to repeat the configuration for various values i.e. E0003, E0004 and so on.
Hope this will be helpful to you.
Please reward points suitably.
Regards,
Naresh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naresh,
Thanks for your response. Unfortunately, that note results in the situation I mentioned I do not want.
"I don't want one that only fires once when changed from New to In Process, and then doesn't work again if the status is changed from Proposed Solution back to In Process. "
Any other ideas?
regards,
Jason
Hi Jason,
I can not test this just now but if you select Action Merging "Max. 1 Unprocessed Action for Each Action Definition", every time you put the message "In process" a mail will be send, but also if you change the message processor being in this "in process" status.
However I did not check if this action is sending mails every time you save the message even if you don´t make any change.
Did you test this?
Thanks a lot,
Dolores
Hi Dolores,
thanks for the idea. Unfortunately setting it up this way results in the other result I am trying to avoid:
"And I don't want one that sends an email every time the Save button is clicked."
The only thing I have seen in the forums is changing the ABAP code to look at the previous status and/or previous Message Processor and only send the email if the value is different.
regards,
Jason
Hi Jason,
this can only be achieved with the configuration described in NOTE 865619.
However, the ABAP coding in this note will only work for system status, not user status. You will have to modify the code a little to make it work for the user status also. If you have trouble with that, I can post the coding here if necessary.
Regards,
Thomas
Hello Thomas,
I would be gratefull if you could post the code for getting it working with User Status. This is exactly what I was looking for, I have been unsuccesfull with getting the code form SAP note 865619 working.
I was under the impression that the code specified in the note was taking the user status into account. But maybe that is why it is not working for me.
Thanks....
Message was edited by:
Guido Jacobs
Hello Guido,
here's the code i'm using:
METHOD if_ex_container_ppf~modify_container.
DATA: ls_object TYPE sibflporb,
lt_value TYPE swconttab,
ls_value TYPE swcont,
lv_return TYPE sy-subrc,
lv_guid TYPE crmt_object_guid,
lt_status TYPE crmt_status_wrkt,
ls_cont_status TYPE j_status,
lv_switch TYPE char1 VALUE 'X'.
CHECK: ci_container IS BOUND,
ci_parameter IS BOUND.
------- Get the GUID ----------
CALL METHOD ci_container->get_value
EXPORTING
element_name = 'BUSINESSOBJECT'
IMPORTING
data = ls_object.
lv_guid = ls_object-instid.
CALL METHOD ci_parameter->get_values
RECEIVING
values = lt_value.
------- Get the status --------
CALL FUNCTION 'CRM_STATUS_READ_OW'
EXPORTING
iv_guid = lv_guid
IT_GUID =
IV_ONLY_ACTIVE = TRUE
IMPORTING
et_status_wrk = lt_status
ES_CURRENT_USER_STATUS =
ES_CURRENT_SYSTEM_STATUS =
EXCEPTIONS
not_found = 1
OTHERS = 2.
CHECK sy-subrc = 0.
-------- Check if status is newly set ---------------
LOOP AT lt_value INTO ls_value
WHERE element = 'STATUS_TABLE'.
lv_switch = 'X'.
ls_cont_status = ls_value-value.
READ TABLE lt_status TRANSPORTING NO FIELDS
WITH KEY status = ls_cont_status
active = 'X'
active_old = ' '.
IF sy-subrc NE 0.
CLEAR lv_switch.
ELSE.
exit.
ENDIF.
ENDLOOP.
IF sy-subrc NE 0.
CLEAR lv_switch.
ENDIF.
--------- Set the parameter -----------
IF lv_switch IS NOT INITIAL.
CALL METHOD ci_parameter->set_value
EXPORTING
element_name = 'STATUS_IS_NEW'
data = 'X'
RECEIVING
retcode = lv_return.
ENDIF.
ENDMETHOD.
Hope this helps,
Thomas
thanks this worked perfectly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.