I_CollectionsMainContact
Main Contact Person
I_CollectionsMainContact is a Composite CDS View that provides data about "Main Contact Person" in SAP S/4HANA. It reads from 1 data source (I_BPCollectionsSegmentAssgmt) and exposes 17 fields with key fields CollectionSegment, BusinessPartner. It has 5 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_BPCollectionsSegmentAssgmt | I_BPCollectionsSegmentAssgmt | from |
Associations (5)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_BPContactToFuncAndDept | _BPContactToFuncAndDept | $projection.BusinessPartner = _BPContactToFuncAndDept.BusinessPartnerCompany and $projection.BusinessPartnerPerson = _BPContactToFuncAndDept.BusinessPartnerPerson and _BPContactToFuncAndDept.ValidityEndDate >= $session.system_date |
| [0..1] | I_BpContactToAddress | _BpContactToAddress | $projection.BusinessPartner = _BpContactToAddress.BusinessPartnerCompany and $projection.BusinessPartnerPerson = _BpContactToAddress.BusinessPartnerPerson and _BpContactToAddress.ValidityEndDate >= $session.system_date |
| [0..1] | I_BusinessPartner | _BusinessPartner | $projection.BusinessPartnerPerson = _BusinessPartner.BusinessPartner |
| [0..1] | I_CollectionSegment | _CollectionSegment | $projection.CollectionSegment = _CollectionSegment.CollectionSegment |
| [0..1] | I_CustomerContact | _CustomerContact | $projection.BusinessPartner = _CustomerContact.BusinessPartnerCompany and $projection.BusinessPartnerPerson = _CustomerContact.BusinessPartnerPerson |
Annotations (13)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | ICOLLSMAINCNT | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view | |
| EndUserText.label | Main Contact Person | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.lifecycle.contract.type | #PUBLIC_LOCAL_API | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.representativeKey | BusinessPartner | view |
Fields (17)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CollectionSegment | |||
| KEY | BusinessPartner | BusinessPartner | ||
| BusinessPartnerPerson | CollectionBPMainContactPerson | |||
| FirstName | _BusinessPartner | FirstName | ||
| LastName | _BusinessPartner | LastName | ||
| BusinessPartnerName | _BusinessPartner | BusinessPartnerName | ||
| PhoneNumber | ||||
| MobileNumber | ||||
| FaxNumber | _BPContactToFuncAndDept | FaxNumber | ||
| FaxCountry | _BpContactToAddress | FaxCountry | ||
| EmailAddress | _BPContactToFuncAndDept | EmailAddress | ||
| ContactPersonDepartment | _BPContactToFuncAndDept | ContactPersonDepartment | ||
| ContactPersonFunction | _BPContactToFuncAndDept | ContactPersonFunction | ||
| ContactPersonDepartmentName | ||||
| ContactPersonFunctionName | ||||
| ContactPerson | _CustomerContact | CustomerContact | ||
| _CntctPersnFuncValueHelp |
@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' }
/*+[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
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ADDRESSPHONENUMBER",
"I_BPCOLLECTIONSSEGMENTASSGMT",
"I_BPCONTACTTOADDRESS",
"I_BPCONTACTTOFUNCANDDEPT",
"I_BUSINESSPARTNER",
"I_CONTACTPERSONDEPARTMENT",
"I_CONTACTPERSONDEPARTMENTT",
"I_CONTACTPERSONFUNCTION",
"I_CONTACTPERSONFUNCTIONT",
"I_CUSTOMERCONTACT"
],
"ASSOCIATED":
[
"I_BPCONTACTTOADDRESS",
"I_BPCONTACTTOFUNCANDDEPT",
"I_BUSINESSPARTNER",
"I_COLLECTIONSEGMENT",
"I_CONTACTPERSONDEPARTMENT",
"I_CONTACTPERSONFUNCTION",
"I_CUSTOMERCONTACT"
],
"BASE":
[
"I_BPCONTACTTOFUNCANDDEPT"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA