How To Fix AQ878 - Subtotals are only allowed for sorted columns


SAP Error Message - Details

  • Message type: E = Error

  • Message class: AQ - Message texts for SAP Query

  • Message number: 878

  • Message text: Subtotals are only allowed for sorted columns

  • Show details Hide details
  • What causes this issue?

    You attempted to calculate sub-totals for the numeric values in your
    table by selecting the appropriate columns, but you must sort these
    columns first.

    System Response

    The system issues an error message and will not allow you to continue with this transaction until the error is resolved.

    How to fix this error?

    If you want sub-totals for a particular field, you must first sort the
    table by this field. You then select the field or the relevant column.

    Error message extract from SAP system. Copyright SAP SE.


Smart SAP Assistant

  • What is the cause and solution for SAP error message AQ878 - Subtotals are only allowed for sorted columns ?

    The SAP error message AQ878, which states "Subtotals are only allowed for sorted columns," typically occurs in the context of reporting or data analysis within SAP systems, particularly when using tools like SAP Query or SAP Report Painter. This error indicates that you are trying to create subtotals in a report where the data is not sorted according to the column for which you want to create the subtotal.

    Cause:

    The primary cause of this error is that subtotals can only be calculated on sorted data. If the data in the report is not sorted by the column for which you are trying to create a subtotal, SAP will throw this error. This is because subtotals require a clear grouping of data, which is only possible when the data is sorted.

    Solution:

    To resolve the AQ878 error, follow these steps:

    1. Sort the Data:

      • Ensure that the data in your report is sorted by the column for which you want to create subtotals. You can usually do this by selecting the appropriate sorting option in the report layout or query settings.
    2. Check Report Settings:

      • Review the settings of your report or query to ensure that the sorting is applied correctly. You may need to adjust the sorting order or criteria.
    3. Recreate the Report:

      • If the issue persists, consider recreating the report or query from scratch, ensuring that you apply sorting before attempting to add subtotals.
    4. Use Grouping:

      • If applicable, use grouping features in your reporting tool to group data before applying subtotals.
    5. Consult Documentation:

      • Refer to SAP documentation or help resources specific to the reporting tool you are using for additional guidance on sorting and subtotaling.

    Related Information:

    • SAP Query: If you are using SAP Query, you can set the sorting options in the query definition.
    • Report Painter: In Report Painter, you can define the sorting in the layout settings.
    • SAP Notes: Check SAP Notes for any specific patches or updates related to this error message.
    • User Permissions: Ensure that you have the necessary permissions to modify the report settings.

    By following these steps, you should be able to resolve the AQ878 error and successfully create subtotals in your SAP report.

    • Do you have any question about this error?


      Upgrade now to chat with this error.


Instant HelpGet instant SAP help. Start your 7-day free trial now.


Related SAP Error Messages

Click the links below to see the following related messages:

Click on this link to search all SAP messages.


Rating
ERPlingo's SAP support assistant is amazing. Saves me countless hours trying to solve complex SAP issues myself. It's a real game changer!
Rate 1
Thomas Michael
SAP Consultant, Author & Speaker