Order management analytics report fails to filter out cancelled orders

We’re experiencing an issue with our embedded analytics report for order management in S/4HANA 2020. The report displays all orders including those with status ‘CANCELLED’, which is inflating our metrics significantly. We need to filter these out at the CDS view level.

The current CDS view definition includes:

define view Z_ORDER_ANALYTICS as select from I_SalesOrder {
  SalesOrder,
  SalesOrderType,
  TotalNetAmount,
  OverallSDProcessStatus
}

Our Fiori report is pulling from this view, but we can’t seem to exclude cancelled orders effectively. The order status filter in the Fiori app doesn’t persist, and users keep seeing inflated numbers. Has anyone successfully modified a CDS view to handle order status filtering while maintaining report performance?

I’ll address all three aspects of your issue: order status filter, CDS view modification, and Fiori report update.

CDS View Modification: Your current view is missing the rejection status field and proper filtering logic. Here’s the corrected approach:

define view Z_ORDER_ANALYTICS as select from I_SalesOrder {
  key SalesOrder,
  SalesOrderType,
  TotalNetAmount,
  OverallSDProcessStatus,
  SDDocumentRejectionStatus
} where SDDocumentRejectionStatus = ' '

The key is filtering on SDDocumentRejectionStatus - when it’s blank, the order isn’t rejected/cancelled. This handles order status filtering at the data source level, which is the most efficient approach.

Enhanced Filtering (Alternative): If you need more granular control, add a calculated field:

case SDDocumentRejectionStatus
  when ' ' then 'ACTIVE'
  else 'CANCELLED'
end as OrderStatusCategory

This creates a clear, filterable dimension that’s easier for report consumers to understand.

Fiori Report Update: In your Fiori app’s manifest.json, add default filter values under the sap.ui5 section:

"sap.ui.generic.app": {
  "pages": [{
    "component": {
      "settings": {
        "defaultFilterValues": {
          "SDDocumentRejectionStatus": " "
        }
      }
    }
  }]
}

Critical Points:

  1. Order Status Filter: Use SDDocumentRejectionStatus (blank = active) rather than OverallSDProcessStatus which reflects processing stages, not cancellation
  2. CDS View Performance: Adding the WHERE clause at CDS level ensures database-level filtering, maintaining performance even with large datasets
  3. Fiori Persistence: Default filter values in manifest.json ensure the filter persists across sessions and is applied automatically

Additional Recommendations:

  • Add @Analytics.dataCategory: #CUBE annotation if using for analytical queries
  • Consider adding OverallDeliveryStatus as a secondary check for fully cancelled scenarios
  • Test with transaction VA05 to verify which orders should appear in your metrics
  • Clear browser cache after manifest.json changes to ensure new defaults load

This three-layer approach (CDS filtering, calculated field, and Fiori defaults) ensures cancelled orders are excluded while giving users visibility into why certain orders aren’t appearing if they modify filters.


This draft is based on general SAP S/4HANA knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.

I’ve seen this before. The issue is that OverallSDProcessStatus alone doesn’t capture cancelled orders properly. You need to join with I_SalesOrderItem and check both header and item-level cancellation flags. Also, make sure your Fiori app’s filter bar is configured to default-exclude cancelled statuses in the manifest.json.

The CDS view needs additional logic. Add a calculated field that checks multiple cancellation indicators. In S/4HANA 2020, you should check SDDocumentRejectionStatus and OverallDeliveryStatus together. Create a case statement in your CDS view that evaluates these fields and exposes a boolean IsCancelled flag. This way, your Fiori report can filter on a single, reliable field rather than trying to interpret multiple status codes.

Have you checked the data category annotations in your CDS view? For analytical queries, you need to ensure proper dimension and measure definitions. If the status field isn’t properly annotated as a dimension, the filtering might not work correctly in the analytical engine. Also verify that your CDS view is consumption-type and not just a basic view.

Two things to check: First, ensure you’re using the correct analytical annotations (@Analytics.dataCategory: #CUBE). Second, the Fiori report update needs to include default filter values. In the app’s selection variant, set the status exclusion as a mandatory filter. I’ve found that relying solely on CDS view WHERE clauses can cause issues with drill-down scenarios. You want the flexibility at the consumption layer while having clean data definitions at the CDS level.

We had similar metric inflation issues. The problem was that our CDS view was pulling from the wrong data source. Instead of I_SalesOrder, try using I_SalesOrderItemCube which has better built-in filtering capabilities for analytical scenarios. It already handles most cancellation logic and provides cleaner aggregations. You’ll still need to modify your Fiori app configuration, but the CDS view changes will be minimal.

Check if you’re using the correct status field. OverallSDProcessStatus shows overall processing, but for cancellations you need SDDocumentRejectionStatus. We’ve implemented something similar recently and this was the key differentiator.