P_ServiceOrderDataCube
P_ServiceOrderDataCube is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_ServiceDocumentEnhcd) and exposes 73 fields with key fields ServiceObjectType, ServiceOrder. It has 3 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_ServiceDocumentEnhcd | I_ServiceDocumentEnhcd | from |
Associations (3)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_CalendarDate | _Period | $projection.ServiceDocumentCreationDate = _Period.CalendarDate |
| [0..1] | P_SrvcOrdDistinctConfExist | _SrvcOrdItmConfExist | $projection.ServiceObjectType = _SrvcOrdItmConfExist.ServiceObjectType and $projection.ServiceOrder = _SrvcOrdItmConfExist.ServiceOrder |
| [1..1] | I_SrvcOrdConfStatus | _SrvcOrdConfStatus | $projection.SrvcOrdHasConfdItem = _SrvcOrdConfStatus.SrvcOrdHasConfdItem |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.sqlViewName | PSERVORDDCUBE | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view |
Fields (73)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | ServiceObjectType | ServiceObjectType | Object Type | |
| KEY | ServiceOrder | ServiceDocument | Transaction ID | |
| ServiceOrderDescription | ServiceDocumentDescription | |||
| ServiceOrderStatus | ServiceDocumentStatus | |||
| ServiceDocumentType | ServiceDocumentType | Transaction Type | ||
| RefBusinessSolutionOrder | RefBusinessSolutionOrder | |||
| RespyMgmtServiceTeam | RespyMgmtServiceTeam | |||
| RespyMgmtServiceTeamDesc | ||||
| TeamName | _ServiceTeamHeader | TeamName | ||
| ServiceDocumentTemplateType | ServiceDocumentTemplateType | |||
| SoldToParty | SoldToParty | Sold-to Party | ||
| ResponsibleEmployee | ResponsibleEmployee | Employee Resp. | ||
| ServiceEmployee | ServiceEmployee | |||
| ContactPerson | ContactPerson | Contact Person Key | ||
| ServiceTeam | ServiceTeam | |||
| RequestedServiceEndDate | RequestedServiceEndDate | |||
| ServiceDocumentCreationDate | ServiceDocumentCreationDate | |||
| ServiceDocumentPriority | ServiceDocumentPriority | |||
| ServiceDocumentHasError | ServiceDocumentHasError | |||
| ServiceDocNetAmount | ServiceDocNetAmount | |||
| TransactionCurrency | TransactionCurrency | Transaction Currency | ||
| PurchaseOrderByCustomer | PurchaseOrderByCustomer | Purchase Order Number | ||
| SalesOrganizationOrgUnitID | SalesOrganizationOrgUnitID | |||
| SalesOfficeOrgUnitID | SalesOfficeOrgUnitID | |||
| SalesGroupOrgUnitID | SalesGroupOrgUnitID | |||
| ServiceOrganization | ServiceOrganization | |||
| SalesOrganization | SalesOrganization | Sales Organization | ||
| DistributionChannel | DistributionChannel | RefDistCh-Cust/Mat. | ||
| Division | Division | Internal Division ID | ||
| SalesOffice | SalesOffice | Sales Office | ||
| SalesGroup | SalesGroup | Sales Group | ||
| SrvcOrdCreationQuarter | _Period | CalendarQuarter | Calendar Quarter | |
| SrvcOrdCreationMonth | _Period | CalendarMonth | Calendar Month | |
| SrvcOrdCreationYear | _Period | CalendarYear | Year | |
| int4asNmbrOfIncompleteServiceOrders | ||||
| NumberOfIncomingServiceOrders | ||||
| int4asNumberOfOpenServiceOrders | ||||
| int4endasNumberOfOverdueServiceOrders | ||||
| ServiceDocumentIsOpen | ServiceDocumentIsOpen | |||
| ServiceReferenceObjectType | _ServiceDocRefObj | ServiceReferenceObjectType | ||
| SrvcRefObjIsMainObject | _ServiceDocRefObj | SrvcRefObjIsMainObject | ||
| ProductID | _ServiceDocRefObj | ProductID | Product ID | |
| SerialNumber | _ServiceDocRefObj | SerialNumber | Serial Number | |
| Equipment | _ServiceDocRefObj | Equipment | Equipment check | |
| FunctionalLocation | _ServiceDocRefObj | FunctionalLocation | Object ID | |
| _ServiceObjType | _ServiceObjType | |||
| _ServiceDocumentIsOpen | _ServiceDocumentIsOpen | |||
| _ServiceDocumentStatus | _ServiceDocumentStatus | |||
| _SrvcDocLifecycleStatus | _SrvcDocLifecycleStatus | |||
| _ServiceDocumentType | _ServiceDocumentType | |||
| _ServiceDocumentPriority | _ServiceDocumentPriority | |||
| _SoldToParty | _SoldToParty | |||
| _RespEmployee | _RespEmployee | |||
| _ServiceTeam | _ServiceTeam | |||
| _ServiceEmployee | _ServiceEmployee | |||
| _ContactPerson | _ContactPerson | |||
| _ServiceDocHasError | _ServiceDocHasError | |||
| _SrvcOrdConfStatus | _SrvcOrdConfStatus | |||
| _SalesOrganizationOrgUnit | _SalesOrganizationOrgUnit | |||
| _SalesOfficeOrgUnit | _SalesOfficeOrgUnit | |||
| _SalesGroupOrgUnit | _SalesGroupOrgUnit | |||
| _SalesOrganization | _SalesOrganization | |||
| _SalesOffice | _SalesOffice | |||
| _SalesGroup | _SalesGroup | |||
| _DistributionChannel | _DistributionChannel | |||
| _Division | _Division | |||
| _SalesOrganizationOrgUnit_2 | _SalesOrganizationOrgUnit_2 | |||
| _SalesOfficeOrgUnit_2 | _SalesOfficeOrgUnit_2 | |||
| _SalesGroupOrgUnit_2 | _SalesGroupOrgUnit_2 | |||
| _TransactionCurrency | _TransactionCurrency | |||
| _Period | _Period | |||
| _ServiceDocRefObj | _ServiceDocRefObj | |||
| _ServiceTeamHeader | _ServiceTeamHeader |
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 P_ServiceOrderDataCube.
-- 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.
CREATE VIEW P_ServiceOrderDataCube AS
SELECT
ServiceObjectType,
ServiceDocument AS ServiceOrder,
ServiceDocumentDescription AS ServiceOrderDescription,
ServiceDocumentStatus AS ServiceOrderStatus,
ServiceDocumentType,
RefBusinessSolutionOrder,
RespyMgmtServiceTeam,
_ServiceTeamHeader._TeamDescription.TeamDescription AS RespyMgmtServiceTeamDesc,
_ServiceTeamHeader.TeamName AS TeamName,
ServiceDocumentTemplateType,
SoldToParty,
ResponsibleEmployee,
ServiceEmployee,
ContactPerson,
ServiceTeam,
RequestedServiceEndDate,
ServiceDocumentCreationDate,
ServiceDocumentPriority,
ServiceDocumentHasError,
ServiceDocNetAmount,
TransactionCurrency,
PurchaseOrderByCustomer,
SalesOrganizationOrgUnitID,
SalesOfficeOrgUnitID,
SalesGroupOrgUnitID,
ServiceOrganization,
SalesOrganization,
DistributionChannel,
Division,
SalesOffice,
SalesGroup,
_Period.CalendarQuarter AS SrvcOrdCreationQuarter,
_Period.CalendarMonth AS SrvcOrdCreationMonth,
_Period.CalendarYear AS SrvcOrdCreationYear,
cast( case when ServiceDocumentIsOpen = 'X' then cast (1 as abap.int4) end as abap.int4 ) as NmbrOfIncompleteServiceOrders AS int4asNmbrOfIncompleteServiceOrders,
cast(1 as abap.int4) AS NumberOfIncomingServiceOrders,
cast( case when ServiceDocumentIsOpen = 'X' then 1 else 0 end as abap.int4 ) as NumberOfOpenServiceOrders AS int4asNumberOfOpenServiceOrders,
case when RequestedServiceEndDate < $session.system_date and ServiceDocumentIsOpen = 'X' then cast (1 as abap.int4) end as NumberOfOverdueServiceOrders AS int4endasNumberOfOverdueServiceOrders,
ServiceDocumentIsOpen,
_ServiceDocRefObj.ServiceReferenceObjectType AS ServiceReferenceObjectType,
_ServiceDocRefObj.SrvcRefObjIsMainObject AS SrvcRefObjIsMainObject,
_ServiceDocRefObj.ProductID AS ProductID,
_ServiceDocRefObj.SerialNumber AS SerialNumber,
_ServiceDocRefObj.Equipment AS Equipment,
_ServiceDocRefObj.FunctionalLocation AS FunctionalLocation
FROM I_ServiceDocumentEnhcd
LEFT OUTER JOIN I_CalendarDate AS _Period ON ServiceDocumentCreationDate = _Period.CalendarDate -- association [0..1]
LEFT OUTER JOIN P_SrvcOrdDistinctConfExist AS _SrvcOrdItmConfExist ON ServiceObjectType = _SrvcOrdItmConfExist.ServiceObjectType AND ServiceOrder = _SrvcOrdItmConfExist.ServiceOrder -- association [0..1]
LEFT OUTER JOIN I_SrvcOrdConfStatus AS _SrvcOrdConfStatus ON SrvcOrdHasConfdItem = _SrvcOrdConfStatus.SrvcOrdHasConfdItem -- association [1..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA