on 02-13-2008 3:57 PM
Hello,
I want to resolve the Support Team by Category instead of SAP Component.
The Support Team is determined by the Rule AC13200137 and uses the
Category instead of SAP Component to determine the correct Support
Team (SLFN0003).
I've tested the rule and agents are resolved correctly
according to Category.
When the a service record is created the initial resolution for the
Support team is successful based upon Category.
However, when the Category is changed after the Support Team has been determined, the Support Team cannot be updated when the document is SAVED. In the Transaction Data -> Action ->
Process logs displays the following error:
Date: 13.02.2008 Time: 16:44:59
Processing CRM_DNO_PARTNER_1 Is Started
Partner of partner function SLFN0003 could not be changed here
Action could not be successfully executed
Analysis:
When the Support Team field on the CRM_HEADER is NOT empty the resolution by Category cannot update the Support Team field.
The workaround when a Category has been changed is to clear the Support Team field then SAVE then the Support Team is resolved correctly to reflect Category changes.
Is there a method to FORCED the overwrite the Support Team field when the
Category is changed?
Please advise.
Regards,
Latief
Hello,
The standard method that is executed during the automatic determination of the Support Team calls function module CRM_DNO_UPDATE_PARTNER with parameter "only when initial" with YES, as you can see below.
update partner found with crm transaction header
CALL FUNCTION 'CRM_DNO_UPDATE_PARTNER'
EXPORTING
iv_header_guid = lv_header_guid
iv_partner_guid = lv_partner_guid
iv_partner_fct = lv_partner_fct
iv_only_when_initial = 'X'
EXCEPTIONS
OTHERS = 1.
This is a way to avoid that after the first automatic determination the value of the field changed manually by you (if needed) could be replaced by the re-execution of the action, i.e., the action is only to fill the value if it is not filled yet. Once the field is not empty, the action will not take place successfully anymore.
What you could do, if this is really what you need, is copy Badi implementation CRM_DNO_PARTNER_1(what you probably had already done) and change it. Do not only clear the 'X' from the parameter in the function call as this will make your process get stuck in an endless loop.
Hope it helps.
Raquel.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raquel,
Thank you very much for your quick response. Unfortunately, I had to wait for an ABAP'er to make the necessary changes. Your feedback was helpful and points have been allocated accordingly.
Below is an extract of the code applied to the functional module "CRM_DNO_UPDATE_PARTNER" to allow overwriting the Support Team field when already determined and the CATEGORY field has been changed.
read partner of crm transaction
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = lt_header_guid
iv_mode = gc_mode-display
it_requested_objects = lt_req_objects
IMPORTING
et_partner = lt_partner
EXCEPTIONS
OTHERS = 0.
READ TABLE lt_partner INTO ls_partner
WITH KEY ref_guid = iv_header_guid
partner_fct = iv_partner_fct.
IF sy-subrc = 0 and ls_partner-partner_no <> space.
*{ REPLACE SODK900090 1
*\ MESSAGE e116(com_partner) with iv_partner_fct
*\ RAISING partner_fct_maintained.
*
If the Support Team is unchanged, simply exit.
Otherwise delete the existing entry.
if ls_partner-partner_guid = iv_partner_guid.
exit.
else.
fill partner data
move-corresponding ls_partner to ls_partner_com.
data:
begin of logical_key,
ref_partner_handle like ls_partner_com-ref_partner_handle,
ref_partner_fct like ls_partner_com-ref_partner_fct,
ref_partner_no like ls_partner_com-ref_partner_no,
ref_no_type like ls_partner_com-ref_no_type,
ref_display_type like ls_partner_com-ref_display_type,
end of logical_key.
move-corresponding ls_partner to logical_key.
clear: ls_partner_com-partner_fct, ls_partner_com-partner_no, ls_partner_com-display_type, ls_partner_com-no_type.
INSERT ls_partner_com INTO TABLE lt_partner_com.
fill input fields
ls_input_fields-ref_guid = iv_header_guid.
ls_input_fields-ref_kind = gc_object_kind-orderadm_h.
ls_input_fields-objectname = gc_object_name-partner.
ls_input_fields-logical_key = logical_key.
ls_field_names-fieldname = 'PARTNER_FCT'.
INSERT ls_field_names INTO TABLE lt_field_names.
ls_field_names-fieldname = 'PARTNER_NO'.
INSERT ls_field_names INTO TABLE lt_field_names.
ls_field_names-fieldname = 'DISPLAY_TYPE'.
INSERT ls_field_names INTO TABLE lt_field_names.
ls_field_names-fieldname = 'NO_TYPE'.
INSERT ls_field_names INTO TABLE lt_field_names.
ls_field_names-fieldname = 'KIND_OF_ENTRY'.
INSERT ls_field_names INTO TABLE lt_field_names.
ls_input_fields-field_names = lt_field_names.
INSERT ls_input_fields INTO TABLE lt_input_fields.
clear: ls_partner_com, ls_input_fields, ls_field_names.
endif.
*} REPLACE
ENDIF.
ENDIF.
Your assistance is highly appreciated.
Kind Regards,
Latief
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.