C_Customer360ServiceOrder

DDL: C_CUSTOMER360SERVICEORDER Type: view_entity CONSUMPTION

Customer 360 Service Order

C_Customer360ServiceOrder is a Consumption CDS View that provides data about "Customer 360 Service Order" in SAP S/4HANA. It reads from 2 data sources (I_Customer360BusDocSetting, I_ServiceDocumentEnhcd) and exposes 144 fields with key field ServiceOrder. It has 18 associations to related views. It is exposed through 1 OData service (SD_ADVNCD_CUSTOMER360).

Data Sources (2)

SourceAliasJoin Type
I_Customer360BusDocSetting Customer360BusDocSetting inner
I_ServiceDocumentEnhcd ServiceOrder from

Associations (18)

CardinalityTargetAliasCondition
[1..1] C_SrvcOrderDateTimeline _SrvcOrderDateTimeline $projection.ServiceOrder = _SrvcOrderDateTimeline.ServiceDocument
[1..*] C_ServiceDocumentItemRefObject _ServiceDocumentItemRefObject $projection.ServiceOrder = _ServiceDocumentItemRefObject.ServiceDocument and _ServiceDocumentItemRefObject.ServiceDocumentItem = '000000'
[0..1] C_SrvcDocBPContactCardQuickVw _SrvcDocBPContactCard $projection.ContactPersonBusinessPartnerId = _SrvcDocBPContactCard.BusinessPartner
[1..*] C_SrvcDocDateInformation _SrvcDateInfo ( $projection.ServiceOrder = _SrvcDateInfo.ServiceDocument and $projection.ServiceObjectType = _SrvcDateInfo.ServiceObjectType and _SrvcDateInfo.ServiceDocumentItem = '000000' ) or ( $projection.ServiceDocumentUUID = _SrvcDateInfo.SrvcMgmtObjectUUID )
[0..*] C_SrvcDocUserStatus _SrvcOrdUserStatus $projection.ServiceDocumentUUID = _SrvcOrdUserStatus.StatusObjectUUID
[0..*] I_StatusObjectUUIDStatus _SrvcDocSystemStatus $projection.ServiceDocumentUUID = _SrvcDocSystemStatus.StatusObjectUUID and ( _SrvcDocSystemStatus.StatusCode = 'I1002' or _SrvcDocSystemStatus.StatusCode = 'I1003' or _SrvcDocSystemStatus.StatusCode = 'I1004' or _SrvcDocSystemStatus.StatusCode = 'I1005' ) and _SrvcDocSystemStatus.StatusIsActive = 'X'
[0..1] I_CustMgmtLifecycleUserStsText _CustMgmtLifecycleUserStsText $projection.ServiceOrderStatus = _CustMgmtLifecycleUserStsText.CustMgmtLifecycleUserStatus and _CustMgmtLifecycleUserStsText.Language = $session.system_language
[0..*] I_ServiceOrderStdVH _ServiceOrderStdVH $projection.ServiceOrder = _ServiceOrderStdVH.ServiceDocument
[0..1] I_SrvcDocBslnPlannedCost _SrvcDocBslnPlannedCost _SrvcDocBslnPlannedCost.ServiceDocument = $projection.ServiceOrder and _SrvcDocBslnPlannedCost.ServiceDocumentType = $projection.ServiceDocumentType
[0..1] I_SrvcDocBslnPlannedRevenue _SrvcDocBslnPlannedRevenue _SrvcDocBslnPlannedRevenue.ServiceDocument = $projection.ServiceOrder and _SrvcDocBslnPlannedRevenue.ServiceDocumentType = $projection.ServiceDocumentType
[0..1] C_SrvcMgmtSoldToPartyQuickVw _SrvcDocBPBillToParty $projection.BillToParty = _SrvcDocBPBillToParty.BusinessPartner
[0..1] C_SrvcMgmtSoldToPartyQuickVw _SrvcDocBPShipToParty $projection.ShipToParty = _SrvcDocBPShipToParty.BusinessPartner
[0..1] C_SrvcMgmtSoldToPartyQuickVw _SrvcDocBPPayerParty $projection.PayerParty = _SrvcDocBPPayerParty.BusinessPartner
[0..1] I_CustMgmtExtRefID _CustMgmtExtRef $projection.ServiceOrder = _CustMgmtExtRef.CustMgmtDocument and $projection.ServiceObjectType = _CustMgmtExtRef.CustMgmtObjectType and _CustMgmtExtRef.CustMgmtExtRefIDType = '0009'
[0..1] I_SrvcOrdRefMaintenancePlan _RefMaintenancePlan $projection.ServiceDocumentUUID = _RefMaintenancePlan.ServiceDocumentUUID and $projection.ServiceObjectType = _RefMaintenancePlan.ServiceObjectType
[0..1] I_SrvcOrdRefMaintenanceItem _RefMaintenanceItem $projection.ServiceDocumentUUID = _RefMaintenanceItem.ServiceDocumentUUID and $projection.ServiceObjectType = _RefMaintenanceItem.ServiceObjectType
[0..*] I_ServiceDocumentTypeText _ServiceOrderType $projection.ServiceDocumentType = _ServiceOrderType.ServiceDocumentType
[1..*] I_CustomerSEPAMandate _CustomerSEPAMandate $projection.SEPAMandate = _CustomerSEPAMandate.SEPAMandate and _CustomerSEPAMandate.SEPAMandateVersion = '0000'

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #CHECK view
EndUserText.label Customer 360 Service Order view
Metadata.allowExtensions true view
Search.searchable true view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XXL view
VDM.viewType #CONSUMPTION view

OData Services (1)

ServiceBindingVersionContractRelease
SD_ADVNCD_CUSTOMER360 SD_ADVNCD_CUSTOMER360 V4 C1 NOT_RELEASED

Fields (144)

KeyFieldSource TableSource FieldDescription
KEY ServiceOrder I_ServiceDocumentEnhcd ServiceDocument Transaction ID
ServiceDocumentType I_ServiceDocumentEnhcd ServiceDocumentType Transaction Type
ServiceDocumentTypeName
ServiceObjectType I_ServiceDocumentEnhcd ServiceObjectType Object Type
ServiceOrderDescription I_ServiceDocumentEnhcd ServiceDocumentDescription
SoldToParty I_ServiceDocumentEnhcd SoldToParty Sold-to Party
CompanyContactPersonFullName
BillToPartyName _SrvcDocBPBillToParty BusinessPartnerName Extracted Customer Name
ShipToPartyName _SrvcDocBPShipToParty BusinessPartnerName Extracted Customer Name
PayerPartyName _SrvcDocBPPayerParty BusinessPartnerName Extracted Customer Name
ShipToParty I_ServiceDocumentEnhcd ShipToParty Ship-To Party (obsolete)
BillToParty I_ServiceDocumentEnhcd BillToParty Inv. Recipient
PayerParty I_ServiceDocumentEnhcd PayerParty Payer
ContactPersonBusinessPartnerId I_ServiceDocumentEnhcd ContactPerson Contact Person Key
PaymentTerms I_ServiceDocumentEnhcd PaymentTerms Pyt Terms
PaymentTermsName
PaymentMethod I_ServiceDocumentEnhcd PaymentMethod Pymt Meth.
PaymentMethodDescription
SEPAMandate I_ServiceDocumentEnhcd SEPAMandate Mandate Reference
SEPAMandateCreditor _CustomerSEPAMandate SEPAMandateCreditor Creditor ID
SEPAMandateApplication _CustomerSEPAMandate SEPAMandateApplication
CustMgmtExtRefID _CustMgmtExtRef CustMgmtExtRefID
ServiceOrderPriority I_ServiceDocumentEnhcd ServiceDocumentPriority
ServiceDocumentPriorityName
PostingDate I_ServiceDocumentEnhcd PostingDate Posting Date for GR
ServiceDocumentHasError I_ServiceDocumentEnhcd ServiceDocumentHasError
ServiceDocGrossAmount I_ServiceDocumentEnhcd ServiceDocGrossAmount
ServiceDocNetAmount I_ServiceDocumentEnhcd ServiceDocNetAmount
ServiceDocTaxAmount I_ServiceDocumentEnhcd ServiceDocTaxAmount
TransactionCurrency I_ServiceDocumentEnhcd TransactionCurrency Transaction Currency
ServiceDocumentHasErrorName
ServiceOrderStatus I_ServiceDocumentEnhcd ServiceDocumentStatus
Material Reference Product
MaterialType
ProductID
ProductName
BusinessActivityCategory I_ServiceDocumentEnhcd BusinessActivityCategory
RequestedServiceStartDate I_ServiceDocumentEnhcd RequestedServiceStartDate Requested Start
RequestedServiceEndDate I_ServiceDocumentEnhcd RequestedServiceEndDate Requested End
ServiceDocCreationDateTime I_ServiceDocumentEnhcd ServiceDocCreationDateTime Creation Date
RequestedServiceStartDateTime
RequestedServiceEndDateTime
RespEmployeeBusinessPartnerId I_ServiceDocumentEnhcd ResponsibleEmployee Employee Resp.
ResponsibleEmployeeName
ServiceTeam I_ServiceDocumentEnhcd ServiceTeam
BusinessPartnerFullName
SoldToPartyCountry I_ServiceDocumentEnhcd SoldToPartyCountry
SoldToPartyRegion I_ServiceDocumentEnhcd SoldToPartyRegion
PurchaseOrderByCustomer I_ServiceDocumentEnhcd PurchaseOrderByCustomer Purchase Order Number
ServiceEmployee I_ServiceDocumentEnhcd ServiceEmployee
ServiceDocumentUUID I_ServiceDocumentEnhcd ServiceDocumentUUID Object GUID
ServiceDocumentIsReleased I_ServiceDocumentEnhcd ServiceDocumentIsReleased
ServiceDocumentIsOpen I_ServiceDocumentEnhcd ServiceDocumentIsOpen
ServiceDocumentIsRejected I_ServiceDocumentEnhcd ServiceDocumentIsRejected
SalesOrganization I_ServiceDocumentEnhcd SalesOrganization Sales Organization
SalesOrganizationName
DistributionChannel I_ServiceDocumentEnhcd DistributionChannel RefDistCh-Cust/Mat.
DistributionChannelName
Division I_ServiceDocumentEnhcd Division Internal Division ID
DivisionName
SalesOffice I_ServiceDocumentEnhcd SalesOffice Sales Office
SalesOfficeName
SalesGroup I_ServiceDocumentEnhcd SalesGroup Sales Group
SalesGroupName
Equipment
EquipmentName
SalesOrganizationOrgUnitID I_ServiceDocumentEnhcd SalesOrganizationOrgUnitID
SalesOfficeOrgUnitID I_ServiceDocumentEnhcd SalesOfficeOrgUnitID
SalesGroupOrgUnitID I_ServiceDocumentEnhcd SalesGroupOrgUnitID
ServiceOrganization I_ServiceDocumentEnhcd ServiceOrganization
RefBusinessSolutionOrder I_ServiceDocumentEnhcd RefBusinessSolutionOrder
SrvcOrdCreditStatus I_ServiceDocumentEnhcd SrvcDocCreditStatus
SrvcDocCreditStatusText
_SalesOrganizationOrgUnit_2 I_ServiceDocumentEnhcd _SalesOrganizationOrgUnit_2
_SalesOfficeOrgUnit_2 I_ServiceDocumentEnhcd _SalesOfficeOrgUnit_2
_SalesGroupOrgUnit_2 I_ServiceDocumentEnhcd _SalesGroupOrgUnit_2
_ServiceOrganizationOrgUnit_2 I_ServiceDocumentEnhcd _ServiceOrganizationOrgUnit_2
RespyMgmtServiceTeam I_ServiceDocumentEnhcd RespyMgmtServiceTeam
RespyMgmtServiceTeamDesc
RespyMgmtServiceTeamName
ActualServiceStartDateTime
PlannedServiceEndDateTime
PlannedServiceStartDateTime
ServiceFirstResponseByDateTime
SrvcDocItemSLADueByDateTime
MaintenancePlan _RefMaintenancePlan MaintenancePlan MaintenancePlan
MaintenancePlanDesc _RefMaintenancePlan MaintenancePlanDesc
SrvcDocBslnCostPostgStatus I_ServiceDocumentEnhcd SrvcDocBslnCostPostgStatus
SrvcDocBslnCostPostgStatusText
SrvcDocTransferStatus I_ServiceDocumentEnhcd SrvcDocTransferStatus
SrvcDocTransferStatusText
MaintenanceItem _RefMaintenanceItem MaintenanceItem MaintItem
MaintenanceItemDescription _RefMaintenanceItem MaintenanceItemDescription MaintItem text
SystemStatus _SrvcDocSystemStatus StatusCode Statuscode
StatusProfile
SrvcDocBslnPlndCostAmount _SrvcDocBslnPlannedCost SrvcDocBslnPlndCostAmount
SrvcDocBslnPlndRevenueAmount _SrvcDocBslnPlannedRevenue SrvcDocBslnPlndRevenueAmount
Customer
SitnNumberOfInstances
SitnNmbrOfInstceInHierarchy
SrvcDocSituationStatusText
SrvcDocSituationStatus
_SoldToParty I_ServiceDocumentEnhcd _SoldToParty
_ShipToParty I_ServiceDocumentEnhcd _ShipToParty
_BillToParty I_ServiceDocumentEnhcd _BillToParty
_PayerParty I_ServiceDocumentEnhcd _PayerParty
_RespEmployee I_ServiceDocumentEnhcd _RespEmployee
_ServiceTeam I_ServiceDocumentEnhcd _ServiceTeam
_ServiceEmployee I_ServiceDocumentEnhcd _ServiceEmployee
_ContactPerson I_ServiceDocumentEnhcd _ContactPerson
_ServiceDocumentType I_ServiceDocumentEnhcd _ServiceDocumentType
_ServiceDocumentPriority I_ServiceDocumentEnhcd _ServiceDocumentPriority
_ServiceDocumentStatus I_ServiceDocumentEnhcd _ServiceDocumentStatus
_ServiceDocHasError I_ServiceDocumentEnhcd _ServiceDocHasError
_ActivityCategory I_ServiceDocumentEnhcd _ActivityCategory
_ServiceDocRefObj I_ServiceDocumentEnhcd _ServiceDocRefObj
_SrvcDocBPContactCard _SrvcDocBPContactCard
_SalesOrganization I_ServiceDocumentEnhcd _SalesOrganization
_SalesOffice I_ServiceDocumentEnhcd _SalesOffice
_SalesGroup I_ServiceDocumentEnhcd _SalesGroup
_Division I_ServiceDocumentEnhcd _Division
_DistributionChannel I_ServiceDocumentEnhcd _DistributionChannel
_PaymentTerms I_ServiceDocumentEnhcd _PaymentTerms
_PaymentMethod I_ServiceDocumentEnhcd _PaymentMethod
_Product
_SrvcDocCreditStatus I_ServiceDocumentEnhcd _SrvcDocCreditStatus
_SrvcDocBPSoldToParty I_ServiceDocumentEnhcd _SrvcDocBPSoldToParty
_SrvcDocBPBillToParty _SrvcDocBPBillToParty
_SrvcDocBPShipToParty _SrvcDocBPShipToParty
_SrvcDocBPPayerParty _SrvcDocBPPayerParty
_ServiceDocumentItemRefObject _ServiceDocumentItemRefObject
_SrvcDateInfo _SrvcDateInfo
_CustomerSEPAMandate _CustomerSEPAMandate
_SrvcOrdUserStatus _SrvcOrdUserStatus
_SrvcDocSystemStatus _SrvcDocSystemStatus
_CustMgmtLifecycleUserStsText _CustMgmtLifecycleUserStsText
_ServiceOrderStdVH _ServiceOrderStdVH
_SrvcDocBslnPlannedCost _SrvcDocBslnPlannedCost
_SrvcDocBslnPlannedRevenue _SrvcDocBslnPlannedRevenue
_ServiceObjType I_ServiceDocumentEnhcd _ServiceObjType
_SrvcDocBslnCostPostgStatus I_ServiceDocumentEnhcd _SrvcDocBslnCostPostgStatus
_SrvcDocTransferStatus I_ServiceDocumentEnhcd _SrvcDocTransferStatus
_ServiceOrderType _ServiceOrderType
_Equipment

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 C_Customer360ServiceOrder.
-- 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 C_Customer360ServiceOrder AS
SELECT
  ServiceOrder.ServiceDocument AS ServiceOrder,
  ServiceOrder.ServiceDocumentType AS ServiceDocumentType,
  _ServiceOrderType[1:Language = $session.system_language].ServiceDocumentTypeName AS ServiceDocumentTypeName,
  ServiceOrder.ServiceObjectType AS ServiceObjectType,
  ServiceOrder.ServiceDocumentDescription AS ServiceOrderDescription,
  ServiceOrder.SoldToParty AS SoldToParty,
  ServiceOrder._ContactPerson.BusinessPartnerName AS CompanyContactPersonFullName,
  _SrvcDocBPBillToParty.BusinessPartnerName AS BillToPartyName,
  _SrvcDocBPShipToParty.BusinessPartnerName AS ShipToPartyName,
  _SrvcDocBPPayerParty.BusinessPartnerName AS PayerPartyName,
  ServiceOrder.ShipToParty AS ShipToParty,
  ServiceOrder.BillToParty AS BillToParty,
  ServiceOrder.PayerParty AS PayerParty,
  ServiceOrder.ContactPerson AS ContactPersonBusinessPartnerId,
  ServiceOrder.PaymentTerms AS PaymentTerms,
  ServiceOrder._PaymentTerms._Text[1:Language = $session.system_language].PaymentTermsName AS PaymentTermsName,
  ServiceOrder.PaymentMethod AS PaymentMethod,
  ServiceOrder._PaymentMethod[1:SalesOrganization = salesorganization ].PaymentMethodDescription AS PaymentMethodDescription,
  ServiceOrder.SEPAMandate AS SEPAMandate,
  _CustomerSEPAMandate.SEPAMandateCreditor AS SEPAMandateCreditor,
  _CustomerSEPAMandate.SEPAMandateApplication AS SEPAMandateApplication,
  _CustMgmtExtRef.CustMgmtExtRefID AS CustMgmtExtRefID,
  ServiceOrder.ServiceDocumentPriority AS ServiceOrderPriority,
  ServiceOrder._ServiceDocumentPriority._ServiceDocumentPriorityText[1:Language = $session.system_language].ServiceDocumentPriorityName AS ServiceDocumentPriorityName,
  ServiceOrder.PostingDate AS PostingDate,
  ServiceOrder.ServiceDocumentHasError AS ServiceDocumentHasError,
  ServiceOrder.ServiceDocGrossAmount AS ServiceDocGrossAmount,
  ServiceOrder.ServiceDocNetAmount AS ServiceDocNetAmount,
  ServiceOrder.ServiceDocTaxAmount AS ServiceDocTaxAmount,
  ServiceOrder.TransactionCurrency AS TransactionCurrency,
  ServiceOrder._ServiceDocHasError._ServiceDocHasErrorText[1:Language = $session.system_language].ServiceDocumentHasErrorName AS ServiceDocumentHasErrorName,
  ServiceOrder.ServiceDocumentStatus AS ServiceOrderStatus,
  ServiceOrder._ServiceDocRefObj[1:ServiceDocumentItem = '000000']._Equipment.Material AS Material,
  ServiceOrder._ServiceDocRefObj[1:ServiceDocumentItem = '000000']._Equipment._Material.MaterialType AS MaterialType,
  ServiceOrder._ServiceDocRefObj[1:ServiceDocumentItem = '000000'].ProductID AS ProductID,
  ServiceOrder._ServiceDocRefObj[1:ServiceDocumentItem = '000000']._Product._Text[1:Language=$session.system_language].ProductName AS ProductName,
  ServiceOrder.BusinessActivityCategory AS BusinessActivityCategory,
  ServiceOrder.RequestedServiceStartDate AS RequestedServiceStartDate,
  ServiceOrder.RequestedServiceEndDate AS RequestedServiceEndDate,
  ServiceOrder.ServiceDocCreationDateTime AS ServiceDocCreationDateTime,
  cast (ServiceOrder.RequestedServiceStartDateTime as timestamp) AS RequestedServiceStartDateTime,
  cast (ServiceOrder.RequestedServiceEndDateTime as timestamp) AS RequestedServiceEndDateTime,
  ServiceOrder.ResponsibleEmployee AS RespEmployeeBusinessPartnerId,
  ServiceOrder._RespEmployee.BusinessPartnerName AS ResponsibleEmployeeName,
  ServiceOrder.ServiceTeam AS ServiceTeam,
  ServiceOrder._ServiceTeam.BusinessPartnerFullName AS BusinessPartnerFullName,
  ServiceOrder.SoldToPartyCountry AS SoldToPartyCountry,
  ServiceOrder.SoldToPartyRegion AS SoldToPartyRegion,
  ServiceOrder.PurchaseOrderByCustomer AS PurchaseOrderByCustomer,
  ServiceOrder.ServiceEmployee AS ServiceEmployee,
  ServiceOrder.ServiceDocumentUUID AS ServiceDocumentUUID,
  ServiceOrder.ServiceDocumentIsReleased AS ServiceDocumentIsReleased,
  ServiceOrder.ServiceDocumentIsOpen AS ServiceDocumentIsOpen,
  ServiceOrder.ServiceDocumentIsRejected AS ServiceDocumentIsRejected,
  ServiceOrder.SalesOrganization AS SalesOrganization,
  ServiceOrder._SalesOrganization._Text[1:Language = $session.system_language].SalesOrganizationName AS SalesOrganizationName,
  ServiceOrder.DistributionChannel AS DistributionChannel,
  ServiceOrder._DistributionChannel._Text[1:Language = $session.system_language].DistributionChannelName AS DistributionChannelName,
  ServiceOrder.Division AS Division,
  ServiceOrder._Division._Text[1:Language = $session.system_language].DivisionName AS DivisionName,
  ServiceOrder.SalesOffice AS SalesOffice,
  ServiceOrder._SalesOffice._Text[1:Language = $session.system_language].SalesOfficeName AS SalesOfficeName,
  ServiceOrder.SalesGroup AS SalesGroup,
  ServiceOrder._SalesGroup._Text[1:Language = $session.system_language].SalesGroupName AS SalesGroupName,
  ServiceOrder._ServiceDocRefObj[1:ServiceDocumentItem = '000000'].Equipment AS Equipment,
  ServiceOrder._ServiceDocRefObj[1:ServiceDocumentItem = '000000']._Equipment._EquipmentText[1: Language=$session.system_language].EquipmentName AS EquipmentName,
  ServiceOrder.SalesOrganizationOrgUnitID AS SalesOrganizationOrgUnitID,
  ServiceOrder.SalesOfficeOrgUnitID AS SalesOfficeOrgUnitID,
  ServiceOrder.SalesGroupOrgUnitID AS SalesGroupOrgUnitID,
  ServiceOrder.ServiceOrganization AS ServiceOrganization,
  ServiceOrder.RefBusinessSolutionOrder AS RefBusinessSolutionOrder,
  ServiceOrder.SrvcDocCreditStatus AS SrvcOrdCreditStatus,
  ServiceOrder._SrvcDocCreditStatus._SrvcDocCreditStatusText[1:Language = $session.system_language].SrvcDocCreditStatusText AS SrvcDocCreditStatusText,
  ServiceOrder._SalesOrganizationOrgUnit_2 AS _SalesOrganizationOrgUnit_2,
  ServiceOrder._SalesOfficeOrgUnit_2 AS _SalesOfficeOrgUnit_2,
  ServiceOrder._SalesGroupOrgUnit_2 AS _SalesGroupOrgUnit_2,
  ServiceOrder._ServiceOrganizationOrgUnit_2 AS _ServiceOrganizationOrgUnit_2,
  ServiceOrder.RespyMgmtServiceTeam AS RespyMgmtServiceTeam,
  ServiceOrder._ServiceTeamHeader._TeamDescription.TeamDescription AS RespyMgmtServiceTeamDesc,
  ServiceOrder._ServiceTeamHeader.TeamName AS RespyMgmtServiceTeamName,
  cast (_SrvcOrderDateTimeline.ActualServiceStartDateTime as timestamp) AS ActualServiceStartDateTime,
  cast (_SrvcOrderDateTimeline.PlannedServiceEndDateTime as timestamp) AS PlannedServiceEndDateTime,
  cast (_SrvcOrderDateTimeline.PlannedServiceStartDateTime as timestamp) AS PlannedServiceStartDateTime,
  cast (_SrvcOrderDateTimeline.ServiceFirstResponseByDateTime as timestamp) AS ServiceFirstResponseByDateTime,
  cast(_SrvcOrderDateTimeline.SrvcDocItemSLADueByDateTime as timestamp) AS SrvcDocItemSLADueByDateTime,
  _RefMaintenancePlan.MaintenancePlan AS MaintenancePlan,
  _RefMaintenancePlan.MaintenancePlanDesc AS MaintenancePlanDesc,
  ServiceOrder.SrvcDocBslnCostPostgStatus AS SrvcDocBslnCostPostgStatus,
  ServiceOrder._SrvcDocBslnCostPostgStatus._Text[1:Language = $session.system_language].SrvcDocBslnCostPostgStatusText AS SrvcDocBslnCostPostgStatusText,
  ServiceOrder.SrvcDocTransferStatus AS SrvcDocTransferStatus,
  ServiceOrder._SrvcDocTransferStatus._ServiceDocTransferStatusText[1:Language = $session.system_language].SrvcDocTransferStatusText AS SrvcDocTransferStatusText,
  _RefMaintenanceItem.MaintenanceItem AS MaintenanceItem,
  _RefMaintenanceItem.MaintenanceItemDescription AS MaintenanceItemDescription,
  _SrvcDocSystemStatus.StatusCode AS SystemStatus,
  ServiceOrder._ServiceDocumentType.StatusProfile AS StatusProfile,
  _SrvcDocBslnPlannedCost.SrvcDocBslnPlndCostAmount AS SrvcDocBslnPlndCostAmount,
  _SrvcDocBslnPlannedRevenue.SrvcDocBslnPlndRevenueAmount AS SrvcDocBslnPlndRevenueAmount,
  ServiceOrder._SoldToPartyToCustomer.Customer AS Customer,
  cast ( 0 as sit_de_inst_count ) AS SitnNumberOfInstances,
  cast ( 0 as sit_de_inst_count ) AS SitnNmbrOfInstceInHierarchy,
  cast ('' as val_text) AS SrvcDocSituationStatusText,
  cast( '' as crmt_boolean ) AS SrvcDocSituationStatus,
  ServiceOrder._SoldToParty AS _SoldToParty,
  ServiceOrder._ShipToParty AS _ShipToParty,
  ServiceOrder._BillToParty AS _BillToParty,
  ServiceOrder._PayerParty AS _PayerParty,
  ServiceOrder._RespEmployee AS _RespEmployee,
  ServiceOrder._ServiceTeam AS _ServiceTeam,
  ServiceOrder._ServiceEmployee AS _ServiceEmployee,
  ServiceOrder._ContactPerson AS _ContactPerson,
  ServiceOrder._ServiceDocumentType AS _ServiceDocumentType,
  ServiceOrder._ServiceDocumentPriority AS _ServiceDocumentPriority,
  ServiceOrder._ServiceDocumentStatus AS _ServiceDocumentStatus,
  ServiceOrder._ServiceDocHasError AS _ServiceDocHasError,
  ServiceOrder._ActivityCategory AS _ActivityCategory,
  ServiceOrder._ServiceDocRefObj AS _ServiceDocRefObj,
  ServiceOrder._SalesOrganization AS _SalesOrganization,
  ServiceOrder._SalesOffice AS _SalesOffice,
  ServiceOrder._SalesGroup AS _SalesGroup,
  ServiceOrder._Division AS _Division,
  ServiceOrder._DistributionChannel AS _DistributionChannel,
  ServiceOrder._PaymentTerms AS _PaymentTerms,
  ServiceOrder._PaymentMethod AS _PaymentMethod,
  ServiceOrder._ServiceDocRefObj[1:ServiceDocumentItem = '000000']._Product AS _Product,
  ServiceOrder._SrvcDocCreditStatus AS _SrvcDocCreditStatus,
  ServiceOrder._SrvcDocBPSoldToParty AS _SrvcDocBPSoldToParty,
  ServiceOrder._ServiceObjType AS _ServiceObjType,
  ServiceOrder._SrvcDocBslnCostPostgStatus AS _SrvcDocBslnCostPostgStatus,
  ServiceOrder._SrvcDocTransferStatus AS _SrvcDocTransferStatus,
  ServiceOrder._ServiceDocRefObj[1:ServiceDocumentItem = '000000']._Equipment AS _Equipment
FROM I_ServiceDocumentEnhcd AS ServiceOrder
INNER JOIN I_Customer360BusDocSetting AS Customer360BusDocSetting ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN C_SrvcOrderDateTimeline AS _SrvcOrderDateTimeline ON ServiceOrder = _SrvcOrderDateTimeline.ServiceDocument  -- association [1..1]
LEFT OUTER JOIN C_ServiceDocumentItemRefObject AS _ServiceDocumentItemRefObject ON ServiceOrder = _ServiceDocumentItemRefObject.ServiceDocument AND _ServiceDocumentItemRefObject.ServiceDocumentItem = '000000'  -- association [1..*]
LEFT OUTER JOIN C_SrvcDocBPContactCardQuickVw AS _SrvcDocBPContactCard ON ContactPersonBusinessPartnerId = _SrvcDocBPContactCard.BusinessPartner  -- association [0..1]
LEFT OUTER JOIN C_SrvcDocDateInformation AS _SrvcDateInfo ON ( ServiceOrder = _SrvcDateInfo.ServiceDocument AND ServiceObjectType = _SrvcDateInfo.ServiceObjectType AND _SrvcDateInfo.ServiceDocumentItem = '000000' ) OR ( ServiceDocumentUUID = _SrvcDateInfo.SrvcMgmtObjectUUID )  -- association [1..*]
LEFT OUTER JOIN C_SrvcDocUserStatus AS _SrvcOrdUserStatus ON ServiceDocumentUUID = _SrvcOrdUserStatus.StatusObjectUUID  -- association [0..*]
LEFT OUTER JOIN I_StatusObjectUUIDStatus AS _SrvcDocSystemStatus ON ServiceDocumentUUID = _SrvcDocSystemStatus.StatusObjectUUID AND ( _SrvcDocSystemStatus.StatusCode = 'I1002' OR _SrvcDocSystemStatus.StatusCode = 'I1003' OR _SrvcDocSystemStatus.StatusCode = 'I1004' OR _SrvcDocSystemStatus.StatusCode = 'I1005' ) AND _SrvcDocSystemStatus.StatusIsActive = 'X'  -- association [0..*]
LEFT OUTER JOIN I_CustMgmtLifecycleUserStsText AS _CustMgmtLifecycleUserStsText ON ServiceOrderStatus = _CustMgmtLifecycleUserStsText.CustMgmtLifecycleUserStatus AND _CustMgmtLifecycleUserStsText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_ServiceOrderStdVH AS _ServiceOrderStdVH ON ServiceOrder = _ServiceOrderStdVH.ServiceDocument  -- association [0..*]
LEFT OUTER JOIN I_SrvcDocBslnPlannedCost AS _SrvcDocBslnPlannedCost ON _SrvcDocBslnPlannedCost.ServiceDocument = ServiceOrder AND _SrvcDocBslnPlannedCost.ServiceDocumentType = ServiceDocumentType  -- association [0..1]
LEFT OUTER JOIN I_SrvcDocBslnPlannedRevenue AS _SrvcDocBslnPlannedRevenue ON _SrvcDocBslnPlannedRevenue.ServiceDocument = ServiceOrder AND _SrvcDocBslnPlannedRevenue.ServiceDocumentType = ServiceDocumentType  -- association [0..1]
LEFT OUTER JOIN C_SrvcMgmtSoldToPartyQuickVw AS _SrvcDocBPBillToParty ON BillToParty = _SrvcDocBPBillToParty.BusinessPartner  -- association [0..1]
LEFT OUTER JOIN C_SrvcMgmtSoldToPartyQuickVw AS _SrvcDocBPShipToParty ON ShipToParty = _SrvcDocBPShipToParty.BusinessPartner  -- association [0..1]
LEFT OUTER JOIN C_SrvcMgmtSoldToPartyQuickVw AS _SrvcDocBPPayerParty ON PayerParty = _SrvcDocBPPayerParty.BusinessPartner  -- association [0..1]
LEFT OUTER JOIN I_CustMgmtExtRefID AS _CustMgmtExtRef ON ServiceOrder = _CustMgmtExtRef.CustMgmtDocument AND ServiceObjectType = _CustMgmtExtRef.CustMgmtObjectType AND _CustMgmtExtRef.CustMgmtExtRefIDType = '0009'  -- association [0..1]
LEFT OUTER JOIN I_SrvcOrdRefMaintenancePlan AS _RefMaintenancePlan ON ServiceDocumentUUID = _RefMaintenancePlan.ServiceDocumentUUID AND ServiceObjectType = _RefMaintenancePlan.ServiceObjectType  -- association [0..1]
LEFT OUTER JOIN I_SrvcOrdRefMaintenanceItem AS _RefMaintenanceItem ON ServiceDocumentUUID = _RefMaintenanceItem.ServiceDocumentUUID AND ServiceObjectType = _RefMaintenanceItem.ServiceObjectType  -- association [0..1]
LEFT OUTER JOIN I_ServiceDocumentTypeText AS _ServiceOrderType ON ServiceDocumentType = _ServiceOrderType.ServiceDocumentType  -- association [0..*]
LEFT OUTER JOIN I_CustomerSEPAMandate AS _CustomerSEPAMandate ON SEPAMandate = _CustomerSEPAMandate.SEPAMandate AND _CustomerSEPAMandate.SEPAMandateVersion = '0000'  -- association [1..*]
;