P_CollsCustomerContactNote

DDL: P_COLLSCUSTOMERCONTACTNOTE Type: view COMPOSITE

P_CollsCustomerContactNote is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_BusinessPartnerCustomer, I_CustomerContactAttribute) and exposes 11 fields with key fields CustomerContactUUID, CollectionSegment. It has 2 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_BusinessPartnerCustomer I_BusinessPartnerCustomer inner
I_CustomerContactAttribute I_CustomerContactAttribute from

Associations (2)

CardinalityTargetAliasCondition
[0..*] Sgbt_Nte_Cds_Cont _NoteContent $projection.CustomerContactUUID = _NoteContent.objectid and _NoteContent.objectnodetype = 'CollectionsCustomerContact' and _NoteContent.notetype = 'COLL_CCT_NOTE'
[0..1] I_Customer _Customer $projection.Customer = _Customer.Customer

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName PCLLSCNTNTE view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
VDM.viewType #COMPOSITE view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.representativeKey CustomerContactUUID view

Fields (11)

KeyFieldSource TableSource FieldDescription
KEY CustomerContactUUID CustomerContactUUID
KEY CollectionSegment CollectionSegment
Customer Customer
NoteDescription
CustomerContactResult CustomerContactResult
CreatedByUser CreatedByUser
CreationDateTime CustomerContactDateTime
_NoteContent _NoteContent
_Customer _Customer
_CollectionSegment _CollectionSegment
_CustomerContactResult _CustomerContactResult
@AbapCatalog: { sqlViewName: 'PCLLSCNTNTE',
                compiler: { compareFilter: true },
                preserveKey: true }
@AccessControl: { authorizationCheck: #NOT_REQUIRED,
                  personalData:       { blocking: #BLOCKED_DATA_EXCLUDED } }
@VDM: { viewType: #COMPOSITE,
        private: true }
@ClientHandling: { algorithm: #SESSION_VARIABLE }
@ObjectModel: { usageType: { serviceQuality: #C,
                             sizeCategory: #L,
                             dataClass: #TRANSACTIONAL },
                representativeKey: 'CustomerContactUUID' }
define view P_CollsCustomerContactNote
  as select from I_CustomerContactAttribute
    inner join   I_BusinessPartnerCustomer on I_CustomerContactAttribute.BusinessPartner = I_BusinessPartnerCustomer.BusinessPartner

  // VDM Association

  // Notes

  association [0..*] to Sgbt_Nte_Cds_Cont as _NoteContent on  $projection.CustomerContactUUID = _NoteContent.objectid
                                                          and _NoteContent.objectnodetype     = 'CollectionsCustomerContact'
                                                          and _NoteContent.notetype           = 'COLL_CCT_NOTE'

  // Customer

  association [0..1] to I_Customer        as _Customer    on  $projection.Customer = _Customer.Customer

{
      //I_BusinessPartnerCustomer

  key CustomerContactUUID,
  key CollectionSegment,
      Customer,

      case
      when CustomerContactType = '001' and CustomerContactDirection = 'O'
          then 'sap-icon://outgoing-call'

      when CustomerContactType = '001' and CustomerContactDirection = 'I'
          then 'sap-icon://incoming-call'

      when CustomerContactType = '002'
          then 'sap-icon://visits'

      when CustomerContactType = '003'
      then 'sap-icon://batch-payments'

      when CustomerContactType = '004' and CustomerContactDirection = 'O'
      then 'sap-icon://email'

      when CustomerContactType = '004' and CustomerContactDirection = 'I'
      then 'sap-icon://email-read'

      when CustomerContactType = '010'
      then 'sap-icon://letter'

      else 'sap-icon://visits'

      end                                                                                           as NoteIconURL,

      _CustomerContactResult._Text[1:Language = $session.system_language].CustomerContactResultText as NoteDescription,

      CustomerContactResult,
      CreatedByUser,
      CustomerContactDateTime                                                                       as CreationDateTime,

      // Exposed Associations

      _NoteContent,
      _Customer,
      _CollectionSegment,
      _CustomerContactResult

}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BUSINESSPARTNERCUSTOMER",
"I_CUSTOMERCONTACTATTRIBUTE",
"I_CUSTOMERCONTACTRESULT",
"I_CUSTOMERCONTACTRESULTTEXT"
],
"ASSOCIATED":
[
"I_COLLECTIONSEGMENT",
"I_CUSTOMER",
"I_CUSTOMERCONTACTRESULT",
"SGBT_NTE_CDS_CONT"
],
"BASE":
[
"I_CUSTOMERCONTACTATTRIBUTE"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/