I_COLLECTIONCONTACT

CDS View

Collection Contact

I_COLLECTIONCONTACT is a CDS View in S/4HANA. Collection Contact. It contains 1 fields. 4 CDS views read from this table.

CDS Views using this table (4)

ViewTypeJoinVDMDescription
I_CollectionsContactVH view from COMPOSITE Collections Contact Value Help
I_CollsPromiseToPayContactVH view inner COMPOSITE Promise To Pay Contact Value Help
P_CollectionsContactDraft view from TRANSACTIONAL
R_CollectionContactTP view_entity from TRANSACTIONAL Collection Contact - TP

Fields (1)

KeyField CDS FieldsUsed in Views
KEY CollectionSegment CollectionSegment 1
@AbapCatalog: { sqlViewName: 'ICOLLCONT',
                compiler: { compareFilter: true },
                preserveKey: true }
@AccessControl: { authorizationCheck: #CHECK,
                  personalData: { blocking: #BLOCKED_DATA_EXCLUDED } }
@EndUserText: { label: 'Collection Contact' }
@VDM: { viewType: #COMPOSITE,
        lifecycle: { contract: { type: #PUBLIC_LOCAL_API } } }
@ClientHandling: { algorithm: #SESSION_VARIABLE }
@ObjectModel: { usageType: { serviceQuality: #C,
                             sizeCategory: #L,
                             dataClass: #TRANSACTIONAL },
                semanticKey: ['RelationshipNumber', 'BusinessPartnerCompany', 'BusinessPartnerPerson', 'CollectionSegment' ],
                representativeKey: 'BusinessPartnerPerson' }
define view I_CollectionContact
  as select from I_BPCollectionsSegmentAssgmt
    inner join   I_BPRelationship on I_BPCollectionsSegmentAssgmt.BusinessPartner = I_BPRelationship.BusinessPartnerCompany

  // VDM Associations

  // Contacts including Function and Department

  association [0..1] to I_BPContactToFuncAndDept as _BPContactToFuncAndDept on  I_BPRelationship.BusinessPartnerCompany = _BPContactToFuncAndDept.BusinessPartnerCompany
                                                                            and I_BPRelationship.BusinessPartnerPerson  = _BPContactToFuncAndDept.BusinessPartnerPerson
                                                                            and _BPContactToFuncAndDept.ValidityEndDate >= $session.system_date

  // Contact Address

  association [0..1] to I_BpContactToAddress     as _BpContactToAddress     on  I_BPRelationship.BusinessPartnerCompany = _BpContactToAddress.BusinessPartnerCompany
                                                                            and I_BPRelationship.BusinessPartnerPerson  = _BpContactToAddress.BusinessPartnerPerson
                                                                            and _BpContactToAddress.ValidityEndDate     >= $session.system_date
                                                                            and _BpContactToAddress.IsDefaultAddress = 'X'

  // Collection Segment

  association [0..1] to I_CollectionSegment      as _CollectionSegment      on  $projection.CollectionSegment = _CollectionSegment.CollectionSegment

  // Contact Person Key

  association [0..1] to I_CustomerContact        as _CustomerContact        on  $projection.BusinessPartnerCompany = _CustomerContact.BusinessPartnerCompany
                                                                            and $projection.BusinessPartnerPerson  = _CustomerContact.BusinessPartnerPerson

{

       // VDM Fields

  key  I_BPRelationship.RelationshipNumber                                                  as RelationshipNumber,

       @ObjectModel: { foreignKey: { association: '_BusinessPartnerCompany' } }
  key  BusinessPartnerCompany,

       @ObjectModel: { foreignKey: { association: '_BusinessPartnerPerson' } }
  key  BusinessPartnerPerson,

       @ObjectModel: { foreignKey: { association: '_CollectionSegment' } }
  key  cast( CollectionSegment as farp_collection_segment preserving type )                 as CollectionSegment,

       _BusinessPartnerPerson.FirstName                                                     as FirstName,
       _BusinessPartnerPerson.LastName                                                      as LastName,

       @Semantics: { telephone: { type: [ #PREF ] } }
       _BpContactToAddress._Telephone.PhoneNumber                                           as PhoneNumber,

       @Semantics: { telephone: { type: [ #CELL] } }
       cast( _BpContactToAddress._MobilePhone.PhoneNumber as contactcardmobilephonenumber ) as MobileNumber,

       @Semantics: { telephone: { type: [ #FAX ] } }
       _BPContactToFuncAndDept.FaxNumber                                                    as FaxNumber,

       @Semantics: { eMail: { address: true } }
       _BPContactToFuncAndDept.EmailAddress                                                 as EmailAddress,

       _BPContactToFuncAndDept.ContactPersonFunction                                        as ContactPersonFunction,
       _BPContactToFuncAndDept.ContactPersonDepartment                                      as ContactPersonDepartment,
       _CustomerContact.CustomerContact                                                     as ContactPerson,

       // Exposed Associations

       _BPContactToFuncAndDept,
       _BpContactToAddress,
       _BusinessPartnerCompany,
       _BusinessPartnerPerson,
       _CollectionSegment,
       _BPContactToFuncAndDept._ContactPersonFunction                                       as _ContactPersonFunction,
       _BPContactToFuncAndDept._ContactPersonDepartment                                     as _ContactPersonDepartment,
       _CustomerContact

}

where
      RelationshipCategory                                       = 'UDM001' // Has Collections Contact

  and I_BPRelationship.ValidityStartDate                         <= $session.system_date
  and I_BPRelationship.ValidityEndDate                           >= $session.system_date
  and I_BPCollectionsSegmentAssgmt.BPCollSgmtAssignmentValidFrom <= $session.system_date
  and I_BPCollectionsSegmentAssgmt.BPCollSgmtAssignmentValidTo   >= $session.system_date