A_ServiceOrder

DDL: A_SERVICEORDER Type: view COMPOSITE

Service Order

A_ServiceOrder is a Composite CDS View that provides data about "Service Order" in SAP S/4HANA. It reads from 1 data source (I_ServiceDocumentEnhcd) and exposes 80 fields with key field ServiceOrder. It has 26 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_ServiceDocumentEnhcd ServiceOrder from

Associations (26)

CardinalityTargetAliasCondition
[0..*] A_ServiceOrderItem _Item $projection.ServiceOrder = _Item.ServiceOrder
[0..*] A_ServiceOrderPersonResp _PersonResponsible $projection.ServiceOrder = _PersonResponsible.ServiceOrder
[0..*] A_ServiceOrderRefObject _ReferenceObject $projection.ServiceOrder = _ReferenceObject.ServiceOrder
[0..*] A_SrvcOrdProdRefObject _ProductReferenceObject $projection.ServiceOrder = _ProductReferenceObject.ServiceOrder
[0..*] A_ServiceOrderConfirmation _Confirmation $projection.ServiceOrder = _Confirmation.ServiceOrder
[0..*] A_ServiceOrderText _Text $projection.ServiceOrder = _Text.ServiceOrder
[0..*] A_ServiceOrderDefect _Defect $projection.ServiceOrder = _Defect.ServiceOrder
[0..*] A_SrvcOrdRefServiceContract _ReferenceServiceContract $projection.ServiceOrder = _ReferenceServiceContract.ServiceOrder
[0..1] I_ServiceDocumentPredecessor _RefServiceRequest $projection.ServiceOrderUUID = _RefServiceRequest.ServiceDocumentUUID and _RefServiceRequest.ServiceDocPrdcssrBusObjType = 'BUS2000223'
[0..1] I_ServiceDocumentPredecessor _RefServiceTemplate $projection.ServiceOrderUUID = _RefServiceTemplate.ServiceDocumentUUID and _RefServiceTemplate.ServiceDocPrdcssrBusObjType = 'BUS2000116' and $projection.ServiceDocumentTemplateType is not initial
[0..*] A_ServiceOrderPriceElement _PricingElement $projection.ServiceOrder = _PricingElement.ServiceOrder
[0..*] A_SrvcOrdQualification _Qualification $projection.ServiceOrder = _Qualification.ServiceOrder
[0..1] I_RespyMgmtTeamHeaderDetail _ServiceTeamHeader $projection.RespyMgmtServiceTeam = _ServiceTeamHeader.RespyMgmtTeamID
[0..1] I_SrvcOrdRefFSMServiceCall _SrvcOrdRefFSMServiceCall $projection.ServiceOrderUUID = _SrvcOrdRefFSMServiceCall.ServiceDocumentUUID and _SrvcOrdRefFSMServiceCall.PrdcssrSuccssrDocObjectType = 'FSMCALL'
[0..1] E_ServiceDocument _Extension _Extension.ServiceCategory = 'BUS2000116' and $projection.ServiceOrder = _Extension.ServiceOrder
[0..1] I_CustMgmtExtRefID _CustMgmtExtRef _CustMgmtExtRef.CustMgmtObjectType = 'BUS2000116' and $projection.ServiceOrder = _CustMgmtExtRef.CustMgmtDocument and _CustMgmtExtRef.CustMgmtExtRefIDType = '0001'
[0..1] I_SrvcMgmtObjectStatus _SrvcMgmtLifecycleStatus $projection.ServiceOrderUUID = _SrvcMgmtLifecycleStatus.SrvcMgmtObjectUUID and _SrvcMgmtLifecycleStatus.SrvcMgmtObjectStatusIsInactive = '' and ( _SrvcMgmtLifecycleStatus.SrvcMgmtObjectStatus = 'I1002' or _SrvcMgmtLifecycleStatus.SrvcMgmtObjectStatus = 'I1003' )
[0..1] P_SrvcPrdcssrSrvcContr _RefServiceContract $projection.ServiceOrderUUID = _RefServiceContract.ServiceDocumentUUID and _RefServiceContract.NumberOfOccurrences = 1
[0..*] A_ServiceOrdUserStatus _ServiceOrdUserStatus $projection.ServiceOrder = _ServiceOrdUserStatus.ServiceOrder
[0..*] A_SrvcOrdPartner _Partner $projection.ServiceOrder = _Partner.ServiceOrder
[0..*] A_SrvcOrdTransHistory _SrvcOrdTransHistory $projection.ServiceOrder = _SrvcOrdTransHistory.ServiceOrder
[0..*] A_SrvcOrdDuration _Duration $projection.ServiceOrder = _Duration.ServiceOrder
[0..*] A_SrvcOrdAppointment _Appointment $projection.ServiceOrder = _Appointment.ServiceOrder
[0..1] I_WBSElementBasicData _WBSElement _WBSElement.WBSElementInternalID = ServiceOrder.WBSElementInternalID
[0..*] A_SrvcOrdInHouseRepairItem _InHouseRepairItem $projection.ServiceOrder = _InHouseRepairItem.ServiceOrder
[0..1] I_WBSElementBasicData _WBSElementCO _WBSElementCO.WBSElement = ServiceOrder.WBSElement

Annotations (15)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Service Order view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #PUBLIC_REMOTE_API view
AbapCatalog.sqlViewName ASRVORD view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
ObjectModel.representativeKey ServiceOrder view
ObjectModel.createEnabled true view
ObjectModel.updateEnabled true view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
Metadata.ignorePropagatedAnnotations true view

Fields (80)

KeyFieldSource TableSource FieldDescription
KEY ServiceOrder ServiceDocument Transaction ID
ServiceOrderType ServiceDocumentType Transaction Type
ServiceOrderUUID ServiceDocumentUUID Object GUID
ServiceOrderDescription ServiceDocumentDescription
ServiceObjectType ServiceObjectType Object Type
Language Language Report Text Language
ServiceDocumentPriority ServiceDocumentPriority
RequestedServiceStartDateTime RequestedServiceStartDateTime
RequestedServiceEndDateTime RequestedServiceEndDateTime
ErlstRequestedDeliveryDateTime ErlstRequestedDeliveryDateTime
ServiceDocChangedDateTime ServiceDocChangedDateTime
PostingDate PostingDate Posting Date for GR
ServiceDocumentCreationDate ServiceDocumentCreationDate
ServiceDocumentChangedDate ServiceDocumentChangedDate
ServiceDocumentCreatedByUser ServiceDocumentCreatedByUser
ServiceDocumentChangedByUser ServiceDocumentChangedByUser
ServiceDocumentTemplateType ServiceDocumentTemplateType
PurchaseOrderByCustomer PurchaseOrderByCustomer Purchase Order Number
CustomerPurchaseOrderDate CustomerPurchaseOrderDate Purchase Order Date
ServiceOrderIsReleased ServiceDocumentIsReleased
ServiceOrderIsRejected ServiceDocumentIsRejected
SrvcOrdIsBusinessCompleted SrvcOrdIsBusinessCompleted
SrvcOrdIsBusinessReopened SrvcOrdIsBusinessReopened
SalesOrganization SalesOrganization Sales Organization
DistributionChannel DistributionChannel RefDistCh-Cust/Mat.
Division Division Internal Division ID
SalesOffice SalesOffice Sales Office
SalesGroup SalesGroup Sales Group
SoldToParty SoldToParty Sold-to Party
ShipToParty ShipToParty Ship-To Party (obsolete)
BillToParty BillToParty Inv. Recipient
PayerParty PayerParty Payer
ContactPerson ContactPerson Contact Person Key
ServiceDocGrossAmount ServiceDocGrossAmount
ServiceDocNetAmount ServiceDocNetAmount
ServiceDocTaxAmount ServiceDocTaxAmount
TransactionCurrency TransactionCurrency Transaction Currency
ReferenceServiceRequest
ReferenceServiceContract _RefServiceContract ServiceContract Transaction ID
RefServiceOrderTemplate
ReferenceServiceOrder _CustMgmtExtRef CustMgmtExtRefID
ShippingCondition ShippingCondition Shipping Conditions
RespyMgmtServiceTeam RespyMgmtServiceTeam
RespyMgmtServiceTeamName _ServiceTeamHeader TeamName
RespyMgmtGlobalTeamID _ServiceTeamHeader RespyMgmtGlobalTeamID
SrvcOrdCreditStatus SrvcDocCreditStatus
SrvcOrdGTSEmbargoStatus SrvcDocGTSEmbargoStatus
SrvcOrdGTSScreeningStatus SrvcDocGTSScreeningStatus
SrvcOrdGTSLglControlStatus SrvcDocGTSLglControlStatus
SrvcOrdExecutionStatus SrvcDocExecutionStatus
PaymentTerms PaymentTerms Pyt Terms
PaymentMethod PaymentMethod Pymt Meth.
SEPAMandate SEPAMandate SEPA Mandate
SrvcSEPAMandateRelevance SrvcSEPAMandateRelevance
SalesOrganizationOrgUnitID SalesOrganizationOrgUnitID
ServiceOrganization ServiceOrganization
SalesOfficeOrgUnitID SalesOfficeOrgUnitID
SalesGroupOrgUnitID SalesGroupOrgUnitID
EnterpriseServiceOrganization EnterpriseServiceOrganization
FSMServiceCall _SrvcOrdRefFSMServiceCall FSMServiceCall
ServiceOrderRejectionReason ServiceDocumentRejectionReason
ReferenceInHouseRepair ReferenceInHouseRepair
ReferenceInHouseRepairItem ReferenceInHouseRepairItem
ServiceDocumentCategory BusinessActivityCategory
_Item _Item
_PersonResponsible _PersonResponsible
_ReferenceObject _ReferenceObject
_ProductReferenceObject _ProductReferenceObject
_Confirmation _Confirmation
_Text _Text
_Defect _Defect
_ReferenceServiceContract _ReferenceServiceContract
_PricingElement _PricingElement
_Qualification _Qualification
_ServiceOrdUserStatus _ServiceOrdUserStatus
_InHouseRepairItem _InHouseRepairItem
_SrvcOrdTransHistory _SrvcOrdTransHistory
_Partner _Partner
_Duration _Duration
_Appointment _Appointment

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 A_ServiceOrder.
-- 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 A_ServiceOrder AS
SELECT
  ServiceDocument AS ServiceOrder,
  ServiceDocumentType AS ServiceOrderType,
  ServiceDocumentUUID AS ServiceOrderUUID,
  ServiceDocumentDescription AS ServiceOrderDescription,
  ServiceObjectType,
  Language,
  ServiceDocumentPriority,
  RequestedServiceStartDateTime,
  RequestedServiceEndDateTime,
  ErlstRequestedDeliveryDateTime,
  ServiceDocChangedDateTime,
  PostingDate,
  ServiceDocumentCreationDate,
  ServiceDocumentChangedDate,
  ServiceDocumentCreatedByUser,
  ServiceDocumentChangedByUser,
  ServiceDocumentTemplateType,
  PurchaseOrderByCustomer,
  CustomerPurchaseOrderDate,
  ServiceDocumentIsReleased AS ServiceOrderIsReleased,
  ServiceDocumentIsRejected AS ServiceOrderIsRejected,
  SrvcOrdIsBusinessCompleted,
  SrvcOrdIsBusinessReopened,
  SalesOrganization,
  DistributionChannel,
  Division,
  SalesOffice,
  SalesGroup,
  SoldToParty,
  ShipToParty,
  BillToParty,
  PayerParty,
  ContactPerson,
  ServiceDocGrossAmount,
  ServiceDocNetAmount,
  ServiceDocTaxAmount,
  TransactionCurrency,
  _RefServiceRequest._ServiceDoc.ServiceDocument AS ReferenceServiceRequest,
  _RefServiceContract.ServiceContract AS ReferenceServiceContract,
  _RefServiceTemplate._ServiceDoc.ServiceDocument AS RefServiceOrderTemplate,
  _CustMgmtExtRef.CustMgmtExtRefID AS ReferenceServiceOrder,
  ShippingCondition,
  RespyMgmtServiceTeam,
  _ServiceTeamHeader.TeamName AS RespyMgmtServiceTeamName,
  _ServiceTeamHeader.RespyMgmtGlobalTeamID AS RespyMgmtGlobalTeamID,
  SrvcDocCreditStatus AS SrvcOrdCreditStatus,
  SrvcDocGTSEmbargoStatus AS SrvcOrdGTSEmbargoStatus,
  SrvcDocGTSScreeningStatus AS SrvcOrdGTSScreeningStatus,
  SrvcDocGTSLglControlStatus AS SrvcOrdGTSLglControlStatus,
  SrvcDocExecutionStatus AS SrvcOrdExecutionStatus,
  PaymentTerms,
  PaymentMethod,
  SEPAMandate,
  SrvcSEPAMandateRelevance,
  SalesOrganizationOrgUnitID,
  ServiceOrganization,
  SalesOfficeOrgUnitID,
  SalesGroupOrgUnitID,
  EnterpriseServiceOrganization,
  _SrvcOrdRefFSMServiceCall.FSMServiceCall AS FSMServiceCall,
  ServiceDocumentRejectionReason AS ServiceOrderRejectionReason,
  ReferenceInHouseRepair,
  ReferenceInHouseRepairItem,
  BusinessActivityCategory AS ServiceDocumentCategory
FROM I_ServiceDocumentEnhcd AS ServiceOrder
LEFT OUTER JOIN A_ServiceOrderItem AS _Item ON ServiceOrder = _Item.ServiceOrder  -- association [0..*]
LEFT OUTER JOIN A_ServiceOrderPersonResp AS _PersonResponsible ON ServiceOrder = _PersonResponsible.ServiceOrder  -- association [0..*]
LEFT OUTER JOIN A_ServiceOrderRefObject AS _ReferenceObject ON ServiceOrder = _ReferenceObject.ServiceOrder  -- association [0..*]
LEFT OUTER JOIN A_SrvcOrdProdRefObject AS _ProductReferenceObject ON ServiceOrder = _ProductReferenceObject.ServiceOrder  -- association [0..*]
LEFT OUTER JOIN A_ServiceOrderConfirmation AS _Confirmation ON ServiceOrder = _Confirmation.ServiceOrder  -- association [0..*]
LEFT OUTER JOIN A_ServiceOrderText AS _Text ON ServiceOrder = _Text.ServiceOrder  -- association [0..*]
LEFT OUTER JOIN A_ServiceOrderDefect AS _Defect ON ServiceOrder = _Defect.ServiceOrder  -- association [0..*]
LEFT OUTER JOIN A_SrvcOrdRefServiceContract AS _ReferenceServiceContract ON ServiceOrder = _ReferenceServiceContract.ServiceOrder  -- association [0..*]
LEFT OUTER JOIN I_ServiceDocumentPredecessor AS _RefServiceRequest ON ServiceOrderUUID = _RefServiceRequest.ServiceDocumentUUID AND _RefServiceRequest.ServiceDocPrdcssrBusObjType = 'BUS2000223'  -- association [0..1]
LEFT OUTER JOIN I_ServiceDocumentPredecessor AS _RefServiceTemplate ON ServiceOrderUUID = _RefServiceTemplate.ServiceDocumentUUID AND _RefServiceTemplate.ServiceDocPrdcssrBusObjType = 'BUS2000116' AND ServiceDocumentTemplateType is not initial  -- association [0..1]
LEFT OUTER JOIN A_ServiceOrderPriceElement AS _PricingElement ON ServiceOrder = _PricingElement.ServiceOrder  -- association [0..*]
LEFT OUTER JOIN A_SrvcOrdQualification AS _Qualification ON ServiceOrder = _Qualification.ServiceOrder  -- association [0..*]
LEFT OUTER JOIN I_RespyMgmtTeamHeaderDetail AS _ServiceTeamHeader ON RespyMgmtServiceTeam = _ServiceTeamHeader.RespyMgmtTeamID  -- association [0..1]
LEFT OUTER JOIN I_SrvcOrdRefFSMServiceCall AS _SrvcOrdRefFSMServiceCall ON ServiceOrderUUID = _SrvcOrdRefFSMServiceCall.ServiceDocumentUUID AND _SrvcOrdRefFSMServiceCall.PrdcssrSuccssrDocObjectType = 'FSMCALL'  -- association [0..1]
LEFT OUTER JOIN E_ServiceDocument AS _Extension ON _Extension.ServiceCategory = 'BUS2000116' AND ServiceOrder = _Extension.ServiceOrder  -- association [0..1]
LEFT OUTER JOIN I_CustMgmtExtRefID AS _CustMgmtExtRef ON _CustMgmtExtRef.CustMgmtObjectType = 'BUS2000116' AND ServiceOrder = _CustMgmtExtRef.CustMgmtDocument AND _CustMgmtExtRef.CustMgmtExtRefIDType = '0001'  -- association [0..1]
LEFT OUTER JOIN I_SrvcMgmtObjectStatus AS _SrvcMgmtLifecycleStatus ON ServiceOrderUUID = _SrvcMgmtLifecycleStatus.SrvcMgmtObjectUUID AND _SrvcMgmtLifecycleStatus.SrvcMgmtObjectStatusIsInactive = '' AND ( _SrvcMgmtLifecycleStatus.SrvcMgmtObjectStatus = 'I1002' OR _SrvcMgmtLifecycleStatus.SrvcMgmtObjectStatus = 'I1003' )  -- association [0..1]
LEFT OUTER JOIN P_SrvcPrdcssrSrvcContr AS _RefServiceContract ON ServiceOrderUUID = _RefServiceContract.ServiceDocumentUUID AND _RefServiceContract.NumberOfOccurrences = 1  -- association [0..1]
LEFT OUTER JOIN A_ServiceOrdUserStatus AS _ServiceOrdUserStatus ON ServiceOrder = _ServiceOrdUserStatus.ServiceOrder  -- association [0..*]
LEFT OUTER JOIN A_SrvcOrdPartner AS _Partner ON ServiceOrder = _Partner.ServiceOrder  -- association [0..*]
LEFT OUTER JOIN A_SrvcOrdTransHistory AS _SrvcOrdTransHistory ON ServiceOrder = _SrvcOrdTransHistory.ServiceOrder  -- association [0..*]
LEFT OUTER JOIN A_SrvcOrdDuration AS _Duration ON ServiceOrder = _Duration.ServiceOrder  -- association [0..*]
LEFT OUTER JOIN A_SrvcOrdAppointment AS _Appointment ON ServiceOrder = _Appointment.ServiceOrder  -- association [0..*]
LEFT OUTER JOIN I_WBSElementBasicData AS _WBSElement ON _WBSElement.WBSElementInternalID = ServiceOrder.WBSElementInternalID  -- association [0..1]
LEFT OUTER JOIN A_SrvcOrdInHouseRepairItem AS _InHouseRepairItem ON ServiceOrder = _InHouseRepairItem.ServiceOrder  -- association [0..*]
LEFT OUTER JOIN I_WBSElementBasicData AS _WBSElementCO ON _WBSElementCO.WBSElement = ServiceOrder.WBSElement  -- association [0..1]
;