I_ServiceDocumentEnhcd

DDL: I_SERVICEDOCUMENTENHCD Type: view COMPOSITE

Service Transaction Enhanced

I_ServiceDocumentEnhcd is a Composite CDS View (Dimension) that provides data about "Service Transaction Enhanced" in SAP S/4HANA. It reads from 1 data source (I_ServiceDocument) and exposes 179 fields with key fields ServiceObjectType, ServiceDocument. It has 10 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_ServiceDocument I_ServiceDocument from

Associations (10)

CardinalityTargetAliasCondition
[1..*] I_ServiceDocumentItemEnhcd _ServiceDocItem $projection.ServiceObjectType = _ServiceDocItem.ServiceObjectType and $projection.ServiceDocument = _ServiceDocItem.ServiceDocument
[0..*] I_ServiceDocumentRefObject _ServiceDocRefObj $projection.ServiceObjectType = _ServiceDocRefObj.ServiceObjectType and $projection.ServiceDocument = _ServiceDocRefObj.ServiceDocument and _ServiceDocRefObj.ServiceDocumentItem is initial and _ServiceDocRefObj.SrvcRefObjIsMainObject is not initial
[1] I_ServiceDocumentPredecessor _ServiceDocPredecessor $projection.ServiceDocumentUUID = _ServiceDocPredecessor.ServiceDocumentUUID and $projection.ServiceObjectType = _ServiceDocPredecessor.ServiceObjectType
[0..*] I_ServiceDocumentSuccessor _ServiceDocSuccessor $projection.ServiceDocumentUUID = _ServiceDocSuccessor.ServiceDocumentUUID and $projection.ServiceObjectType = _ServiceDocSuccessor.ServiceObjectType
[0..1] E_ServiceDocument _ServiceDocumentExt $projection.ServiceObjectType = _ServiceDocumentExt.ServiceCategory and $projection.ServiceDocument = _ServiceDocumentExt.ServiceOrder
[0..1] C_SrvcDocBPContactCardQuickVw _SrvcDocBPSoldToParty $projection.SoldToParty = _SrvcDocBPSoldToParty.BusinessPartner
[0..*] I_ServiceDocumentLongText _ServiceDocLongText $projection.ServiceObjectType = _ServiceDocLongText.ServiceObjectType and $projection.ServiceDocument = _ServiceDocLongText.ServiceDocument and _ServiceDocLongText.ServiceDocumentItem is initial and _ServiceDocLongText.TextObjectCategory = 'CRM_ORDERH'
[0..1] I_StatusObjectWithUUID _StatusObjectWithUUID $projection.ServiceDocumentUUID = _StatusObjectWithUUID.StatusObjectUUID
[0..*] I_CustMgmtPartner _CustMgmtPartner $projection.ServiceDocument = _CustMgmtPartner.CustMgmtDocument and $projection.ServiceObjectType = _CustMgmtPartner.CustMgmtObjectType and _CustMgmtPartner.CustMgmtDocumentItem = '000000'
[0..*] I_SrvcDocHeaderLongText _SrvcDocHeaderLongText $projection.ServiceObjectType = _SrvcDocHeaderLongText.ServiceObjectType and $projection.ServiceDocument = _SrvcDocHeaderLongText.ServiceDocument and _SrvcDocHeaderLongText.Language = $session.system_language

Annotations (16)

NameValueLevelField
EndUserText.label Service Transaction Enhanced view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.sqlViewName ISERVDOCENHCD view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
AccessControl.authorizationCheck #CHECK view
ObjectModel.representativeKey ServiceDocument view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.modelingPattern #ANALYTICAL_DIMENSION view
Analytics.dataCategory #DIMENSION view
Metadata.allowExtensions true view
Metadata.ignorePropagatedAnnotations true view

Fields (179)

KeyFieldSource TableSource FieldDescription
KEY ServiceObjectType ServiceObjectType
KEY ServiceDocument ServiceDocument
ServiceDocumentUUID ServiceDocumentUUID
ServiceDocumentCharUUID ServiceDocumentCharUUID
ServiceDocumentType ServiceDocumentType
ServiceDocumentDescription ServiceDocumentDescription
Language Language
PostingDate PostingDate
ServiceDocumentTemplateType ServiceDocumentTemplateType
ServiceDocCreationDateTime ServiceDocCreationDateTime
ServiceDocChangedDateTime ServiceDocChangedDateTime
ServiceDocumentCreatedByUser ServiceDocumentCreatedByUser
ServiceDocumentChangedByUser ServiceDocumentChangedByUser
PricingDocument PricingDocument
PricingProcedure PricingProcedure
RefBusinessSolutionOrder RefBusinessSolutionOrder
SrvcDocIsMaintServiceOrder SrvcDocIsMaintServiceOrder
BusinessActivityCategory BusinessActivityCategory
ServiceDocumentPriority ServiceDocumentPriority
ServiceDocNetAmount ServiceDocNetAmount
ServiceDocGrossAmount ServiceDocGrossAmount
ServiceDocTaxAmount ServiceDocTaxAmount
SoldToParty SoldToParty
SoldToPartyCountry SoldToPartyCountry
SoldToPartyRegion SoldToPartyRegion
ServiceTeam ServiceTeam
ResponsibleEmployee ResponsibleEmployee
ServiceEmployee ServiceEmployee
ContactPerson ContactPerson
ShipToParty ShipToParty
BillToParty BillToParty
PayerParty PayerParty
RequestedServiceStartDateTime RequestedServiceStartDateTime
RequestedServiceEndDateTime RequestedServiceEndDateTime
ServiceContractStartDateTime ServiceContractStartDateTime
ServiceContractEndDateTime ServiceContractEndDateTime
SrvcContrEarliestStartDateTime SrvcContrEarliestStartDateTime
SrvcContrLatestEndDateTime SrvcContrLatestEndDateTime
SrvcQtanValidityStartDateTime SrvcQtanValidityStartDateTime
SrvcQtanValidityEndDateTime SrvcQtanValidityEndDateTime
SrvcDocTmplValdtyStartDateTime SrvcDocTmplValdtyStartDateTime
SrvcDocTmplValdtyEndDateTime SrvcDocTmplValdtyEndDateTime
SrvcDocTemplateSearchTermText SrvcDocTemplateSearchTermText
PaymentTerms PaymentTerms
PaymentMethod PaymentMethod
SrvcSEPAMandateRelevance SrvcSEPAMandateRelevance
SEPAMandate SEPAMandate
WBSElementInternalID WBSElementInternalID
TransactionCurrency TransactionCurrency
PurchaseOrderByCustomer PurchaseOrderByCustomer
CustomerPurchaseOrderDate CustomerPurchaseOrderDate
ServiceDocumentRejectionReason ServiceDocumentRejectionReason
Region Region
ServiceDocumentStatus ServiceDocumentStatus
ServiceDocumentHasError ServiceDocumentHasError
ServiceDocBillingStatus ServiceDocBillingStatus
ServiceDocIsReleasedForBilling ServiceDocIsReleasedForBilling
ServiceDocumentIsOpen ServiceDocumentIsOpen
SrvcDocTransferStatus SrvcDocTransferStatus
ServiceDocumentIsQuotation ServiceDocumentIsQuotation
ServiceDocumentIsReleased ServiceDocumentIsReleased
ServiceDocumentIsRejected ServiceDocumentIsRejected
ServiceConfirmationIsFinal ServiceConfirmationIsFinal
ServiceContractCanclnSts ServiceContractCanclnSts
MaintSrvcOrdExecutionStatus MaintSrvcOrdExecutionStatus
SrvcDocExecutionStatus SrvcDocExecutionStatus
SrvcDocDeliveryStatus SrvcDocDeliveryStatus
SrvcDocGoodsIssueStatus SrvcDocGoodsIssueStatus
SrvcDocRejectionStatus SrvcDocRejectionStatus
SalesOrganizationOrgUnitID SalesOrganizationOrgUnitID
SalesOfficeOrgUnitID SalesOfficeOrgUnitID
SalesGroupOrgUnitID SalesGroupOrgUnitID
DistributionChannel DistributionChannel
Division Division
ServiceOrganization ServiceOrganization
ResponsibleServiceOrganization ResponsibleServiceOrganization
EnterpriseServiceOrganization EnterpriseServiceOrganization
SalesOrganization SalesOrganization
SalesOffice SalesOffice
SalesGroup SalesGroup
RespyMgmtServiceTeam RespyMgmtServiceTeam
BillingBlockReason BillingBlockReason
ServiceReasonSchema ServiceReasonSchema
ServiceReasonCategory ServiceReasonCategory
ServiceDefectSchema ServiceDefectSchema
ServiceDefectCategory ServiceDefectCategory
ServiceFirstResponseByDateTime ServiceFirstResponseByDateTime
ServiceDueByDateTime ServiceDueByDateTime
ErlstRequestedDeliveryDateTime ErlstRequestedDeliveryDateTime
RecommendedServicePriority RecommendedServicePriority
ServiceDocumentUrgency ServiceDocumentUrgency
ServiceDocumentImpact ServiceDocumentImpact
ServiceEscalationLevel ServiceEscalationLevel
ServiceDocumentProblemCategory ServiceDocumentProblemCategory
ServiceRisk ServiceRisk
ServiceDocumentCanclnParty ServiceDocumentCanclnParty
ServiceDocumentCanclnReason ServiceDocumentCanclnReason
ReferenceInHouseRepair ReferenceInHouseRepair
ReferenceInHouseRepairItem ReferenceInHouseRepairItem
RefInHouseRepairIsExisting RefInHouseRepairIsExisting
SrvcDocCreditStatus SrvcDocCreditStatus
SrvcDocGTSEmbargoStatus SrvcDocGTSEmbargoStatus
SrvcDocGTSScreeningStatus SrvcDocGTSScreeningStatus
SrvcDocGTSLglControlStatus SrvcDocGTSLglControlStatus
SrvcDocBslnCostPostgStatus SrvcDocBslnCostPostgStatus
SrvcDocContinuousCostStatus SrvcDocContinuousCostStatus
SrvcOrdIsBusinessCompleted SrvcOrdIsBusinessCompleted
SrvcOrdIsBusinessReopened SrvcOrdIsBusinessReopened
ShippingCondition ShippingCondition
CustomerPriceGroup CustomerPriceGroup
SrvcDocAcctAssgmtObjectType SrvcDocAcctAssgmtObjectType
SrvcDocAcctAssgmtObject SrvcDocAcctAssgmtObject
StatusProfile _StatusObjectWithUUID StatusProfile
_ServiceObjType _ServiceObjType
_ServiceDocumentType _ServiceDocumentType
_SoldToParty _SoldToParty
_RespEmployee _RespEmployee
_ServiceTeam _ServiceTeam
_ServiceEmployee _ServiceEmployee
_ContactPerson _ContactPerson
_ShipToParty _ShipToParty
_BillToParty _BillToParty
_PayerParty _PayerParty
_SoldToPartyToCustomer _SoldToPartyToCustomer
_SoldToPartyCountry _SoldToPartyCountry
_SoldToPartyRegion _SoldToPartyRegion
_ServiceTeamHeader _ServiceTeamHeader
_ServiceDocumentStatus _ServiceDocumentStatus
_SrvcDocLifecycleStatus _SrvcDocLifecycleStatus
_ServiceDocBillingStatus _ServiceDocBillingStatus
_SrvcDocIsRelForBillgSts _SrvcDocIsRelForBillgSts
_ServiceDocumentIsOpen _ServiceDocumentIsOpen
_ServiceDocHasError _ServiceDocHasError
_ServiceContractCanclnSts _ServiceContractCanclnSts
_SrvcDocTransferStatus _SrvcDocTransferStatus
_BillingBlockReason _BillingBlockReason
_ActivityCategory _ActivityCategory
_ServiceDocumentPriority _ServiceDocumentPriority
_TransactionCurrency _TransactionCurrency
_PaymentTerms _PaymentTerms
_SrvcSEPAMandateRelevance _SrvcSEPAMandateRelevance
_FixedPrice _FixedPrice
_SalesOrganizationOrgUnit _SalesOrganizationOrgUnit
_SalesOrganizationOrgUnit_2 _SalesOrganizationOrgUnit_2
_SalesOfficeOrgUnit _SalesOfficeOrgUnit
_SalesOfficeOrgUnit_2 _SalesOfficeOrgUnit_2
_SalesGroupOrgUnit _SalesGroupOrgUnit
_SalesGroupOrgUnit_2 _SalesGroupOrgUnit_2
_ServiceOrganizationOrgUnit _ServiceOrganizationOrgUnit
_ServiceOrganizationOrgUnit_2 _ServiceOrganizationOrgUnit_2
_RespSrvcOrganizationOrgUnit _RespSrvcOrganizationOrgUnit
_RespSrvcOrganizationOrgUnit_2 _RespSrvcOrganizationOrgUnit_2
_SalesOrganization _SalesOrganization
_SalesOffice _SalesOffice
_SalesGroup _SalesGroup
_DistributionChannel _DistributionChannel
_Division _Division
_EnterpriseServiceOrg _EnterpriseServiceOrg
_Region _Region
_SrvcDocumentRejectionReason _SrvcDocumentRejectionReason
_ServiceRisk _ServiceRisk
_ServiceDocProblemCategory _ServiceDocProblemCategory
_ServiceDocItem _ServiceDocItem
_ServiceDocRefObj _ServiceDocRefObj
_ServiceDocPredecessor _ServiceDocPredecessor
_ServiceDocSuccessor _ServiceDocSuccessor
_ServiceDocLongText _ServiceDocLongText
_SrvcDocBPSoldToParty _SrvcDocBPSoldToParty
_SrvcDocCreditStatus _SrvcDocCreditStatus
_SrvcDocGTSLglControlStatus _SrvcDocGTSLglControlStatus
_SrvcDocGTSScreeningStatus _SrvcDocGTSScreeningStatus
_SrvcDocGTSEmbargoStatus _SrvcDocGTSEmbargoStatus
_SrvcDocBslnCostPostgStatus _SrvcDocBslnCostPostgStatus
_SrvcDocContinuousCostStatus _SrvcDocContinuousCostStatus
_PaymentMethod _PaymentMethod
_SrvcDocExecutionStatus _SrvcDocExecutionStatus
_SrvcDocIsQuotation _SrvcDocIsQuotation
_SrvcDocHeaderLongText _SrvcDocHeaderLongText
_CustMgmtPartner _CustMgmtPartner
@EndUserText.label: 'Service Transaction Enhanced'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog: {
  sqlViewName: 'ISERVDOCENHCD',
  compiler.compareFilter: true,
  preserveKey: true
}

@VDM: {
  viewType: #COMPOSITE,
  lifecycle.contract.type: #PUBLIC_LOCAL_API
}

@AccessControl: {
  authorizationCheck: #CHECK,
  personalData.blocking: #('TRANSACTIONAL_DATA'),
  privilegedAssociations: ['_ServiceDocRefObj', '_ServiceDocPredecessor', '_ServiceDocSuccessor']
}

@ObjectModel: {
   representativeKey: 'ServiceDocument',
   usageType: {
     dataClass:      #MIXED,
     serviceQuality: #C,
     sizeCategory:   #XXL
   },
   supportedCapabilities: [#ANALYTICAL_DIMENSION, #CDS_MODELING_ASSOCIATION_TARGET, #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE],
   modelingPattern: #ANALYTICAL_DIMENSION
}
@Analytics.dataCategory: #DIMENSION
@Metadata.allowExtensions:true
@Metadata.ignorePropagatedAnnotations: true

define view I_ServiceDocumentEnhcd
  as select from I_ServiceDocument

  association [1..*] to I_ServiceDocumentItemEnhcd    as _ServiceDocItem           on  $projection.ServiceObjectType = _ServiceDocItem.ServiceObjectType
                                                                                   and $projection.ServiceDocument   = _ServiceDocItem.ServiceDocument

  association [0..*] to I_ServiceDocumentRefObject    as _ServiceDocRefObj         on  $projection.ServiceObjectType            = _ServiceDocRefObj.ServiceObjectType
                                                                                   and $projection.ServiceDocument              = _ServiceDocRefObj.ServiceDocument
                                                                                   and _ServiceDocRefObj.ServiceDocumentItem    is initial
                                                                                   and _ServiceDocRefObj.SrvcRefObjIsMainObject is not initial

  association [1]    to I_ServiceDocumentPredecessor  as _ServiceDocPredecessor    on  $projection.ServiceDocumentUUID = _ServiceDocPredecessor.ServiceDocumentUUID
                                                                                   and $projection.ServiceObjectType   = _ServiceDocPredecessor.ServiceObjectType

  association [0..*] to I_ServiceDocumentSuccessor    as _ServiceDocSuccessor      on  $projection.ServiceDocumentUUID = _ServiceDocSuccessor.ServiceDocumentUUID
                                                                                   and $projection.ServiceObjectType   = _ServiceDocSuccessor.ServiceObjectType

  association [0..1] to E_ServiceDocument             as _ServiceDocumentExt       on  $projection.ServiceObjectType = _ServiceDocumentExt.ServiceCategory
                                                                                   and $projection.ServiceDocument   = _ServiceDocumentExt.ServiceOrder

  association [0..1] to C_SrvcDocBPContactCardQuickVw as _SrvcDocBPSoldToParty     on  $projection.SoldToParty = _SrvcDocBPSoldToParty.BusinessPartner

  association [0..*] to I_ServiceDocumentLongText     as _ServiceDocLongText       on  $projection.ServiceObjectType           = _ServiceDocLongText.ServiceObjectType
                                                                                   and $projection.ServiceDocument             = _ServiceDocLongText.ServiceDocument
                                                                                   and _ServiceDocLongText.ServiceDocumentItem is initial
                                                                                   and _ServiceDocLongText.TextObjectCategory  = 'CRM_ORDERH'

  association [0..1] to I_StatusObjectWithUUID        as _StatusObjectWithUUID     on  $projection.ServiceDocumentUUID = _StatusObjectWithUUID.StatusObjectUUID

  association [0..*] to I_CustMgmtPartner             as _CustMgmtPartner          on  $projection.ServiceDocument           = _CustMgmtPartner.CustMgmtDocument
                                                                                   and $projection.ServiceObjectType         = _CustMgmtPartner.CustMgmtObjectType
                                                                                   and _CustMgmtPartner.CustMgmtDocumentItem = '000000'



  association [0..*] to I_SrvcDocHeaderLongText  as _SrvcDocHeaderLongText on  $projection.ServiceObjectType      = _SrvcDocHeaderLongText.ServiceObjectType
                                                                                   and $projection.ServiceDocument        = _SrvcDocHeaderLongText.ServiceDocument
                                                                                   and _SrvcDocHeaderLongText.Language = $session.system_language






{
      // Header Keys

      @ObjectModel.foreignKey.association: '_ServiceObjType'
  key ServiceObjectType,
      @ObjectModel.text.element: 'ServiceDocumentDescription'
  key ServiceDocument,

      // Header Details

      ServiceDocumentUUID,
      ServiceDocumentCharUUID,
      @ObjectModel.foreignKey.association: '_ServiceDocumentType'
      ServiceDocumentType,
      @Semantics.text: true
      ServiceDocumentDescription,
      Language,
      PostingDate,
      ServiceDocumentTemplateType,
      ServiceDocCreationDateTime,
      ServiceDocChangedDateTime,
      @Semantics.systemDate.createdAt: true
      cast( tstmp_to_dats( ServiceDocCreationDateTime,
                   abap_system_timezone( $session.client,'NULL' ),
                   $session.client,
                   'NULL' )   as crms4_created_on preserving type ) as ServiceDocumentCreationDate,
      @Semantics.systemDate.lastChangedAt: true
      cast( tstmp_to_dats( ServiceDocChangedDateTime,
                   abap_system_timezone( $session.client,'NULL' ),
                   $session.client,
                   'NULL' )   as crms4_changed_on preserving type ) as ServiceDocumentChangedDate,
      //      @Semantics.systemDate.createdAt: true

      //      cast( cast(substring( cast(ServiceDocCreationDateTime as abap.char(30)) , 1 , 8)

      //                            as abap.dats(8))  as crms4_created_on ) as ServiceDocumentCreationDate,

      //      @Semantics.systemDate.lastChangedAt: true

      //      cast( cast(substring( cast(ServiceDocChangedDateTime as abap.char(30)) , 1 , 8)

      //                            as abap.dats(8))  as crms4_changed_on ) as ServiceDocumentChangedDate,

      ServiceDocumentCreatedByUser,
      ServiceDocumentChangedByUser,
      PricingDocument,
      PricingProcedure,
      RefBusinessSolutionOrder,
      SrvcDocIsMaintServiceOrder,

      // Activity

      @ObjectModel.foreignKey.association: '_ActivityCategory'
      BusinessActivityCategory,
      @ObjectModel.foreignKey.association: '_ServiceDocumentPriority'
      ServiceDocumentPriority,

      // Cumulate Extension

      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'TransactionCurrency'} }
      ServiceDocNetAmount,
      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'TransactionCurrency'} }
      ServiceDocGrossAmount,
      @DefaultAggregation: #SUM
      @Semantics: { amount : {currencyCode: 'TransactionCurrency'} }
      ServiceDocTaxAmount,

      // Partner Details

      @ObjectModel.foreignKey.association: '_SoldToParty'
      SoldToParty,
      @ObjectModel.foreignKey.association: '_SoldToPartyCountry'
      SoldToPartyCountry,
      @ObjectModel.foreignKey.association: '_SoldToPartyRegion'
      SoldToPartyRegion,
      @ObjectModel.foreignKey.association: '_ServiceTeam'
      ServiceTeam,
      @ObjectModel.foreignKey.association: '_RespEmployee'
      ResponsibleEmployee,
      @ObjectModel.foreignKey.association: '_ServiceEmployee'
      ServiceEmployee,
      @ObjectModel.foreignKey.association: '_ContactPerson'
      ContactPerson,
      @ObjectModel.foreignKey.association: '_ShipToParty'
      ShipToParty,
      @ObjectModel.foreignKey.association: '_BillToParty'
      BillToParty,
      @ObjectModel.foreignKey.association: '_PayerParty'
      PayerParty,

      // Dates

      RequestedServiceStartDateTime,
      RequestedServiceEndDateTime,
      ServiceContractStartDateTime,
      ServiceContractEndDateTime,
      SrvcContrEarliestStartDateTime,
      SrvcContrLatestEndDateTime,
      SrvcQtanValidityStartDateTime,
      SrvcQtanValidityEndDateTime,
      SrvcDocTmplValdtyStartDateTime,
      SrvcDocTmplValdtyEndDateTime,
      SrvcDocTemplateSearchTermText,

      cast( tstmp_to_dats( RequestedServiceStartDateTime,
                   abap_system_timezone( $session.client,'NULL' ),
                   $session.client,
                   'NULL' )  as crms4_created_on preserving type )  as RequestedServiceStartDate,
      cast( tstmp_to_dats( RequestedServiceEndDateTime,
                   abap_system_timezone( $session.client,'NULL' ),
                   $session.client,
                   'NULL' )  as crms4_changed_on preserving type )  as RequestedServiceEndDate,
      cast( tstmp_to_dats( ServiceContractStartDateTime,
                   abap_system_timezone( $session.client,'NULL' ),
                   $session.client,
                   'NULL' )  as crms4_created_on preserving type )  as ServiceContractStartDate,
      cast( tstmp_to_dats( ServiceContractEndDateTime,
                   abap_system_timezone( $session.client,'NULL' ),
                   $session.client,
                   'NULL' )  as crms4_changed_on preserving type )  as ServiceContractEndDate,
      cast( tstmp_to_dats( SrvcQtanValidityStartDateTime,
                   abap_system_timezone( $session.client,'NULL' ),
                   $session.client,
                   'NULL' )  as crms4_created_on preserving type )  as SrvcQuotationValidityStartDate,
      cast( tstmp_to_dats( SrvcQtanValidityEndDateTime,
                   abap_system_timezone( $session.client,'NULL' ),
                   $session.client,
                   'NULL' )  as crms4_changed_on preserving type )  as SrvcQuotationValidityEndDate,

      //      cast( cast(substring( cast(RequestedServiceStartDateTime as abap.char(30)) , 1 , 8)

      //                            as abap.dats(8))  as crms4_created_on ) as RequestedServiceStartDate,

      //      cast( cast(substring( cast(RequestedServiceEndDateTime as abap.char(30)) , 1 , 8)

      //                            as abap.dats(8))  as crms4_changed_on ) as RequestedServiceEndDate,

      //

      //      cast( cast(substring( cast(ServiceContractStartDateTime as abap.char(30)) , 1 , 8)

      //                       as abap.dats(8))  as crms4_created_on )      as ServiceContractStartDate,

      //      cast( cast(substring( cast(ServiceContractEndDateTime as abap.char(30)) , 1 , 8)

      //                       as abap.dats(8))  as crms4_changed_on )      as ServiceContractEndDate,

      //

      //      cast( cast(substring( cast(SrvcQtanValidityStartDateTime as abap.char(30)) , 1 , 8)

      //                            as abap.dats(8))  as crms4_created_on ) as SrvcQuotationValidityStartDate,

      //      cast( cast(substring( cast(SrvcQtanValidityEndDateTime as abap.char(30)) , 1 , 8)

      //                            as abap.dats(8))  as crms4_changed_on ) as SrvcQuotationValidityEndDate,


      // Pricing Parameter Set

      @ObjectModel.foreignKey.association: '_PaymentTerms'
      PaymentTerms,
      @ObjectModel.foreignKey.association: '_PaymentMethod'
      PaymentMethod,
      @ObjectModel.foreignKey.association: '_SrvcSEPAMandateRelevance'
      SrvcSEPAMandateRelevance,
      SEPAMandate,

      WBSElementInternalID,

      case SrvcDocAcctAssgmtObjectType
      when '03' then left( SrvcDocAcctAssgmtObject, 24)
      else ''
      end as WBSElement,

      @ObjectModel.foreignKey.association: '_TransactionCurrency'
      @Semantics.currencyCode:true
      TransactionCurrency,

      // Sales Set

      PurchaseOrderByCustomer,
      CustomerPurchaseOrderDate,
      @ObjectModel.foreignKey.association: '_SrvcDocumentRejectionReason'
      ServiceDocumentRejectionReason,
      @ObjectModel.foreignKey.association: '_Region'
      Region,

      // Status

      @ObjectModel.foreignKey.association: '_SrvcDocLifecycleStatus'
      ServiceDocumentStatus,
      @ObjectModel.foreignKey.association: '_ServiceDocHasError'
      ServiceDocumentHasError,
      @ObjectModel.foreignKey.association: '_ServiceDocBillingStatus'
      ServiceDocBillingStatus,
      @ObjectModel.foreignKey.association: '_SrvcDocIsRelForBillgSts'
      ServiceDocIsReleasedForBilling,
      @ObjectModel.foreignKey.association: '_ServiceDocumentIsOpen'
      ServiceDocumentIsOpen,
      @ObjectModel.foreignKey.association: '_SrvcDocTransferStatus'
      SrvcDocTransferStatus,
      @ObjectModel.foreignKey.association: '_SrvcDocIsQuotation'
      ServiceDocumentIsQuotation,
      ServiceDocumentIsReleased,
      ServiceDocumentIsRejected,
      ServiceConfirmationIsFinal,
      @ObjectModel.foreignKey.association: '_ServiceContractCanclnSts'
      ServiceContractCanclnSts,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: 'SrvcDocExecutionStatus'
      MaintSrvcOrdExecutionStatus,
      @ObjectModel.foreignKey.association: '_SrvcDocExecutionStatus'
      SrvcDocExecutionStatus,
      SrvcDocDeliveryStatus,
      SrvcDocGoodsIssueStatus,
      SrvcDocRejectionStatus,
      // Organizational Unit Set

      @ObjectModel.foreignKey.association: '_SalesOrganizationOrgUnit_2'
      SalesOrganizationOrgUnitID,
      @ObjectModel.foreignKey.association: '_SalesOfficeOrgUnit_2'
      SalesOfficeOrgUnitID,
      @ObjectModel.foreignKey.association: '_SalesGroupOrgUnit_2'
      SalesGroupOrgUnitID,
      @ObjectModel.foreignKey.association: '_DistributionChannel'
      DistributionChannel,
      @ObjectModel.foreignKey.association: '_Division'
      Division,
      @ObjectModel.foreignKey.association: '_ServiceOrganizationOrgUnit_2'
      ServiceOrganization,
      @ObjectModel.foreignKey.association: '_RespSrvcOrganizationOrgUnit_2'
      ResponsibleServiceOrganization,
      @ObjectModel.foreignKey.association: '_EnterpriseServiceOrg'
      EnterpriseServiceOrganization,

      // Organizational units with the S/4 SD codes

      @ObjectModel.foreignKey.association: '_SalesOrganization'
      SalesOrganization,
      @ObjectModel.foreignKey.association: '_SalesOffice'
      SalesOffice,
      @ObjectModel.foreignKey.association: '_SalesGroup'
      SalesGroup,

      // Service Organizational Units with S/4 Code

      RespyMgmtServiceTeam,

      // Billing Set

      @ObjectModel.foreignKey.association: '_BillingBlockReason'
      BillingBlockReason,

      // Subject

      ServiceReasonSchema,
      ServiceReasonCategory,
      ServiceDefectSchema,
      ServiceDefectCategory,

      // Dates

      ServiceFirstResponseByDateTime,
      ServiceDueByDateTime,
      ErlstRequestedDeliveryDateTime,

      // Service Request

      RecommendedServicePriority,
      ServiceDocumentUrgency,
      ServiceDocumentImpact,
      ServiceEscalationLevel,
      @ObjectModel.foreignKey.association: '_ServiceDocProblemCategory'
      ServiceDocumentProblemCategory,
      @ObjectModel.foreignKey.association: '_ServiceRisk'
      ServiceRisk,

      // Cancel Header

      ServiceDocumentCanclnParty,
      ServiceDocumentCanclnReason,

      // In-House Repair Reference

      ReferenceInHouseRepair,
      ReferenceInHouseRepairItem,
      RefInHouseRepairIsExisting,

      // Credit Status

      @ObjectModel.foreignKey.association: '_SrvcDocCreditStatus'
      SrvcDocCreditStatus,

      // GTS Embargo Status

      @ObjectModel.foreignKey.association: '_SrvcDocGTSEmbargoStatus'
      SrvcDocGTSEmbargoStatus,

      // GTS Screening Status

      @ObjectModel.foreignKey.association: '_SrvcDocGTSScreeningStatus'
      SrvcDocGTSScreeningStatus,

      // GTS Legal Control

      @ObjectModel.foreignKey.association: '_SrvcDocGTSLglControlStatus'
      SrvcDocGTSLglControlStatus,

      // Baseline Cost Posting Status

      SrvcDocBslnCostPostgStatus,

      // Continuous Cost Calculation Status

      SrvcDocContinuousCostStatus,

      // Business complete status

      @Semantics.booleanIndicator: true
      SrvcOrdIsBusinessCompleted,
       
      // Business reopened status

      @Semantics.booleanIndicator: true
      SrvcOrdIsBusinessReopened,
      
      //Shipping

      ShippingCondition,

      //Pricing Group

      CustomerPriceGroup,

      SrvcDocAcctAssgmtObjectType,
      SrvcDocAcctAssgmtObject,

      // Status profile

      _StatusObjectWithUUID.StatusProfile,

      // Associations to next level

      // Header Keys Assocations

      _ServiceObjType,

      // Header Details Assocations

      _ServiceDocumentType,

      // Partner Details Associations

      _SoldToParty,
      _RespEmployee,
      _ServiceTeam,
      _ServiceEmployee,
      _ContactPerson,
      _ShipToParty,
      _BillToParty,
      _PayerParty,
      _SoldToPartyToCustomer,
      _SoldToPartyCountry,
      _SoldToPartyRegion,
      _ServiceTeamHeader,

      // Status Assocations

      @ObjectModel.association.boundFields.dataMatchesSourceAndTargetTypes: true
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_SrvcDocLifecycleStatus'
      _ServiceDocumentStatus,
      _SrvcDocLifecycleStatus,
      @ObjectModel.association.boundFields.dataMatchesSourceAndTargetTypes: true
      _ServiceDocBillingStatus,
      @ObjectModel.association.boundFields.dataMatchesSourceAndTargetTypes: true
      _SrvcDocIsRelForBillgSts,
      @ObjectModel.association.boundFields.dataMatchesSourceAndTargetTypes: true
      _ServiceDocumentIsOpen,
      @ObjectModel.association.boundFields.dataMatchesSourceAndTargetTypes: true
      _ServiceDocHasError,
      @ObjectModel.association.boundFields.dataMatchesSourceAndTargetTypes: true
      _ServiceContractCanclnSts,
      _SrvcDocTransferStatus,

      // Billing Set Associations

      _BillingBlockReason,

      // Activity Associations

      _ActivityCategory,
      _ServiceDocumentPriority,

      // Pricing Parameter Set

      _TransactionCurrency,
      _PaymentTerms,
      _SrvcSEPAMandateRelevance,
      _FixedPrice,

      // Organization Unit Set Assocations

      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_SalesOrganizationOrgUnit_2'
      _SalesOrganizationOrgUnit,
      _SalesOrganizationOrgUnit_2,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_SalesOfficeOrgUnit_2'
      _SalesOfficeOrgUnit,
      _SalesOfficeOrgUnit_2,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_SalesGroupOrgUnit_2'
      _SalesGroupOrgUnit,
      _SalesGroupOrgUnit_2,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_ServiceOrganizationOrgUnit_2'
      _ServiceOrganizationOrgUnit,
      _ServiceOrganizationOrgUnit_2,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_RespSrvcOrganizationOrgUnit_2'
      _RespSrvcOrganizationOrgUnit,
      _RespSrvcOrganizationOrgUnit_2,
      _SalesOrganization,
      _SalesOffice,
      _SalesGroup,
      _DistributionChannel,
      _Division,
      _EnterpriseServiceOrg,

      // Sales Set Assocaition

      _Region,
      _SrvcDocumentRejectionReason,

      // Service Request Association

      _ServiceRisk,
      _ServiceDocProblemCategory,

      // Association to Service Document Item

      _ServiceDocItem,

      // Association to Service Document Enhanced views

      _ServiceDocRefObj,
      _ServiceDocPredecessor,
      _ServiceDocSuccessor,

      //Association to long text view

      _ServiceDocLongText,

      @UI.hidden: true
      _SrvcDocBPSoldToParty,

      // Credit Status association

      _SrvcDocCreditStatus,

      // GTS Legal Control Status association

      _SrvcDocGTSLglControlStatus,

      //GTS Screening Status

      _SrvcDocGTSScreeningStatus,

      //GTS Embargo Status

      _SrvcDocGTSEmbargoStatus,


      // Baseline Cost Posting Status

      _SrvcDocBslnCostPostgStatus,

      // Continuous Cost Calculation Status

      _SrvcDocContinuousCostStatus,

      _PaymentMethod,


      // Service Order Execution Status

      _SrvcDocExecutionStatus,
      _SrvcDocIsQuotation,
      _SrvcDocHeaderLongText,
      _CustMgmtPartner
}