P_ServiceOrderDataCube

DDL: P_SERVICEORDERDATACUBE Type: view COMPOSITE

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)

SourceAliasJoin Type
I_ServiceDocumentEnhcd I_ServiceDocumentEnhcd from

Associations (3)

CardinalityTargetAliasCondition
[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)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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]
;