P_CollectionsContactDraft
P_CollectionsContactDraft is a Transactional CDS View in SAP S/4HANA. It reads from 2 data sources (I_CollectionContact, I_CollectionsContactDraft) and exposes 42 fields with key fields RelationshipNumber, BusinessPartnerCompany, BusinessPartnerPerson, CollectionSegment, DraftUUID. It has 5 associations to related views.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_CollectionContact | I_CollectionContact | from |
| I_CollectionsContactDraft | I_CollectionsContactDraft | union_all |
Associations (5)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_CollectionsContactDraft | _CollectionsContactDraft | $projection.RelationshipNumber = _CollectionsContactDraft.RelationshipNumber and $projection.BusinessPartnerCompany = _CollectionsContactDraft.BusinessPartnerCompany and $projection.BusinessPartnerPerson = _CollectionsContactDraft.BusinessPartnerPerson and $projection.CollectionSegment = _CollectionsContactDraft.CollectionSegment |
| [0..1] | I_ContactPersonFunction | _ContactPersonFunction | $projection.ContactPersonFunction = _ContactPersonFunction.ContactPersonFunction |
| [0..1] | I_ContactPersondepartment | _ContactPersondepartment | $projection.ContactPersonDepartment = _ContactPersondepartment.ContactPersonDepartment |
| [1..1] | I_BusinessPartner | _BusinessPartnerCompany | $projection.BusinessPartnerCompany = _BusinessPartnerCompany.BusinessPartner |
| [1..1] | I_BusinessPartner | _BusinessPartnerPerson | $projection.BusinessPartnerPerson = _BusinessPartnerPerson.BusinessPartner |
Annotations (12)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PCOLLSCONTDR | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view | |
| VDM.viewType | #TRANSACTIONAL | view | |
| VDM.private | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #A | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.representativeKey | BusinessPartnerPerson | view |
Fields (42)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | RelationshipNumber | RelationshipNumber | ||
| KEY | BusinessPartnerCompany | BusinessPartnerCompany | ||
| KEY | BusinessPartnerPerson | BusinessPartnerPerson | ||
| KEY | CollectionSegment | CollectionSegment | ||
| KEY | DraftUUID | _CollectionsContactDraft | DraftUUID | |
| FirstNameendasFirstName | ||||
| LastNameendasLastName | ||||
| PhoneNumberendasPhoneNumber | ||||
| MobileNumberendasMobileNumber | ||||
| FaxNumberendasFaxNumber | ||||
| EmailAddressendasEmailAddress | ||||
| HasActiveEntity | ||||
| _BPContactToFuncAndDept | _BPContactToFuncAndDept | |||
| _BpContactToAddress | _BpContactToAddress | |||
| _BusinessPartnerCompany | _BusinessPartnerCompany | |||
| _BusinessPartnerPerson | _BusinessPartnerPerson | |||
| _CollectionSegment | _CollectionSegment | |||
| _ContactPersonFunction | _ContactPersonFunction | |||
| BusinessPartnerkeyRelationshipNumber | ||||
| KEY | BusinessPartnerCompany | BusinessPartnerCompany | ||
| KEY | BusinessPartnerPerson | BusinessPartnerPerson | ||
| KEY | CollectionSegment | CollectionSegment | ||
| KEY | DraftUUID | DraftUUID | ||
| FirstName | FirstName | |||
| LastName | LastName | |||
| PhoneNumber | PhoneNumber | |||
| MobileNumber | MobileNumber | |||
| FaxNumber | FaxNumber | |||
| EmailAddress | EmailAddress | |||
| ContactPersonFunction | ContactPersonFunction | |||
| ContactPersonDepartment | ContactPersonDepartment | |||
| IsActiveEntity | ||||
| HasActiveEntity | HasActiveEntity | |||
| DraftCreationDateTime | DraftCreationDateTime | |||
| DraftLastChangedDateTime | DraftLastChangedDateTime | |||
| _BPContactToFuncAndDept | _BPContactToFuncAndDept | |||
| _BpContactToAddress | _BpContactToAddress | |||
| _BusinessPartnerCompany | _BusinessPartnerCompany | |||
| _BusinessPartnerPerson | _BusinessPartnerPerson | |||
| _CollectionSegment | _CollectionSegment | |||
| _ContactPersonFunction | _ContactPersonFunction | |||
| _ContactPersondepartment | _ContactPersondepartment |
@AbapCatalog: { sqlViewName: 'PCOLLSCONTDR',
compiler: { compareFilter: true },
preserveKey: true }
@AccessControl: { authorizationCheck: #NOT_REQUIRED,
personalData: { blocking: #BLOCKED_DATA_EXCLUDED } }
@VDM: { viewType: #TRANSACTIONAL,
private: true }
@ClientHandling: { algorithm: #SESSION_VARIABLE }
@ObjectModel: { usageType: { serviceQuality: #A,
sizeCategory: #L,
dataClass: #TRANSACTIONAL },
representativeKey: 'BusinessPartnerPerson' }
define view P_CollectionsContactDraft
as select from I_CollectionContact
// VDM Associations
association [0..1] to I_CollectionsContactDraft as _CollectionsContactDraft on $projection.RelationshipNumber = _CollectionsContactDraft.RelationshipNumber
and $projection.BusinessPartnerCompany = _CollectionsContactDraft.BusinessPartnerCompany
and $projection.BusinessPartnerPerson = _CollectionsContactDraft.BusinessPartnerPerson
and $projection.CollectionSegment = _CollectionsContactDraft.CollectionSegment
// Contact Person Function
association [0..1] to I_ContactPersonFunction as _ContactPersonFunction on $projection.ContactPersonFunction = _ContactPersonFunction.ContactPersonFunction
// Contact Person Department
association [0..1] to I_ContactPersondepartment as _ContactPersondepartment on $projection.ContactPersonDepartment = _ContactPersondepartment.ContactPersonDepartment
// Business Partner Company
association [1..1] to I_BusinessPartner as _BusinessPartnerCompany on $projection.BusinessPartnerCompany = _BusinessPartnerCompany.BusinessPartner
// Business Partneer Person
association [1..1] to I_BusinessPartner as _BusinessPartnerPerson on $projection.BusinessPartnerPerson = _BusinessPartnerPerson.BusinessPartner
{
// VDM Fields
key RelationshipNumber,
key BusinessPartnerCompany,
key BusinessPartnerPerson,
key CollectionSegment,
key _CollectionsContactDraft.DraftUUID as DraftUUID,
case
when _CollectionsContactDraft.DraftUUID is null
then I_CollectionContact.FirstName
else _CollectionsContactDraft.FirstName
end as FirstName,
case
when _CollectionsContactDraft.DraftUUID is null
then I_CollectionContact.LastName
else _CollectionsContactDraft.LastName
end as LastName,
@Semantics: { telephone: { type: [ #PREF ] } }
case
when _CollectionsContactDraft.DraftUUID is null
then I_CollectionContact.PhoneNumber
else _CollectionsContactDraft.PhoneNumber
end as PhoneNumber,
@Semantics: { telephone: { type: [ #CELL] } }
case
when _CollectionsContactDraft.DraftUUID is null
then I_CollectionContact.MobileNumber
else _CollectionsContactDraft.MobileNumber
end as MobileNumber,
@Semantics: { telephone: { type: [ #FAX ] } }
case
when _CollectionsContactDraft.DraftUUID is null
then I_CollectionContact.FaxNumber
else _CollectionsContactDraft.FaxNumber
end as FaxNumber,
@Semantics: { eMail: { address: true } }
case
when _CollectionsContactDraft.DraftUUID is null
then I_CollectionContact.EmailAddress
else _CollectionsContactDraft.EmailAddress
end as EmailAddress,
case
when _CollectionsContactDraft.DraftUUID is null
then I_CollectionContact.ContactPersonFunction
else _CollectionsContactDraft.ContactPersonFunction
end as ContactPersonFunction,
case
when _CollectionsContactDraft.DraftUUID is null
then I_CollectionContact.ContactPersonDepartment
else _CollectionsContactDraft.ContactPersonDepartment
end as ContactPersonDepartment,
cast( case
when _CollectionsContactDraft.DraftUUID is null
then 'X'
else ''
end as boolean ) as IsActiveEntity,
cast( 'X' as boolean ) as HasActiveEntity,
cast( case
when _CollectionsContactDraft.DraftUUID is null
then 0
else _CollectionsContactDraft.DraftCreationDateTime
end as sdraft_created_at ) as DraftCreationDateTime,
cast( case
when _CollectionsContactDraft.DraftUUID is null
then 0
else _CollectionsContactDraft.DraftLastChangedDateTime
end as sdraft_last_changed_at ) as DraftLastChangedDateTime,
// Exposed Associations
_BPContactToFuncAndDept,
_BpContactToAddress,
_BusinessPartnerCompany,
_BusinessPartnerPerson,
_CollectionSegment,
_ContactPersonFunction,
_ContactPersondepartment
}
union all select from I_CollectionsContactDraft
// Business Partner Company
association [1..1] to I_BusinessPartner as _BusinessPartnerCompany on $projection.BusinessPartnerCompany = _BusinessPartnerCompany.BusinessPartner
// Business Partneer Person
association [1..1] to I_BusinessPartner as _BusinessPartnerPerson on $projection.BusinessPartnerPerson = _BusinessPartnerPerson.BusinessPartner
{
// VDM Fields
key RelationshipNumber,
key BusinessPartnerCompany,
key BusinessPartnerPerson,
key CollectionSegment,
key DraftUUID,
FirstName,
LastName,
@Semantics: { telephone: { type: [ #PREF ] } }
PhoneNumber,
@Semantics: { telephone: { type: [ #CELL] } }
MobileNumber,
@Semantics: { telephone: { type: [ #FAX ] } }
FaxNumber,
@Semantics: { eMail: { address: true } }
EmailAddress,
ContactPersonFunction,
ContactPersonDepartment,
cast( '' as boolean ) as IsActiveEntity,
HasActiveEntity,
DraftCreationDateTime,
DraftLastChangedDateTime,
// Exposed Associations
_BPContactToFuncAndDept,
_BpContactToAddress,
_BusinessPartnerCompany,
_BusinessPartnerPerson,
_CollectionSegment,
_ContactPersonFunction,
_ContactPersondepartment
}
where
HasActiveEntity <> 'X'
and _DraftAdministrativeData.DraftIsCreatedByMe = 'X'
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