I_COLLECTIONSMAINCONTACT
Main Contact Person
I_COLLECTIONSMAINCONTACT is a CDS View in S/4HANA. Main Contact Person. 1 CDS views read from this table.
CDS Views using this table (1)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| C_CollectionsMainContact | view_entity | projection | CONSUMPTION | Main Contact |
@AbapCatalog: { sqlViewName: 'ICOLLSMAINCNT',
compiler: { compareFilter: true },
preserveKey: true }
@AccessControl: { authorizationCheck: #CHECK,
personalData: { blocking: #BLOCKED_DATA_EXCLUDED } }
@EndUserText: { label: 'Main Contact Person' }
@VDM: { viewType: #COMPOSITE,
lifecycle: { contract: { type: #PUBLIC_LOCAL_API } } }
@ClientHandling: { algorithm: #SESSION_VARIABLE }
@ObjectModel: { usageType: { serviceQuality: #C,
sizeCategory: #L,
dataClass: #TRANSACTIONAL },
semanticKey: [ 'BusinessPartner' ],
representativeKey: 'BusinessPartner' }
@Consumption: { dbHints: [ 'USE_HEX_PLAN' ] }
/*+[hideWarning] { "IDS" : [ "KEY_CHECK", "CARDINALITY_CHECK" ] } */
define root view I_CollectionsMainContact
as select from I_BPCollectionsSegmentAssgmt
// VDM Associations
// Contacts including Function and Department
association [0..1] to I_BPContactToFuncAndDept as _BPContactToFuncAndDept on $projection.BusinessPartner = _BPContactToFuncAndDept.BusinessPartnerCompany
and $projection.BusinessPartnerPerson = _BPContactToFuncAndDept.BusinessPartnerPerson
and _BPContactToFuncAndDept.ValidityEndDate >= $session.system_date
// Contact Address
association [0..1] to I_BpContactToAddress as _BpContactToAddress on $projection.BusinessPartner = _BpContactToAddress.BusinessPartnerCompany
and $projection.BusinessPartnerPerson = _BpContactToAddress.BusinessPartnerPerson
and _BpContactToAddress.ValidityEndDate >= $session.system_date
// Contact Person
association [0..1] to I_BusinessPartner as _BusinessPartner on $projection.BusinessPartnerPerson = _BusinessPartner.BusinessPartner
// 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.BusinessPartner = _CustomerContact.BusinessPartnerCompany
and $projection.BusinessPartnerPerson = _CustomerContact.BusinessPartnerPerson
{
// VDM Fields
@ObjectModel: { foreignKey: { association: '_CollectionSegment' } }
key cast( CollectionSegment as farp_collection_segment preserving type ) as CollectionSegment,
key BusinessPartner as BusinessPartner,
@ObjectModel: { foreignKey: { association: '_BusinessPartner' } }
CollectionBPMainContactPerson as BusinessPartnerPerson,
@Semantics: { name: { givenName: true } }
_BusinessPartner.FirstName as FirstName,
@Semantics: { name: { familyName: true } }
_BusinessPartner.LastName as LastName,
@Semantics: { name: { fullName: true } }
_BusinessPartner.BusinessPartnerName as BusinessPartnerName,
@Semantics: { telephone: { type: [ #WORK ] } }
_BpContactToAddress._Telephone.PhoneNumber as PhoneNumber,
@Semantics: { telephone: { type: [ #CELL] } }
cast( _BpContactToAddress._MobilePhone.PhoneNumber as contactcardmobilephonenumber preserving type ) as MobileNumber,
@Semantics: { telephone: { type: [ #FAX ] } }
_BPContactToFuncAndDept.FaxNumber as FaxNumber,
_BpContactToAddress.FaxCountry as FaxCountry,
@Semantics: { eMail: { address: true,
type: [ #WORK ] } }
_BPContactToFuncAndDept.EmailAddress as EmailAddress,
@ObjectModel: { text: { element: [ 'ContactPersonDepartmentName' ] } }
_BPContactToFuncAndDept.ContactPersonDepartment as ContactPersonDepartment,
@ObjectModel: { text: { element: [ 'ContactPersonFunctionName' ] } }
_BPContactToFuncAndDept.ContactPersonFunction as ContactPersonFunction,
// Text Elements
@Semantics: { organization: { role: true } }
_BPContactToFuncAndDept._ContactPersonDepartment._Text[1:Language = $session.system_language].ContactPersonDepartmentName,
@Semantics: { organization: { name: true } }
_BPContactToFuncAndDept._ContactPersonFunction._Text[1:Language = $session.system_language].ContactPersonFunctionName,
_CustomerContact.CustomerContact as ContactPerson,
@Semantics: { contact.photo: true }
'sap-icon://business-card' as ContactCardPictureURL,
// Exposed Associations
_BPContactToFuncAndDept,
_BusinessPartner,
_CollectionSegment,
_CustomerContact,
_BPContactToFuncAndDept._CntctPersnDeptValueHelp,
_BPContactToFuncAndDept._CntctPersnFuncValueHelp
}
where
BPCollSgmtAssignmentValidFrom <= $session.system_date
and BPCollSgmtAssignmentValidTo >= $session.system_date
and CollectionBPMainContactPerson is not initial