You're getting the error message "You cannot delete this query as it is being used by the following artifacts: - " YY1_XXXX_AQWG " ( YY1_XXXX ) of type AQRY" when trying to delete a Custom Analytical Query.
SAP S/4HANA Cloud.
Reproducing the Issue
- Go to Custom Analytical Queries app
- Search for the query
- Check the checkbox for the query and try to delete it
- Error message is triggered
There is still an application based on the query available on the system. You need to delete the query dependencies before deleting it.
If you have an application created you probably have catalogs assigned to it. You’ll need to delete those catalogs first, please follow the steps below:
- Go to Custom Catalog Extensions app
- Search for the App ID or App Description and click on it to open the catalogs
*If you have Business Catalogs on “Unpublished” status, please skip to the step 5. Otherwise, if your catalogs are in “Published” status you’ll need to revoke them. If this is your case please continue following the instructions below:
- Click on the checkbox for all catalogs in use
- Click on “Revoke” button
- You’ll notice that after that the status will change to “Unpublished” and now you’ll be able to delete the catalogs.
- Click on the checkbox for all catalogs in use and click on “Remove” button. Now you don’t have dependencies in Custom Catalog Extensions.
Once that all catalogs are removed, it’s necessary to delete the application.
To delete the application, follow the steps below:
- Go to View Browser app
- Search for the App ID or App Description and click on it
- At the top of the page, next to the view name, you will notice that there are some buttons. Click on the “Delete Application” button and proceed with the deletion.
Now that all dependencies were deleted, you can go ahead and delete your Custom Analytical Query.
error message, you cannot delete this query as it is being used by the following artifacts, delete a Custom Analytical Query, custom analytical queries , KBA , BC-SRV-APS-IAM , Identity and Access Management , Problem