R_ServiceDocumentTP

DDL: R_SERVICEDOCUMENTTP Type: view TRANSACTIONAL Package: CRMS4_SOLUTIONORDER_FIORI_UI

Transaction Processing: Service Header

R_ServiceDocumentTP is a Transactional CDS View that provides data about "Transaction Processing: Service Header" in SAP S/4HANA. It reads from 1 data source (I_ServiceDocumentEnhcd) and exposes 84 fields with key fields ServiceObjectType, ServiceDocument. It has 11 associations to related views. Part of development package CRMS4_SOLUTIONORDER_FIORI_UI.

Data Sources (1)

SourceAliasJoin Type
I_ServiceDocumentEnhcd I_ServiceDocumentEnhcd from

Associations (11)

CardinalityTargetAliasCondition
[0..*] I_ServiceDocumentSuccessor _ServiceDocumentSuccessor $projection.ServiceDocumentUUID = _ServiceDocumentSuccessor.ServiceDocumentUUID and $projection.ServiceObjectType = _ServiceDocumentSuccessor.ServiceObjectType
[1] I_BusinessPartner _ServiceDocCreatedBy $projection.ServiceDocumentCreatedByUser = _ServiceDocCreatedBy.BusinessPartner
[1] I_BusinessPartner _ServiceDocChangedBy $projection.ServiceDocumentChangedByUser = _ServiceDocChangedBy.BusinessPartner
[0..1] I_SrvcMgmtBPQuickView_2 _SrvcDocBPSoldToParty $projection.SoldToParty = _SrvcDocBPSoldToParty.BusinessPartner
[0..1] I_SrvcMgmtBPQuickView_2 _SrvcDocBPContactCard $projection.ContactPerson = _SrvcDocBPContactCard.BusinessPartner
[0..1] I_SrvcMgmtBPQuickView_2 _SrvcDocBPRespEmployee $projection.ResponsibleEmployee = _SrvcDocBPRespEmployee.BusinessPartner
[1] I_SrvcDocErrorStatusVH _ServiceDocHasError $projection.ServiceDocumentHasError = _ServiceDocHasError.ServiceDocumentHasError
[0..1] E_ServiceDocument _ServiceDocumentExt $projection.ServiceObjectType = _ServiceDocumentExt.ServiceCategory and $projection.ServiceDocument = _ServiceDocumentExt.ServiceOrder
[0..1] 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.ServiceDocumentStatus = _CustMgmtLifecycleUserStsText.CustMgmtLifecycleUserStatus and _CustMgmtLifecycleUserStsText.Language = $session.system_language
[0..*] R_ServiceDocumentItemTP _ServiceDocumentItemTP

Annotations (14)

NameValueLevelField
AbapCatalog.sqlViewName RSRVCDOCUMENTTP view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
EndUserText.label Transaction Processing: Service Header view
VDM.viewType #TRANSACTIONAL view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
VDM.lifecycle.status #DEPRECATED view
AccessControl.authorizationCheck #CHECK view
Metadata.ignorePropagatedAnnotations true view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.representativeKey ServiceDocument view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view

Fields (84)

KeyFieldSource TableSource FieldDescription
KEY ServiceObjectType ServiceObjectType
KEY ServiceDocument ServiceDocument
ServiceDocumentUUID ServiceDocumentUUID
ServiceDocumentCharUUID ServiceDocumentCharUUID
ServiceDocumentDescription ServiceDocumentDescription
ServiceDocumentType ServiceDocumentType
ServiceDocumentStatus ServiceDocumentStatus
ServiceDocumentPriority ServiceDocumentPriority
ResponsibleEmployee ResponsibleEmployee
SoldToParty SoldToParty
ContactPerson ContactPerson
ServiceDocumentHasError ServiceDocumentHasError
TransactionCurrency TransactionCurrency
ServiceDocNetAmount ServiceDocNetAmount
ServiceDocGrossAmount ServiceDocGrossAmount
ServiceDocumentCreationDate ServiceDocumentCreationDate
ServiceDocumentChangedDate ServiceDocumentChangedDate
PostingDate PostingDate
ServiceDocumentCreatedByUser ServiceDocumentCreatedByUser
ServiceDocumentChangedByUser ServiceDocumentChangedByUser
ServiceDocumentIsQuotation ServiceDocumentIsQuotation
SrvcDocIsMaintServiceOrder SrvcDocIsMaintServiceOrder
SalesOrganization SalesOrganization
SalesOffice SalesOffice
SalesGroup SalesGroup
DistributionChannel DistributionChannel
Division Division
RequestedServiceStartDate RequestedServiceStartDate
RequestedServiceEndDate RequestedServiceEndDate
BillToParty BillToParty
ShipToParty ShipToParty
PayerParty PayerParty
SoldToPartyCountry SoldToPartyCountry
SoldToPartyRegion SoldToPartyRegion
ServiceDocBillingStatus ServiceDocBillingStatus
ServiceDocIsReleasedForBilling ServiceDocIsReleasedForBilling
ServiceDocumentIsRejected ServiceDocumentIsRejected
ServiceDocumentIsReleased ServiceDocumentIsReleased
MaintSrvcOrdExecutionStatus MaintSrvcOrdExecutionStatus
ServiceTeam ServiceTeam
SalesOfficeOrgUnitID SalesOfficeOrgUnitID
SalesOrganizationOrgUnitID SalesOrganizationOrgUnitID
SalesGroupOrgUnitID SalesGroupOrgUnitID
ServiceOrganization ServiceOrganization
PurchaseOrderByCustomer PurchaseOrderByCustomer
SystemStatus _SrvcDocSystemStatus StatusCode
_ServiceDocumentItemTP _ServiceDocumentItemTP
_ServiceObjType _ServiceObjType
_ServiceDocumentPriority _ServiceDocumentPriority
_ServiceDocumentStatus _ServiceDocumentStatus
_SrvcDocIsRelForBillgSts _SrvcDocIsRelForBillgSts
_ServiceDocBillingStatus _ServiceDocBillingStatus
_RespEmployee _RespEmployee
_SoldToParty _SoldToParty
_ContactPerson _ContactPerson
_ServiceDocumentType _ServiceDocumentType
_SalesOrganization _SalesOrganization
_SalesOffice _SalesOffice
_SalesGroup _SalesGroup
_DistributionChannel _DistributionChannel
_Division _Division
_ServiceDocumentSuccessor _ServiceDocumentSuccessor
_TransactionCurrency _TransactionCurrency
_ServiceDocCreatedBy _ServiceDocCreatedBy
_ServiceDocChangedBy _ServiceDocChangedBy
_SrvcDocBPSoldToParty _SrvcDocBPSoldToParty
_SrvcDocBPContactCard _SrvcDocBPContactCard
_SrvcDocBPRespEmployee _SrvcDocBPRespEmployee
_ServiceDocHasError _ServiceDocHasError
_SalesOrganizationOrgUnit _SalesOrganizationOrgUnit
_SalesOfficeOrgUnit _SalesOfficeOrgUnit
_SalesGroupOrgUnit _SalesGroupOrgUnit
_ServiceOrganizationOrgUnit _ServiceOrganizationOrgUnit
_SalesOrganizationOrgUnit_2 _SalesOrganizationOrgUnit_2
_SalesOfficeOrgUnit_2 _SalesOfficeOrgUnit_2
_SalesGroupOrgUnit_2 _SalesGroupOrgUnit_2
_ServiceOrganizationOrgUnit_2 _ServiceOrganizationOrgUnit_2
_BillToParty _BillToParty
_ShipToParty _ShipToParty
_PayerParty _PayerParty
_SoldToPartyCountry _SoldToPartyCountry
_SoldToPartyRegion _SoldToPartyRegion
_ServiceTeam _ServiceTeam
_SrvcDocSystemStatus _SrvcDocSystemStatus
@AbapCatalog: {
  sqlViewName: 'RSRVCDOCUMENTTP',
  compiler.compareFilter: true,
  preserveKey: true

}

@EndUserText.label: 'Transaction Processing: Service Header'

@VDM: {
  viewType: #TRANSACTIONAL,
  lifecycle.contract.type: #SAP_INTERNAL_API,
  lifecycle.status: #DEPRECATED
}

@AccessControl: {
  authorizationCheck: #CHECK,
  personalData.blocking: #('TRANSACTIONAL_DATA')
}

@Metadata: {
  ignorePropagatedAnnotations: true
}
@ClientHandling: {
  algorithm: #SESSION_VARIABLE
}

@ObjectModel: {
  // this will make the title column bold in smart templates

  // and description and ID are displayed in two lines when using annotation @ObjectModel.text.element

  semanticKey: ['ServiceDocument'],
  representativeKey: 'ServiceDocument',
  usageType: {serviceQuality: #C, sizeCategory: #XXL, dataClass: #MIXED}
}

define root view R_ServiceDocumentTP
  as select from I_ServiceDocumentEnhcd
  composition [0..*] of R_ServiceDocumentItemTP        as _ServiceDocumentItemTP

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

  association [1]    to I_BusinessPartner                 as _ServiceDocCreatedBy       on  $projection.ServiceDocumentCreatedByUser = _ServiceDocCreatedBy.BusinessPartner
  association [1]    to I_BusinessPartner                 as _ServiceDocChangedBy       on  $projection.ServiceDocumentChangedByUser = _ServiceDocChangedBy.BusinessPartner


  association [0..1] to I_SrvcMgmtBPQuickView_2        as _SrvcDocBPSoldToParty         on  $projection.SoldToParty = _SrvcDocBPSoldToParty.BusinessPartner
  association [0..1] to I_SrvcMgmtBPQuickView_2        as _SrvcDocBPContactCard         on  $projection.ContactPerson = _SrvcDocBPContactCard.BusinessPartner
  association [0..1] to I_SrvcMgmtBPQuickView_2        as _SrvcDocBPRespEmployee        on  $projection.ResponsibleEmployee = _SrvcDocBPRespEmployee.BusinessPartner

  association [1]    to I_SrvcDocErrorStatusVH            as _ServiceDocHasError        on  $projection.ServiceDocumentHasError = _ServiceDocHasError.ServiceDocumentHasError


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

  //  association [0..1] to I_SrvcDocHdrRelForBillgSts    as _SrvcDocHdrRelForBillgSts on  $projection.ServiceDocIsReleasedForBilling = _SrvcDocHdrRelForBillgSts.SrvcOrdReldForBillingStatus


  association [0..1] to I_StatusObjectUUIDStatus       as _SrvcDocSystemStatus          on  $projection.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..1] to I_CustMgmtLifecycleUserStsText as _CustMgmtLifecycleUserStsText on  $projection.ServiceDocumentStatus      = _CustMgmtLifecycleUserStsText.CustMgmtLifecycleUserStatus
                                                                                        and _CustMgmtLifecycleUserStsText.Language = $session.system_language

{
      @ObjectModel.foreignKey.association: '_ServiceObjType'
  key ServiceObjectType,
  key ServiceDocument,

      ServiceDocumentUUID,

      @Semantics.uuid: true
      ServiceDocumentCharUUID,

      ServiceDocumentDescription,

      @ObjectModel.foreignKey.association: '_ServiceDocumentType'
      ServiceDocumentType,

      @ObjectModel.foreignKey.association: '_ServiceDocumentStatus'
      //@ObjectModel.text.association: '_ServiceDocumentStatusText'

      ServiceDocumentStatus,

      case
           when _ServiceDocumentType.StatusProfile <> '' and _CustMgmtLifecycleUserStsText.CustMgmtLifecycleUserStatus <> ''
            then _CustMgmtLifecycleUserStsText.CustMgmtLifecycleUserStsName
           when _ServiceDocumentType.StatusProfile = ''
            then _ServiceDocumentStatus._ServiceDocumentStatusText[1:Language = $session.system_language].ServiceDocumentStatusName
           else _ServiceDocumentStatus._ServiceDocumentStatusText[1:Language = $session.system_language].ServiceDocumentStatusName
       end                            as ServiceDocumentStatusName,


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

      @ObjectModel.foreignKey.association: '_RespEmployee'
      ResponsibleEmployee,

      @ObjectModel.foreignKey.association: '_SoldToParty'
      SoldToParty,

      @ObjectModel.foreignKey.association: '_ContactPerson'
      ContactPerson,

      //@ObjectModel.foreignKey.association: '_ServiceDocHasError'

      @Semantics.booleanIndicator: true
      ServiceDocumentHasError,

      //Amount

      @ObjectModel.foreignKey.association: '_TransactionCurrency'
      @Semantics.currencyCode:true
      TransactionCurrency             as TransactionCurrency,
      @Semantics: { amount : {currencyCode: 'TransactionCurrency'} }
      ServiceDocNetAmount,
      @Semantics: { amount : {currencyCode: 'TransactionCurrency'} }
      ServiceDocGrossAmount,


      ServiceDocumentCreationDate,
      ServiceDocumentChangedDate,
      PostingDate,
      ServiceDocumentCreatedByUser,
      ServiceDocumentChangedByUser,
      @Semantics.booleanIndicator: true
      ServiceDocumentIsQuotation,
      SrvcDocIsMaintServiceOrder,

      @ObjectModel.foreignKey.association: '_SalesOrganization'
      SalesOrganization,
      @ObjectModel.foreignKey.association: '_SalesOffice'
      SalesOffice,
      @ObjectModel.foreignKey.association: '_SalesGroup'
      SalesGroup,
      @ObjectModel.foreignKey.association: '_DistributionChannel'
      DistributionChannel,
      @ObjectModel.foreignKey.association: '_Division'
      Division,


      //Fields required for MCSO,

      RequestedServiceStartDate,
      RequestedServiceEndDate,

      @ObjectModel.foreignKey.association: '_BillToParty'
      BillToParty,
      @ObjectModel.foreignKey.association: '_ShipToParty'
      ShipToParty,
      @ObjectModel.foreignKey.association: '_PayerParty'
      PayerParty,

      SoldToPartyCountry,
      SoldToPartyRegion,

      @ObjectModel.foreignKey.association: '_ServiceDocBillingStatus'
      ServiceDocBillingStatus,
      //      @ObjectModel.foreignKey.association: '_SrvcDocIsRelForBillgSts'

      @Semantics.booleanIndicator: true
      ServiceDocIsReleasedForBilling,
      @Semantics.booleanIndicator: true
      ServiceDocumentIsRejected,
      @Semantics.booleanIndicator: true
      ServiceDocumentIsReleased,
      @API.element.releaseState: #DEPRECATED
      MaintSrvcOrdExecutionStatus,
      ServiceTeam,


      // For Authorization


      //      @ObjectModel.foreignKey.association: '_SalesOfficeOrgUnit'

      @ObjectModel.foreignKey.association: '_SalesOfficeOrgUnit_2'
      SalesOfficeOrgUnitID,

      //      @ObjectModel.foreignKey.association: '_SalesOrganizationOrgUnit'

      @ObjectModel.foreignKey.association: '_SalesOrganizationOrgUnit_2'
      SalesOrganizationOrgUnitID,

      //      @ObjectModel.foreignKey.association: '_SalesGroupOrgUnit'

      @ObjectModel.foreignKey.association: '_SalesGroupOrgUnit_2'
      SalesGroupOrgUnitID,

      //      @ObjectModel.foreignKey.association: '_ServiceOrganizationOrgUnit'

      @ObjectModel.foreignKey.association: '_ServiceOrganizationOrgUnit_2'
      ServiceOrganization,

      case ServiceDocumentHasError
         when 'X' then 1
        when ' ' then 0
         else 0
       end                            as BusSolnOrdErrorStsCriticality,


      //External Reference Number

      PurchaseOrderByCustomer,

      _SrvcDocSystemStatus.StatusCode as SystemStatus,

      /* Associations */
      _ServiceDocumentItemTP,

      _ServiceObjType,
      _ServiceDocumentPriority,
      _ServiceDocumentStatus,
      _SrvcDocIsRelForBillgSts,
      _ServiceDocBillingStatus,
      _RespEmployee,
      _SoldToParty,
      _ContactPerson,
      //_ServiceDocHasError,


      /* Required for DCL */
      _ServiceDocumentType,
      _SalesOrganization,
      _SalesOffice,
      _SalesGroup,
      _DistributionChannel,
      _Division,
      _ServiceDocumentSuccessor,
      _TransactionCurrency,
      _ServiceDocCreatedBy,
      _ServiceDocChangedBy,
      _SrvcDocBPSoldToParty,
      _SrvcDocBPContactCard,
      _SrvcDocBPRespEmployee,
      _ServiceDocHasError,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_SalesOrganizationOrgUnit_2'
      _SalesOrganizationOrgUnit,

      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_SalesOfficeOrgUnit_2'
      _SalesOfficeOrgUnit,

      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_SalesGroupOrgUnit_2'
      _SalesGroupOrgUnit,

      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_ServiceOrganizationOrgUnit_2'
      _ServiceOrganizationOrgUnit,

      _SalesOrganizationOrgUnit_2,
      _SalesOfficeOrgUnit_2,
      _SalesGroupOrgUnit_2,
      _ServiceOrganizationOrgUnit_2,

      // _SrvcDocErrSts

      _BillToParty,
      _ShipToParty,
      _PayerParty,
      _SoldToPartyCountry,
      _SoldToPartyRegion,
      _ServiceTeam,
      _SrvcDocSystemStatus
      // _CustMgmtLifecycleUserStsText


      //      _SrvcDocHdrRelForBillgSts

            
}