Symptom
A custom CDS view based on the I_ServiceDocumentEnhcd CDS view is created, with the expectation that the fields Billing Status (ServiceDocBillingStatus) and Released for Billing (ServiceDocIsReleasedForBilling) reflect the same values shown in the Manage Service Orders app for Billing Status and Invoice Status. However, the values in the custom CDS view do not match those displayed in the app.
"Image/data in this document is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental."
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
In the provided example, service order 8000000102 shows the following in the Manage Service Orders app:
- Billing Status = Fully Billed
- Invoice Status = All Items Billed
These statuses imply that all related service confirmations have been released for billing (which triggers the creation of Billing Document Requests), and invoices have been generated for those requests.
When using the I_ServiceDocumentEnhcd CDS view, the following values are retrieved for the same service order:
- ServiceDocBillingStatus = B (Partially Billed)
- ServiceDocIsReleasedForBilling = B (Partially Released for Billing)
This does not align with the app’s indication of full billing completion.
Cause
The Billing Status and Invoice Status fields displayed in the Manage Service Orders app are not retrieved directly from the I_ServiceDocumentEnhcd CDS view. Instead, these values are dynamically calculated based on the statuses of billing-relevant items within the associated service orders and service confirmations.
Conversely, the I_ServiceDocumentEnhcd CDS view retrieves billing status information that is maintained at the service contract level, not the detailed item-level status used in the app's calculation.
Resolution
Due to the current limitations of released CDS views, it is not possible to fully replicate the Billing Status and Invoice Status logic used in the Manage Service Orders app within a custom CDS view.
Keywords
SAP S/4HANA Cloud Public Edition, Public Cloud, billing status, invoice status, BILLING_RELEVANT, STAT_BILLING, STAT_FOR_BILLING, CL_CRMS4_COMMON_HDR_CALC_EXIT, CALC_HDR_BILLING_INV_STATUS, Fully Billed, Partially Billed, service order, service confirmation, status, completed, C, B, I_ServiceDocumentEnhcd, ServiceDocBillingStatus, ServiceDocIsReleasedForBilling, CRMS4_STAT_BILLING, CRMS4_STAT_FOR_BILLING_HEADER, Rlsd f Bllg, service contract , KBA , CRM-S4-SRV-SVO-FIO , S4CRM: Service Order Fiori-UI , CRM-S4-SRV-SVO , S4CRM: Service Order , How To
Product
Attachments
image.png |
image.png |
image.png |
image.png |