Deprecated PUBLIC_LOCAL_API
This CDS view is deprecated in S/4HANA. Use I_ServiceOrderCube_2 instead. View all deprecated CDS views →

I_NumberOfServiceDocuments

DDL: I_NUMBEROFSERVICEDOCUMENTS SQL: INMBRSRVCDOCS Type: view COMPOSITE

View to fetch no of service documents

I_NumberOfServiceDocuments is a Composite CDS View (Cube) that provides data about "View to fetch no of service documents" in SAP S/4HANA. It reads from 1 data source (I_ServiceDocumentEnhcd) and exposes 31 fields with key fields ServiceObjectType, ServiceDocument.

Data Sources (1)

SourceAliasJoin Type
I_ServiceDocumentEnhcd I_ServiceDocumentEnhcd from

Parameters (1)

NameTypeDefault
P_ObjectType crmt_subobject_category_db

Annotations (15)

NameValueLevelField
AbapCatalog.sqlViewName INMBRSRVCDOCS view
AbapCatalog.compiler.compareFilter true view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label View to fetch no of service documents view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
VDM.lifecycle.status #DEPRECATED view
VDM.lifecycle.successor I_ServiceOrderCube_2 view
AccessControl.authorizationCheck #CHECK view
ObjectModel.representativeKey ServiceObjectType view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
Analytics.dataCategory #CUBE view
Metadata.allowExtensions true view

Fields (31)

KeyFieldSource TableSource FieldDescription
KEY ServiceObjectType ServiceObjectType Object Type
KEY ServiceDocument ServiceDocument Transaction ID
ServiceDocumentHasError ServiceDocumentHasError
ServiceDocumentType ServiceDocumentType Transaction Type
ServiceOrganization ServiceOrganization
ResponsibleEmployee ResponsibleEmployee Employee Resp.
int4endasNumberOfErroneousServiceDocs
int4endasNumberOfCorrectServiceDocs
SalesOrganization SalesOrganization Sales Organization
DistributionChannel DistributionChannel RefDistCh-Cust/Mat.
Division Division Internal Division ID
SalesOffice SalesOffice Sales Office
SalesGroup SalesGroup Sales Group
SalesOrganizationOrgUnitID SalesOrganizationOrgUnitID
SalesOfficeOrgUnitID SalesOfficeOrgUnitID
SalesGroupOrgUnitID SalesGroupOrgUnitID
_SalesOrganization _SalesOrganization
_SalesOffice _SalesOffice
_SalesGroup _SalesGroup
_DistributionChannel _DistributionChannel
_Division _Division
_SalesOrganizationOrgUnit _SalesOrganizationOrgUnit
_SalesOrganizationOrgUnit_2 _SalesOrganizationOrgUnit_2
_SalesOfficeOrgUnit _SalesOfficeOrgUnit
_SalesOfficeOrgUnit_2 _SalesOfficeOrgUnit_2
_SalesGroupOrgUnit _SalesGroupOrgUnit
_SalesGroupOrgUnit_2 _SalesGroupOrgUnit_2
_ServiceDocHasError _ServiceDocHasError
_ServiceOrganizationOrgUnit _ServiceOrganizationOrgUnit
_ServiceOrganizationOrgUnit_2 _ServiceOrganizationOrgUnit_2
_RespEmployee _RespEmployee

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view I_NumberOfServiceDocuments.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: INMBRSRVCDOCS
-- Parameters: P_ObjectType : crmt_subobject_category_db

CREATE VIEW I_NumberOfServiceDocuments AS
SELECT
  ServiceObjectType,
  ServiceDocument,
  ServiceDocumentHasError,
  ServiceDocumentType,
  ServiceOrganization,
  ResponsibleEmployee,
  case when ServiceDocumentHasError = 'X' then cast (1 as abap.int4) end as NumberOfErroneousServiceDocs AS int4endasNumberOfErroneousServiceDocs,
  case when ServiceDocumentHasError = ' ' then cast (1 as abap.int4) end as NumberOfCorrectServiceDocs AS int4endasNumberOfCorrectServiceDocs,
  SalesOrganization,
  DistributionChannel,
  Division,
  SalesOffice,
  SalesGroup,
  SalesOrganizationOrgUnitID,
  SalesOfficeOrgUnitID,
  SalesGroupOrgUnitID
FROM I_ServiceDocumentEnhcd
;