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:
- Order Status Filter: Use SDDocumentRejectionStatus (blank = active) rather than OverallSDProcessStatus which reflects processing stages, not cancellation
- CDS View Performance: Adding the WHERE clause at CDS level ensures database-level filtering, maintaining performance even with large datasets
- 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.