SAP Knowledge Base Article - Public

3207187 - You cannot delete this query as it is being used by the following artifacts - S/4HANA Cloud / Custom Analytical Queries

Symptom

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. 

Environment

SAP S/4HANA Cloud. 

Reproducing the Issue

  1. Go to Custom Analytical Queries app
  2. Search for the query 
  3. Check the checkbox for the query and try to delete it 
  4. Error message is triggered

Cause

There is still an application based on the query available on the system. You need to delete the query dependencies before deleting it. 

Resolution

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:

  1. Go to Custom Catalog Extensions app
  2. 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: 
  3. Click on the checkbox for all catalogs in use
  4. Click on “Revoke” button
  5. You’ll notice that after that the status will change to “Unpublished” and now you’ll be able to delete the catalogs.
  6. 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:

  1. Go to View Browser app
  2. Search for the App ID or App Description and click on it
  3. 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.

See Also

SAP Blog Post - How to delete a custom analytical query

Keywords

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

Product

SAP S/4HANA Cloud Public Edition all versions ; SAP S/4HANA Cloud all versions