C_SrvcQtanEmailDataProvider

DDL: C_SRVCQTANEMAILDATAPROVIDER Type: view_entity CONSUMPTION Package: CRMS4_SERVICE_QUOTATION

Email Data Provider for Service Quotation

C_SrvcQtanEmailDataProvider is a Consumption CDS View that provides data about "Email Data Provider for Service Quotation" in SAP S/4HANA. It reads from 1 data source (I_ServiceDocumentEnhcd) and exposes 24 fields with key field ServiceQuotation. It has 1 association to related views. Part of development package CRMS4_SERVICE_QUOTATION.

Data Sources (1)

SourceAliasJoin Type
I_ServiceDocumentEnhcd I_ServiceDocumentEnhcd from

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_ServiceDocumentRefObject _ServiceDocMainRefObj _ServiceDocMainRefObj.ServiceObjectType = $projection.ServiceObjectType and _ServiceDocMainRefObj.ServiceDocument = $projection.ServiceQuotation and _ServiceDocMainRefObj.ServiceDocumentItem is initial and _ServiceDocMainRefObj.SrvcRefObjIsMainObject is not initial

Annotations (8)

NameValueLevelField
EndUserText.label Email Data Provider for Service Quotation view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #CHECK view
ObjectModel.representativeKey ServiceQuotation view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
Analytics.technicalName CSRVCQTANEMAILDP view

Fields (24)

KeyFieldSource TableSource FieldDescription
KEY ServiceQuotation
ServiceQuotationDescription
SoldToPartyName
ContactPersonName
ShipToPartyName
ResponsibleEmployeeName
RequestedServiceStartDate I_ServiceDocumentEnhcd RequestedServiceStartDate
ServiceDocNetAmount I_ServiceDocumentEnhcd ServiceDocNetAmount
ServiceDocGrossAmount I_ServiceDocumentEnhcd ServiceDocGrossAmount
TransactionCurrency I_ServiceDocumentEnhcd TransactionCurrency
Equipment _ServiceDocMainRefObj Equipment
SerialNumberendasSerialNumber
ServiceObjectType I_ServiceDocumentEnhcd ServiceObjectType
ServiceDocumentType I_ServiceDocumentEnhcd ServiceDocumentType
SalesOrganization I_ServiceDocumentEnhcd SalesOrganization
SalesOffice I_ServiceDocumentEnhcd SalesOffice
SalesGroup I_ServiceDocumentEnhcd SalesGroup
DistributionChannel I_ServiceDocumentEnhcd DistributionChannel
Division I_ServiceDocumentEnhcd Division
ResponsibleEmployee I_ServiceDocumentEnhcd ResponsibleEmployee
SalesOrganizationOrgUnitID I_ServiceDocumentEnhcd SalesOrganizationOrgUnitID
SalesOfficeOrgUnitID I_ServiceDocumentEnhcd SalesOfficeOrgUnitID
SalesGroupOrgUnitID I_ServiceDocumentEnhcd SalesGroupOrgUnitID
ServiceOrganization I_ServiceDocumentEnhcd ServiceOrganization
@EndUserText.label: 'Email Data Provider for Service Quotation'
@VDM: {
  viewType: #CONSUMPTION
}
@AccessControl: {
  authorizationCheck: #CHECK,
  personalData.blocking: #('TRANSACTIONAL_DATA')
}
@ObjectModel: {
  semanticKey: ['ServiceQuotation'],
  representativeKey: 'ServiceQuotation',
  usageType: {serviceQuality: #C, sizeCategory: #XXL, dataClass: #TRANSACTIONAL}
}
@Analytics.technicalName: 'CSRVCQTANEMAILDP'
define root view entity C_SrvcQtanEmailDataProvider
  as select from I_ServiceDocumentEnhcd   

  /*+[hideWarning] { "IDS" : [ "CARDINALITY_CHECK" ] }*/
  association [0..1] to I_ServiceDocumentRefObject as _ServiceDocMainRefObj on  _ServiceDocMainRefObj.ServiceObjectType      = $projection.ServiceObjectType
                                                                            and _ServiceDocMainRefObj.ServiceDocument        = $projection.ServiceQuotation
                                                                            and _ServiceDocMainRefObj.ServiceDocumentItem    is initial
                                                                            and _ServiceDocMainRefObj.SrvcRefObjIsMainObject is not initial

{
  key cast(I_ServiceDocumentEnhcd.ServiceDocument as crms4_qtan_id preserving type)                     as ServiceQuotation,
      cast(I_ServiceDocumentEnhcd.ServiceDocumentDescription as crms4_qtan_description preserving type) as ServiceQuotationDescription,
      cast(I_ServiceDocumentEnhcd._SoldToParty.BusinessPartnerName as vdm_sold_to_name)                 as SoldToPartyName,
      cast(I_ServiceDocumentEnhcd._ContactPerson.BusinessPartnerName as crms4_contact_person_name)      as ContactPersonName,
      cast(I_ServiceDocumentEnhcd._ShipToParty.BusinessPartnerName as ship_to_name)                     as ShipToPartyName,
      cast(I_ServiceDocumentEnhcd._RespEmployee.BusinessPartnerName as resp_empl_name)                  as ResponsibleEmployeeName,
     
      cast(tstmp_to_dats( I_ServiceDocumentEnhcd.SrvcQtanValidityStartDateTime,
                          abap_system_timezone( $session.client,'NULL' ),
                          $session.client,
                          'NULL' ) as crms4_qtan_val_start_date preserving type )                         as SrvcQuotationValidityStartDate,
                          
      cast(tstmp_to_dats( I_ServiceDocumentEnhcd.SrvcQtanValidityEndDateTime,
                          abap_system_timezone( $session.client,'NULL' ),
                          $session.client,
                          'NULL' ) as crms4_qtan_val_end_date preserving type )                         as SrvcQuotationValidityEndDate,
      I_ServiceDocumentEnhcd.RequestedServiceStartDate,
      @Semantics.amount.currencyCode: 'TRANSACTIONCURRENCY' 
I_ServiceDocumentEnhcd.ServiceDocNetAmount,
      @Semantics.amount.currencyCode: 'TRANSACTIONCURRENCY' 
I_ServiceDocumentEnhcd.ServiceDocGrossAmount,
      I_ServiceDocumentEnhcd.TransactionCurrency,
      _ServiceDocMainRefObj.Equipment,
      cast( case  when _ServiceDocMainRefObj.ProductID is not initial
                    then _ServiceDocMainRefObj.ProductID
                    else _ServiceDocMainRefObj._Equipment.Material
            end as productnumber preserving type )                                                      as ProductID,

      case when _ServiceDocMainRefObj.SerialNumber is not initial
             then _ServiceDocMainRefObj.SerialNumber
             else _ServiceDocMainRefObj._Equipment.SerialNumber
      end                                                                                               as SerialNumber,

      // The following fields are required for authorization checks

      @Consumption.hidden: true
      I_ServiceDocumentEnhcd.ServiceObjectType,
      @Consumption.hidden: true
      I_ServiceDocumentEnhcd.ServiceDocumentType,
      @Consumption.hidden: true
      I_ServiceDocumentEnhcd.SalesOrganization,
      @Consumption.hidden: true
      I_ServiceDocumentEnhcd.SalesOffice,
      @Consumption.hidden: true
      I_ServiceDocumentEnhcd.SalesGroup,
      @Consumption.hidden: true
      I_ServiceDocumentEnhcd.DistributionChannel,
      @Consumption.hidden: true
      I_ServiceDocumentEnhcd.Division,
      @Consumption.hidden: true
      I_ServiceDocumentEnhcd.ResponsibleEmployee,
      @Consumption.hidden: true
      I_ServiceDocumentEnhcd.SalesOrganizationOrgUnitID,
      @Consumption.hidden: true
      I_ServiceDocumentEnhcd.SalesOfficeOrgUnitID,
      @Consumption.hidden: true
      I_ServiceDocumentEnhcd.SalesGroupOrgUnitID,
      @Consumption.hidden: true
      I_ServiceDocumentEnhcd.ServiceOrganization
}

where
      I_ServiceDocumentEnhcd.ServiceObjectType          = 'BUS2000116'
  and I_ServiceDocumentEnhcd.ServiceDocumentIsQuotation = 'X'