on 07-09-2014 9:53 AM
Hi,
we like to harmonize all status profile of all incident process types we have in our system. This means we like to create one status profile and assign this to 5 different process types. The problem is, we have in our system round about 20000 incidents and ( open and closed). This incidents have to be migrated. I think we have to change E-Status and Status profile and change documents. Are there any experiences with this task. I found nothing what really works (change status profile) in this time. I checked CRM_STATUS_PROFILE_CHANGE but dosn't work for me.
Could anyone give some hints how to handle this problem?
Kind regards Stefan
Hi Stefan,
You can try the below code to change the status and status profile
ls_status_com-ref_guid = lv_guid."document guid
ls_status_com-ref_kind = 'A'.
ls_status_com-user_stat_proc = 'CRMACTIV'. " status profile
ls_status_com-activate = 'X'.
APPEND ls_status_com TO lt_status_com.
ls_input_fields-ref_guid = ls_status_com-ref_guid.
ls_input_fields-ref_kind = 'A'.
ls_input_fields-objectname = 'STATUS'.
CONCATENATE ls_status_com-status ls_status_com-user_stat_proc INTO ls_input_fields-logical_key.
ls_fieldname-fieldname = 'ACTIVATE'.
INSERT ls_fieldname INTO TABLE ls_input_fields-field_names.
INSERT ls_input_fields INTO TABLE lt_input_fields.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
it_status = lt_status_com
CHANGING
ct_input_fields = lt_input_fields
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.
IF sy-subrc EQ 0.
INSERT lv_guid INTO TABLE lt_guids.
CALL FUNCTION 'CRM_ORDER_SAVE'
EXPORTING
it_objects_to_save = lt_guids
EXCEPTIONS
document_not_saved = 1
OTHERS = 2.
IF sy-subrc IS INITIAL.
COMMIT WORK AND WAIT.
endif.
Best Regards,
Dharmakasi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi stefan porges1,
change with crm_order_maintain,pass status , status profile field and logical_key in input field as status+status profile.
Padma.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
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.