Why is my request stuck in pending cancellation

Document ID : KB000118769
Last Modified Date : 31/10/2018
Show Technical Document Details
Question:
How can I delete a request stuck in pending cancellation status?
Why is it in this state?
Answer:
Accounting > Configuration > Subscription Configuration > Default Cancellation State 

Pending Cancellation 
Applies only when CA Service Catalog is installed, service is not subscribed, and the default Cancellation status under Accounting, Configuration is set to Pending Cancellation. On cancellation, a request first reaches the Pending Cancellation status and then, after an invoice is run, it reaches the Cancelled state, or when a request reaches the complete state and then cancelled, the request is in pending cancellation state till the invoice is run. 

https://docops.ca.com/ca-service-management/14-1/en/using/request-management/request-management-using-ca-service-catalog/status-values

If you do not want to correct and want to force change the state,
then after you backup the MDB (make sure you have a backup) you can run:

1) Execute the following commands and make sure that the corresponding request is the one to be modified: 

a) SELECT DISTINCT request_id FROM usm_subscription_detail WHERE status=3 
b) SELECT DISTINCT request_id FROM usm_request WHERE status=3 

2) Once you confirm that this is the correct request, you need to execute the following SQL commands to "delete" the cancelled requests: 

a) UPDATE usm_subscription_detail SET status=2 WHEREstatus=3 
b) UPDATE usm_request SET status=2 WHERE status=3