P_CollectionsAccount
Collections Account
P_CollectionsAccount is a Composite CDS View that provides data about "Collections Account" in SAP S/4HANA. It reads from 3 data sources (I_BPCollectionsSegmentAssgmt, I_BusinessPartnerCustomer, I_CustomerCompany) and exposes 12 fields with key fields Customer, CollectionSegment, CompanyCode, BusinessPartner. It has 4 associations to related views. Part of development package ODATA_PROCESS_RECEIVABLES.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_BPCollectionsSegmentAssgmt | I_BPCollectionsSegmentAssgmt | inner |
| I_BusinessPartnerCustomer | I_BusinessPartnerCustomer | inner |
| I_CustomerCompany | I_CustomerCompany | inner |
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_Customer | _Customer | $projection.Customer = _Customer.Customer |
| [0..1] | I_BusinessPartner | _BusinessPartner | $projection.BusinessPartner = _BusinessPartner.BusinessPartner |
| [0..1] | I_CompanyCode | _CompanyCode | $projection.CompanyCode = _CompanyCode.CompanyCode |
| [0..1] | I_CollectionSegment | _CollectionSegment | $projection.CollectionSegment = _CollectionSegment.CollectionSegment |
Annotations (12)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PCOLLSACCT | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.representativeKey | Customer | view |
Fields (12)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Customer | I_BusinessPartnerCustomer | Customer | |
| KEY | CollectionSegment | |||
| KEY | CompanyCode | I_CustomerCompany | CompanyCode | |
| KEY | BusinessPartner | I_BusinessPartnerCustomer | BusinessPartner | |
| CustomerName | _Customer | CustomerName | ||
| CollectionSegmentName | ||||
| CompanyCodeName | _CompanyCode | CompanyCodeName | ||
| BusinessPartnerName | _BusinessPartner | BusinessPartnerName | ||
| _Customer | _Customer | |||
| _BusinessPartner | _BusinessPartner | |||
| _CompanyCode | _CompanyCode | |||
| _CollectionSegment | _CollectionSegment |
@AbapCatalog: { sqlViewName: 'PCOLLSACCT',
compiler: { compareFilter: true },
preserveKey: true }
@AccessControl: { authorizationCheck: #CHECK,
personalData: { blocking: #BLOCKED_DATA_EXCLUDED } }
@VDM: { viewType: #COMPOSITE,
private: true }
@ClientHandling: { algorithm: #SESSION_VARIABLE }
@ObjectModel: { usageType: { serviceQuality: #C,
sizeCategory: #L,
dataClass: #TRANSACTIONAL },
representativeKey: 'Customer' }
@Consumption: { dbHints: [ 'USE_HEX_PLAN' ] }
define view P_CollectionsAccount
as select distinct from I_Customer
inner join I_CustomerCompany on I_Customer.Customer = I_CustomerCompany.Customer
inner join I_BusinessPartnerCustomer on I_Customer.Customer = I_BusinessPartnerCustomer.Customer
left outer to many join(
I_CollsSgmtCompanyCodeAssgmt
inner join I_BPCollectionsSegmentAssgmt on I_CollsSgmtCompanyCodeAssgmt.CollectionSegment = I_BPCollectionsSegmentAssgmt.CollectionSegment
and I_BPCollectionsSegmentAssgmt.BPCollSgmtAssignmentValidTo = '99991231'
)
on I_CustomerCompany.CompanyCode = I_CollsSgmtCompanyCodeAssgmt.CompanyCode
and I_BusinessPartnerCustomer.BusinessPartner = I_BPCollectionsSegmentAssgmt.BusinessPartner
// VDM Associations
// Customer
association [0..1] to I_Customer as _Customer on $projection.Customer = _Customer.Customer
// Business Partner
association [0..1] to I_BusinessPartner as _BusinessPartner on $projection.BusinessPartner = _BusinessPartner.BusinessPartner
// Company Code
association [0..1] to I_CompanyCode as _CompanyCode on $projection.CompanyCode = _CompanyCode.CompanyCode
// Collection Segment
association [0..1] to I_CollectionSegment as _CollectionSegment on $projection.CollectionSegment = _CollectionSegment.CollectionSegment
{
// VDM Fields
@ObjectModel: { foreignKey: { association: '_Customer' } }
key I_BusinessPartnerCustomer.Customer as Customer,
@ObjectModel: { foreignKey: { association: '_CollectionSegment' } }
key cast( I_BPCollectionsSegmentAssgmt.CollectionSegment as farp_collection_segment preserving type ) as CollectionSegment,
@ObjectModel: { foreignKey: { association: '_CompanyCode' } }
key I_CustomerCompany.CompanyCode as CompanyCode,
@ObjectModel: { foreignKey: { association: '_BusinessPartner' } }
key I_BusinessPartnerCustomer.BusinessPartner as BusinessPartner,
// Text Elements
_Customer.CustomerName as CustomerName,
_CollectionSegment._Text[1:Language = $session.system_language].CollectionSegmentName as CollectionSegmentName,
_CompanyCode.CompanyCodeName as CompanyCodeName,
_BusinessPartner.BusinessPartnerName as BusinessPartnerName,
// Exposed Associations
_Customer,
_BusinessPartner,
_CompanyCode,
_CollectionSegment
}
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