R_CollectionsCustomerQuickView

DDL: R_COLLECTIONSCUSTOMERQUICKVIEW Type: view COMPOSITE

Customer Quick View

R_CollectionsCustomerQuickView is a Composite CDS View that provides data about "Customer Quick View" in SAP S/4HANA. It reads from 2 data sources (I_BPCollectionsSegmentAssgmt, I_BusinessPartnerCustomer) and exposes 9 fields with key fields Customer, CompanyCode. It has 3 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_BPCollectionsSegmentAssgmt I_BPCollectionsSegmentAssgmt inner
I_BusinessPartnerCustomer I_BusinessPartnerCustomer inner

Associations (3)

CardinalityTargetAliasCondition
[0..1] I_BusinessPartner _BusinessPartner $projection.BusinessPartner = _BusinessPartner.BusinessPartner
[0..1] I_CollectionsMainContact _CollectionsMainContact $projection.BusinessPartner = _CollectionsMainContact.BusinessPartner and $projection.CollectionSegment = _CollectionsMainContact.CollectionSegment
[0..1] I_Customer _Customer $projection.Customer = _Customer.Customer

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName RCOLLSCSTQKVW view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
EndUserText.label Customer Quick View view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.representativeKey Customer view

Fields (9)

KeyFieldSource TableSource FieldDescription
KEY Customer I_CustomerCompany Customer
KEY CompanyCode I_CustomerCompany CompanyCode
BusinessPartner I_BusinessPartnerCustomer BusinessPartner
CollectionSegment I_BPCollectionsSegmentAssgmt CollectionSegment
BusinessPartnerCategory _BusinessPartner BusinessPartnerCategory
BusinessPartnerPerson _CollectionsMainContact BusinessPartnerPerson
_BusinessPartner _BusinessPartner
_Customer _Customer
_CollectionsMainContact _CollectionsMainContact
@AbapCatalog: { sqlViewName: 'RCOLLSCSTQKVW',
                compiler:    { compareFilter: true },
                preserveKey: true }
@AccessControl: { authorizationCheck: #CHECK,
                  personalData: { blocking: #BLOCKED_DATA_EXCLUDED } }
@EndUserText: { label: 'Customer Quick View' }
@VDM: { viewType:  #COMPOSITE,
        lifecycle: { contract: { type: #SAP_INTERNAL_API } } }
@ClientHandling: { algorithm: #SESSION_VARIABLE }
@ObjectModel: { usageType:         { serviceQuality: #X,
                                     sizeCategory:   #L,
                                     dataClass:      #TRANSACTIONAL },
                 representativeKey: 'Customer' }

/*+[hideWarning] { "IDS" : [ "KEY_CHECK", "CARDINALITY_CHECK" ]  } */
define root view R_CollectionsCustomerQuickView
  as select distinct from I_CustomerCompany
    inner join            I_BusinessPartnerCustomer    on I_CustomerCompany.Customer = I_BusinessPartnerCustomer.Customer
    left outer to one join(
                          I_CollsSgmtCompanyCodeAssgmt
        inner join        I_BPCollectionsSegmentAssgmt on  I_CollsSgmtCompanyCodeAssgmt.CollectionSegment             = I_BPCollectionsSegmentAssgmt.CollectionSegment
                                                       and I_BPCollectionsSegmentAssgmt.BPCollSgmtAssignmentValidFrom <= $session.system_date
                                                       and I_BPCollectionsSegmentAssgmt.BPCollSgmtAssignmentValidTo   >= $session.system_date
    )
    on  I_CustomerCompany.CompanyCode             = I_CollsSgmtCompanyCodeAssgmt.CompanyCode
    and I_BusinessPartnerCustomer.BusinessPartner = I_BPCollectionsSegmentAssgmt.BusinessPartner

  // VDM Associations

  // Business Partner

  association [0..1] to I_BusinessPartner        as _BusinessPartner        on  $projection.BusinessPartner = _BusinessPartner.BusinessPartner

  // Collections Contact

  association [0..1] to I_CollectionsMainContact as _CollectionsMainContact on  $projection.BusinessPartner   = _CollectionsMainContact.BusinessPartner
                                                                            and $projection.CollectionSegment = _CollectionsMainContact.CollectionSegment

  // Customer

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

{

  key I_CustomerCompany.Customer                     as Customer,
  key I_CustomerCompany.CompanyCode                  as CompanyCode,
      I_BusinessPartnerCustomer.BusinessPartner      as BusinessPartner,
      I_BPCollectionsSegmentAssgmt.CollectionSegment as CollectionSegment,
      _BusinessPartner.BusinessPartnerCategory       as BusinessPartnerCategory,
      _CollectionsMainContact.BusinessPartnerPerson  as BusinessPartnerPerson,

      // Exposed Associations

      _BusinessPartner,
      _Customer,
      _CollectionsMainContact

}