R_ServiceQuotationTP

DDL: R_SERVICEQUOTATIONTP Type: view_entity TRANSACTIONAL

Service Quotation - TP

R_ServiceQuotationTP is a Transactional CDS View that provides data about "Service Quotation - TP" in SAP S/4HANA. It reads from 1 data source (I_ServiceDocumentEnhcd) and exposes 71 fields with key field ServiceQuotation. It has 14 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_ServiceDocumentEnhcd I_ServiceDocumentEnhcd from

Associations (14)

CardinalityTargetAliasCondition
[0..1] I_CustMgmtExtRefID _CustMgmtExtRef $projection.ServiceQuotation = _CustMgmtExtRef.CustMgmtDocument and $projection.ServiceObjectType = _CustMgmtExtRef.CustMgmtObjectType and _CustMgmtExtRef.CustMgmtExtRefIDType = '0009'
[0..1] R_SrvcDocDocumentFlow _RefServiceContract $projection.ServiceQuotationUUID = _RefServiceContract.ServiceDocumentUUID and _RefServiceContract.PrdcssrSuccssrDocObjectType = 'BUS2000112' and _RefServiceContract.ServiceObjectType = 'BUS2000116'
[0..1] I_RespyMgmtTeamHeaderDetail _ServiceTeamHeader $projection.RespyMgmtServiceTeam = _ServiceTeamHeader.RespyMgmtTeamID
[0..1] I_StatusObjectUUIDStatus _SrvcQtanStatus $projection.ServiceQuotationUUID = _SrvcQtanStatus.StatusObjectUUID and ( _SrvcQtanStatus.StatusCode = 'I1002' or _SrvcQtanStatus.StatusCode = 'I1003' or _SrvcQtanStatus.StatusCode = 'I1004' or _SrvcQtanStatus.StatusCode = 'I1005' ) and _SrvcQtanStatus.StatusIsActive = 'X'
[0..1] E_ServiceDocument _Extension $projection.ServiceObjectType = _Extension.ServiceCategory and $projection.ServiceQuotation = _Extension.ServiceOrder
[0..*] R_ServiceQuotationItemTP _ServiceQuotationItemTP
[0..*] R_SrvcQtanReferenceObjectTP _SrvcQtanReferenceObjectTP
[0..*] R_SrvcQtanPriceElementTP _SrvcQtanPriceElementTP
[0..*] R_SrvcQtanFUPSrvcOrdTP _SrvcQtanFUPSrvcOrdTP
[0..*] R_SrvcQtanPartnerTP _SrvcQtanPartnerTP
[0..*] R_SrvcQtanAppointmentTP _SrvcQtanAppointmentTP
[0..*] R_SrvcQtanDurationTP _SrvcQtanDurationTP
[0..*] R_SrvcQtanUserStatusTP _SrvcQtanUserStatusTP
[0..*] R_SrvcQtanLongTextTP _SrvcQtanLongTextTP

Annotations (10)

NameValueLevelField
AccessControl.authorizationCheck #CHECK view
VDM.viewType #TRANSACTIONAL view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
Metadata.ignorePropagatedAnnotations true view
EndUserText.label Service Quotation - TP view
ObjectModel.sapObjectNodeType.name ServiceQuotation view
ObjectModel.representativeKey ServiceQuotation view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view

Fields (71)

KeyFieldSource TableSource FieldDescription
KEY ServiceQuotation ServiceDocument
ServiceObjectType ServiceObjectType
ServiceQuotationType ServiceDocumentType
ServiceQuotationUUID ServiceDocumentUUID
ServiceQuotationDescription ServiceDocumentDescription
Language Language
PostingDate PostingDate
ServiceDocCreationDateTime ServiceDocCreationDateTime
ServiceDocChangedDateTime ServiceDocChangedDateTime
ServiceDocumentCreatedByUser ServiceDocumentCreatedByUser
ServiceDocumentChangedByUser ServiceDocumentChangedByUser
SoldToParty SoldToParty
ShipToParty ShipToParty
ContactPersonBusinessPartnerId ContactPerson
RespEmployeeBusinessPartnerId ResponsibleEmployee
SalesOrganization SalesOrganization
DistributionChannel DistributionChannel
Division Division
SalesOffice SalesOffice
SalesGroup SalesGroup
SalesOrganizationOrgUnitID SalesOrganizationOrgUnitID
SalesOfficeOrgUnitID SalesOfficeOrgUnitID
SalesGroupOrgUnitID SalesGroupOrgUnitID
ServiceOrganization ServiceOrganization
RespyMgmtServiceTeam RespyMgmtServiceTeam
RespyMgmtGlobalTeamID _ServiceTeamHeader RespyMgmtGlobalTeamID
ServiceQuotationStatus ServiceDocumentStatus
ServiceQuotationHasError ServiceDocumentHasError
SrvcDocRejectionStatus SrvcDocRejectionStatus
RequestedServiceStartDateTime RequestedServiceStartDateTime
RequestedServiceEndDateTime RequestedServiceEndDateTime
SrvcQtanValidityStartDateTime SrvcQtanValidityStartDateTime
SrvcQtanValidityEndDateTime SrvcQtanValidityEndDateTime
ServiceDocumentPriority ServiceDocumentPriority
TransactionCurrency TransactionCurrency
ServiceDocGrossAmount ServiceDocGrossAmount
ServiceDocNetAmount ServiceDocNetAmount
ServiceDocTaxAmount ServiceDocTaxAmount
PricingDocument PricingDocument
SrvcQuotationRejectionReason ServiceDocumentRejectionReason
ServiceQtanExtReference _CustMgmtExtRef CustMgmtExtRefID
ReferenceServiceContract
_ServiceQuotationItemTP _ServiceQuotationItemTP
_ServiceObjType _ServiceObjType
_ServiceDocumentType _ServiceDocumentType
_SoldToParty _SoldToParty
_ShipToParty _ShipToParty
_ContactPerson _ContactPerson
_RespEmployee _RespEmployee
_SalesOrganization _SalesOrganization
_DistributionChannel _DistributionChannel
_Division _Division
_SalesOffice _SalesOffice
_SalesGroup _SalesGroup
_SalesOrganizationOrgUnit_2 _SalesOrganizationOrgUnit_2
_SalesOfficeOrgUnit_2 _SalesOfficeOrgUnit_2
_SalesGroupOrgUnit_2 _SalesGroupOrgUnit_2
_ServiceOrganizationOrgUnit_2 _ServiceOrganizationOrgUnit_2
_ServiceTeamHeader _ServiceTeamHeader
_ServiceDocumentPriority _ServiceDocumentPriority
_TransactionCurrency _TransactionCurrency
_SrvcDocumentRejectionReason _SrvcDocumentRejectionReason
_SrvcQtanStatus _SrvcQtanStatus
_SrvcQtanFUPSrvcOrdTP _SrvcQtanFUPSrvcOrdTP
_SrvcQtanReferenceObjectTP _SrvcQtanReferenceObjectTP
_SrvcQtanPriceElementTP _SrvcQtanPriceElementTP
_SrvcQtanPartnerTP _SrvcQtanPartnerTP
_SrvcQtanAppointmentTP _SrvcQtanAppointmentTP
_SrvcQtanDurationTP _SrvcQtanDurationTP
_SrvcQtanUserStatusTP _SrvcQtanUserStatusTP
_SrvcQtanLongTextTP _SrvcQtanLongTextTP
@AccessControl: {
  authorizationCheck: #CHECK,
  personalData.blocking: #('TRANSACTIONAL_DATA')
}
@VDM: {
  viewType: #TRANSACTIONAL,
  lifecycle.contract.type: #SAP_INTERNAL_API
}
@Metadata:
{
  ignorePropagatedAnnotations: true
}
@EndUserText.label: 'Service Quotation - TP'
@ObjectModel: {
  sapObjectNodeType:{
  name: 'ServiceQuotation'},
  semanticKey: ['ServiceQuotation'],
  representativeKey: 'ServiceQuotation',
   usageType: {dataClass:      #TRANSACTIONAL,
                serviceQuality: #C,
                sizeCategory:   #L}
}
define root view entity R_ServiceQuotationTP
  as select from I_ServiceDocumentEnhcd
    composition [0..*] of R_ServiceQuotationItemTP     as _ServiceQuotationItemTP
    composition [0..*] of R_SrvcQtanReferenceObjectTP  as _SrvcQtanReferenceObjectTP
    composition [0..*] of R_SrvcQtanPriceElementTP     as _SrvcQtanPriceElementTP
    composition [0..*] of R_SrvcQtanFUPSrvcOrdTP       as _SrvcQtanFUPSrvcOrdTP
    composition [0..*] of R_SrvcQtanPartnerTP          as _SrvcQtanPartnerTP
    composition [0..*] of R_SrvcQtanAppointmentTP      as _SrvcQtanAppointmentTP
    composition [0..*] of R_SrvcQtanDurationTP         as _SrvcQtanDurationTP
    composition [0..*] of R_SrvcQtanUserStatusTP       as _SrvcQtanUserStatusTP
    composition [0..*] of R_SrvcQtanLongTextTP         as _SrvcQtanLongTextTP

    association [0..1] to I_CustMgmtExtRefID         as _CustMgmtExtRef      on  $projection.ServiceQuotation        = _CustMgmtExtRef.CustMgmtDocument
                                                                              and $projection.ServiceObjectType      = _CustMgmtExtRef.CustMgmtObjectType
                                                                              and _CustMgmtExtRef.CustMgmtExtRefIDType = '0009'

    association [0..1] to R_SrvcDocDocumentFlow      as _RefServiceContract  on  $projection.ServiceQuotationUUID               = _RefServiceContract.ServiceDocumentUUID
                                                                            and _RefServiceContract.PrdcssrSuccssrDocObjectType = 'BUS2000112'
                                                                            and _RefServiceContract.ServiceObjectType           = 'BUS2000116'


    association [0..1] to I_RespyMgmtTeamHeaderDetail as _ServiceTeamHeader   on  $projection.RespyMgmtServiceTeam = _ServiceTeamHeader.RespyMgmtTeamID

    association [0..1] to I_StatusObjectUUIDStatus    as _SrvcQtanStatus       on  $projection.ServiceQuotationUUID  = _SrvcQtanStatus.StatusObjectUUID
                                                                            and (
                                                                               _SrvcQtanStatus.StatusCode      = 'I1002'
                                                                               or _SrvcQtanStatus.StatusCode   = 'I1003'
                                                                               or _SrvcQtanStatus.StatusCode   = 'I1004'
                                                                               or _SrvcQtanStatus.StatusCode   = 'I1005'
                                                                             )
                                                                            and _SrvcQtanStatus.StatusIsActive = 'X'

  //! Extensibility support

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

{
      // Administrative fields

      key ServiceDocument                                                     as ServiceQuotation,
      @ObjectModel.foreignKey.association: '_ServiceObjType'
      ServiceObjectType,
      @ObjectModel.foreignKey.association: '_ServiceDocumentType'
      ServiceDocumentType                                                     as ServiceQuotationType,
      ServiceDocumentUUID                                                     as ServiceQuotationUUID,
      ServiceDocumentDescription                                              as ServiceQuotationDescription,
      Language,
      PostingDate,
      ServiceDocCreationDateTime,
      ServiceDocChangedDateTime,
      ServiceDocumentCreatedByUser,
      ServiceDocumentChangedByUser,


      // Partners

      @ObjectModel.foreignKey.association: '_SoldToParty'
      SoldToParty,
      @ObjectModel.foreignKey.association: '_ShipToParty'
      ShipToParty,
//      @ObjectModel.foreignKey.association: '_BillToParty'

//      BillToParty,

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

//      PayerParty,

      @ObjectModel.foreignKey.association: '_ContactPerson'
      ContactPerson                                                        as ContactPersonBusinessPartnerId,
      @ObjectModel.foreignKey.association: '_RespEmployee'
      ResponsibleEmployee                                                   as RespEmployeeBusinessPartnerId,

      // Organizational Data

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


     //CRM Org units

      //these feilds are only ON PREMISE

      @Feature: 'BF:API_FULLSCOPE'
      @ObjectModel.foreignKey.association: '_SalesOrganizationOrgUnit_2'
      SalesOrganizationOrgUnitID,
      @Feature: 'BF:API_FULLSCOPE'
      @ObjectModel.foreignKey.association: '_SalesOfficeOrgUnit_2'
      SalesOfficeOrgUnitID,
      @Feature: 'BF:API_FULLSCOPE'
      @ObjectModel.foreignKey.association: '_SalesGroupOrgUnit_2'
      SalesGroupOrgUnitID,
      @Feature: 'BF:API_FULLSCOPE'
      @ObjectModel.foreignKey.association: '_ServiceOrganizationOrgUnit_2'
      ServiceOrganization,

      //Service team fields

      RespyMgmtServiceTeam,
     // _ServiceTeamHeader.TeamName                                                                  as RespyMgmtServiceTeamName,

      _ServiceTeamHeader.RespyMgmtGlobalTeamID                                      as RespyMgmtGlobalTeamID,


      // Status

      cast( case _SrvcQtanStatus.StatusCode
      when 'I1002' then 'X'
      else ' '
      end       as   xfeld preserving type     )                                    as ServiceQuotationIsNew,
      cast( case _SrvcQtanStatus.StatusCode
      when 'I1003' then 'X'
      else ' '
      end      as   xfeld preserving type     )                                     as ServiceQuotationIsInProcess,
      cast( case _SrvcQtanStatus.StatusCode
      when 'I1004' then 'X'
      else ' '
      end      as   xfeld preserving type     )                                     as ServiceQuotationIsReleased,
      cast( case _SrvcQtanStatus.StatusCode
      when 'I1005' then 'X'
      else ' '
      end     as   xfeld preserving type     )                                      as ServiceQuotationIsCompleted,
      ServiceDocumentStatus                                                         as ServiceQuotationStatus,
//      @Semantics.booleanIndicator

//      case ServiceDocumentStatus

//       when 'C' then case ServiceDocumentIsRejected

//                     when 'X' then ''

//                     else 'X'

//                     end

//       else ''

//       end                                                                          as ServiceQuotationIsAccepted,

      @Semantics.booleanIndicator
      ServiceDocumentHasError                                                       as ServiceQuotationHasError,
      SrvcDocRejectionStatus,

      // Dates and Durations

      RequestedServiceStartDateTime,
      RequestedServiceEndDateTime,
      @Semantics.dateTime: true
      SrvcQtanValidityStartDateTime,
      @Semantics.dateTime: true
      SrvcQtanValidityEndDateTime,

      // Service Specific Fields

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

      // Pricing Fields

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

      // Sales Fields

      @ObjectModel.foreignKey.association: '_SrvcDocumentRejectionReason'
      ServiceDocumentRejectionReason                                                 as SrvcQuotationRejectionReason,

      // Reference Documents

      _CustMgmtExtRef.CustMgmtExtRefID                                               as ServiceQtanExtReference,
      cast( _RefServiceContract.CustMgmtPrdcssrTransactionKey as crmt_object_id_db ) as ReferenceServiceContract,
//      ReferenceInHouseRepair,

//      ReferenceInHouseRepairItem,


      // Associations

      _ServiceQuotationItemTP,
      _ServiceObjType,
      _ServiceDocumentType,
      _SoldToParty,
      _ShipToParty,
    //  _BillToParty,

    //  _PayerParty,

      _ContactPerson,
      _RespEmployee,

      _SalesOrganization,
      _DistributionChannel,
      _Division,
      _SalesOffice,
      _SalesGroup,

      _SalesOrganizationOrgUnit_2,
      _SalesOfficeOrgUnit_2,
      _SalesGroupOrgUnit_2,
      _ServiceOrganizationOrgUnit_2,
      _ServiceTeamHeader,

      _ServiceDocumentPriority,

      _TransactionCurrency,

      _SrvcDocumentRejectionReason,

      _SrvcQtanStatus,

      _SrvcQtanFUPSrvcOrdTP,
      _SrvcQtanReferenceObjectTP,
      _SrvcQtanPriceElementTP,
      _SrvcQtanPartnerTP,
      _SrvcQtanAppointmentTP,
      _SrvcQtanDurationTP,
      _SrvcQtanUserStatusTP,
      _SrvcQtanLongTextTP

}
where
      ServiceObjectType           = 'BUS2000116' // Service Process

  and ServiceDocumentIsQuotation  is not initial
  and ServiceDocumentTemplateType is initial