P_ServiceContractItemCube

DDL: P_SERVICECONTRACTITEMCUBE SQL: PSRVCONTRIEMCUBE Type: view COMPOSITE

P_ServiceContractItemCube is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_ServiceContractItemDateConv) and exposes 73 fields with key fields ServiceObjectType, ServiceContract, ServiceContractItem. It has 4 associations to related views.

Data Sources (1)

SourceAliasJoin Type
P_ServiceContractItemDateConv P_ServiceContractItemDateConv from

Associations (4)

CardinalityTargetAliasCondition
[1] I_ServiceDocumentEnhcd _ServiceContract $projection.ServiceObjectType = _ServiceContract.ServiceObjectType and $projection.ServiceContract = _ServiceContract.ServiceDocument
[0..1] I_CalendarDate _ExpiringCalendarMonth $projection.ServiceContractItemEndDate = _ExpiringCalendarMonth.CalendarDate
[0..1] I_CalendarDate _CurrentDate _CurrentDate.CalendarDate = $session.system_date
[0..1] I_ServiceDocumentType _ServiceContractType $projection.ServiceContractType = _ServiceContractType.ServiceDocumentType

Annotations (9)

NameValueLevelField
AbapCatalog.sqlViewName PSRVCONTRIEMCUBE view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
VDM.private true view
VDM.viewType #COMPOSITE 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 ServiceContract ServiceDocument Transaction ID
KEY ServiceContractItem ServiceDocumentItem Service Document
ServiceContractType ServiceDocumentType Transaction Type
ServiceContractItemUUID ServiceDocumentItemUUID
ServiceContractItemCharUUID ServiceDocumentItemCharUUID
ServiceContractItemObjectType ServiceDocumentItemObjectType
ServiceContractItemDescription ServiceDocumentItemDescription
ServiceDocumentType ServiceDocumentType Transaction Type
TransactionCurrency TransactionCurrency Transaction Currency
ServiceContractItemStartDate ServiceContractItemStartDate
ServiceContractItemEndDate ServiceContractItemEndDate
PurchaseOrderByCustomer PurchaseOrderByCustomer Purchase Order Number
ServiceContractStatus _ServiceContract ServiceDocumentStatus
ServiceTeam ServiceTeam
ResponsibleEmployee ResponsibleEmployee Employee Resp.
ServiceEmployee ServiceEmployee
ContactPerson ContactPerson Contact Person Key
ShipToParty ShipToParty Ship-To Party (obsolete)
RefBusinessSolutionOrder RefBusinessSolutionOrder
RefBusinessSolutionOrderItem RefBusinessSolutionOrderItem
Product Product Product Sold
RefInHouseRepairIsExisting RefInHouseRepairIsExisting
ServiceDocumentIsOpen _ServiceContract ServiceDocumentIsOpen
ServiceDocumentItemIsQuotation ServiceDocumentItemIsQuotation
ServiceDocumentTemplateType _ServiceContract ServiceDocumentTemplateType
ServiceContractItemStatus ServiceDocumentItemStatus
ServiceDocumentItemIsOpen ServiceDocumentItemIsOpen
ServiceDocumentItemNetAmount ServiceDocumentItemNetAmount
SalesOrganization SalesOrganization Sales Organization
SalesOffice SalesOffice Sales Office
SalesGroup SalesGroup Sales Group
DistributionChannel DistributionChannel RefDistCh-Cust/Mat.
Division Division Internal Division ID
SoldToParty SoldToParty Sold-to Party
ServiceOrganization ServiceOrganization
SalesOrganizationOrgUnitID SalesOrganizationOrgUnitID
SalesOfficeOrgUnitID SalesOfficeOrgUnitID
SalesGroupOrgUnitID SalesGroupOrgUnitID
CalendarMonth _ExpiringCalendarMonth CalendarMonth Calendar Month
NrOfExprgServiceContractItems
ActualProcessingEndDate
_RespEmployee _RespEmployee
_ServiceDocItemStatus _ServiceDocItemStatus
_SrvcDocItmLifecycleStatus _SrvcDocItmLifecycleStatus
_ServiceDocumentType _ServiceDocumentType
_ServiceContract _ServiceContract
_CurrentDate _CurrentDate
_ServiceDocument _ServiceDocument
_ServiceObjType _ServiceObjType
_TransactionCurrency _TransactionCurrency
_SalesOrganization _SalesOrganization
_SalesOffice _SalesOffice
_SalesGroup _SalesGroup
_Division _Division
_DistributionChannel _DistributionChannel
_SoldToParty _SoldToParty
_Product _Product
_ServiceDocItemRefObj _ServiceDocItemRefObj
_ServiceContractType _ServiceContractType
_ServiceTeam _ServiceTeam
_ServiceEmployee _ServiceEmployee
_ContactPerson _ContactPerson
_ServiceDocumentIsOpen _ServiceDocumentIsOpen
_ServiceDocumentStatus _ServiceContract _ServiceDocumentStatus
_SrvcDocLifecycleStatus _ServiceContract _SrvcDocLifecycleStatus
_CalendarMonth _ExpiringCalendarMonth _CalendarMonth
_ExpiringCalendarMonth _ExpiringCalendarMonth
_ServiceOrganizationOrgUnit_2 _ServiceOrganizationOrgUnit_2
_SalesOrganizationOrgUnit_2 _SalesOrganizationOrgUnit_2
_SalesOfficeOrgUnit_2 _SalesOfficeOrgUnit_2
_SalesGroupOrgUnit_2 _SalesGroupOrgUnit_2
_ShipToParty _ShipToParty

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_ServiceContractItemCube.
-- 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: PSRVCONTRIEMCUBE

CREATE VIEW P_ServiceContractItemCube AS
SELECT
  ServiceObjectType,
  ServiceDocument AS ServiceContract,
  ServiceDocumentItem AS ServiceContractItem,
  ServiceDocumentType AS ServiceContractType,
  ServiceDocumentItemUUID AS ServiceContractItemUUID,
  ServiceDocumentItemCharUUID AS ServiceContractItemCharUUID,
  ServiceDocumentItemObjectType AS ServiceContractItemObjectType,
  ServiceDocumentItemDescription AS ServiceContractItemDescription,
  ServiceDocumentType,
  TransactionCurrency,
  ServiceContractItemStartDate,
  ServiceContractItemEndDate,
  PurchaseOrderByCustomer,
  _ServiceContract.ServiceDocumentStatus AS ServiceContractStatus,
  ServiceTeam,
  ResponsibleEmployee,
  ServiceEmployee,
  ContactPerson,
  ShipToParty,
  RefBusinessSolutionOrder,
  RefBusinessSolutionOrderItem,
  Product,
  RefInHouseRepairIsExisting,
  _ServiceContract.ServiceDocumentIsOpen AS ServiceDocumentIsOpen,
  ServiceDocumentItemIsQuotation,
  _ServiceContract.ServiceDocumentTemplateType AS ServiceDocumentTemplateType,
  ServiceDocumentItemStatus AS ServiceContractItemStatus,
  ServiceDocumentItemIsOpen,
  ServiceDocumentItemNetAmount,
  SalesOrganization,
  SalesOffice,
  SalesGroup,
  DistributionChannel,
  Division,
  SoldToParty,
  ServiceOrganization,
  SalesOrganizationOrgUnitID,
  SalesOfficeOrgUnitID,
  SalesGroupOrgUnitID,
  _ExpiringCalendarMonth.CalendarMonth AS CalendarMonth,
  cast (1 as abap.int4) AS NrOfExprgServiceContractItems,
  dats_add_months( _CurrentDate.FirstDayOfMonthDate,4,'FAIL') AS ActualProcessingEndDate,
  _ServiceContract._ServiceDocumentStatus AS _ServiceDocumentStatus,
  _ServiceContract._SrvcDocLifecycleStatus AS _SrvcDocLifecycleStatus,
  _ExpiringCalendarMonth._CalendarMonth AS _CalendarMonth
FROM P_ServiceContractItemDateConv
LEFT OUTER JOIN I_ServiceDocumentEnhcd AS _ServiceContract ON ServiceObjectType = _ServiceContract.ServiceObjectType AND ServiceContract = _ServiceContract.ServiceDocument  -- association [1]
LEFT OUTER JOIN I_CalendarDate AS _ExpiringCalendarMonth ON ServiceContractItemEndDate = _ExpiringCalendarMonth.CalendarDate  -- association [0..1]
LEFT OUTER JOIN I_CalendarDate AS _CurrentDate ON _CurrentDate.CalendarDate = $session.system_date  -- association [0..1]
LEFT OUTER JOIN I_ServiceDocumentType AS _ServiceContractType ON ServiceContractType = _ServiceContractType.ServiceDocumentType  -- association [0..1]
;