SAP CRM: How to make ‘To Be Distributed’(Completed) Service Request(Order) editable
I think, many CRM consultant would have faced the challenge while performing conversion of transnational data, Specially,when those are set as completed and are in midway of transferring. The below knowledge would probably help them to get rid of this challenge.
Analysis: Completed status is set manually either at item level or header level. If all items are set manually to Completed, the system automatically sets the header as Completed. As soon as a document has the status Completed, it will no longer allow making changes to it. If it is found that the document is incorrect or some changes are required in it, it must be cancelled.
When user status of a Service Request is set as Completed, the system sets the corresponding To Be Distributed status. This status subsequently changes to Distributed if distribution is successful or Distribution Incorrect if distribution fails.
So after status of the service request is assigned as Completed, the Service request ID is ready for further processing. That’s why while an attempt is taken to change anything for that service request it will not allow making any change to master data like partner function. The status will show as To Be Distributed. The IDs will be locked which will prevent to do any further change. So it is required to unlock the document which has status as To Be Distributed.
In other words whenever a transaction is created in CRM, it gets replicated to ECC system and in response to it status data flow from ECC to CRM. Once this complete set of data is flowed between these two systems then the status for the document become Distributed Successfully. If this process is stuck in midway or any of the process has not finished in the system; the status for that Service request becomes To Be Distributed. This locks the Service request ID and don’t allow to do any change in it.
For this issue; SAP support gave a solution to configure in status management (Under complete status-> Change document allowed) but still the same issue is occurred in editing Service request transactions whose status are Completed.
Solution:In order to solve the issue encountered, during the conversion of Service request, a brief solution is described below.When the Service request has the status as To Be Distributed, it is ready to move for payroll process. So we can’t change any master data associated with it.
Hence the order is locked in the system. In order to make it editable we need to cancel order and set the status of the order as ‘Transfer Failed’ using FM CRM_STATUS_CHANGE_FOR_ACTIV_OW’. We will set status both for header and item level. Then we need to save the status for that order using function module ‘CRM_STATUS_SAVE_OW’.
As soon as we set the status as Transfer Failed, the system status changes to ‘Open’ and the user status remains Completed. Also the system sets the corresponding status as ‘Distribution Lock’ to it. As the system status has been changed to ‘Open’ and further distribution of data for further process is stopped, we can edit the Account and replace the new BP coming from ECC server with the old one.
Note: We need to call APIs ‘CRM_ORDER_MAINTAIN’ and then ‘CRM_ORDER_SAVE’ in order to reflect and save the change successfully during service request Transaction conversion whose status is ‘Completed’.