P_BusinessPartnerContacts
P_BusinessPartnerContacts is a Basic CDS View in SAP S/4HANA. It reads from 1 data source (but050) and exposes 35 fields with key fields RelationshipNumber, BusinessPartner1, BusinessPartner2. It has 3 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| but050 | but050 | from |
Associations (3)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..*] | P_Bpcontacts_Address | _Bpcontacts_Address | $projection.BusinessPartner2 = _Bpcontacts_Address.BusinessPartner and $projection.RelationshipNumber = _Bpcontacts_Address.Relationship |
| [1..*] | P_Bpcontacts_Func_Dept | _Bpcontacts_Func_Dept | $projection.RelationshipNumber = _Bpcontacts_Func_Dept.relnr and $projection.BusinessPartner1 = _Bpcontacts_Func_Dept.BusinessPartner1 and $projection.BusinessPartner2 = _Bpcontacts_Func_Dept.BusinessPartner2 |
| [1..*] | P_Bpcontacts_Data | _Bpcontacts_Data | $projection.BusinessPartner2 = _Bpcontacts_Data.BusinessPartner |
Annotations (3)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PBPCONTACTS | view | |
| VDM.private | true | view | |
| VDM.viewType | #BASIC | view |
Fields (35)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | RelationshipNumber | but050 | relnr | BP Rel. Number |
| KEY | BusinessPartner1 | but050 | partner1 | Busn. Partner |
| KEY | BusinessPartner2 | but050 | partner2 | Busn. Partner |
| ValidityEndDate | but050 | date_to | Validity End Date | |
| ValidityStartDate | but050 | date_from | Validity Start Date | |
| FormOfAddress | _Bpcontacts_Data | FormOfAddress | Title Key | |
| FirstName | _Bpcontacts_Data | FirstName | First Name | |
| LastName | _Bpcontacts_Data | LastName | Last Name | |
| BirthDate | _Bpcontacts_Data | BirthDate | Date of Birth | |
| ContactPersonDepartment | _Bpcontacts_Func_Dept | ContactPersonDepartment | Department | |
| ContactPersonFunction | _Bpcontacts_Func_Dept | ContactPersonFunction | Function | |
| Building | _Bpcontacts_Address | Building | Building code | |
| Floor | _Bpcontacts_Address | Floor | Floor | |
| RoomNumber | _Bpcontacts_Address | RoomNumber | Room Number | |
| InternationalPhoneNumber | _Bpcontacts_Address | InternationalPhoneNumber | Telephone no. | |
| PhoneCountry | _Bpcontacts_Address | PhoneCountry | ||
| InternationalMobilePhoneNumber | _Bpcontacts_Address | InternationalMobilePhoneNumber | ||
| MobilePhoneCountry | _Bpcontacts_Address | MobilePhoneCountry | Country/Region | |
| MobilePhoneNumber | _Bpcontacts_Address | MobilePhoneNumber | Telephone | |
| MobilePhoneExtension | _Bpcontacts_Address | MobilePhoneExtension | ||
| InternationalFaxNumber | _Bpcontacts_Address | InternationalFaxNumber | Fax Number | |
| FaxCountry | _Bpcontacts_Address | FaxCountry | Country/Region | |
| IsDefaultAddress | _Bpcontacts_Address | IsDefaultAddress | ||
| PhoneNumber | _Bpcontacts_Func_Dept | PhoneNumber | Telephone no. | |
| PhoneNumberExtension | _Bpcontacts_Func_Dept | PhoneNumberExtension | Extension | |
| FaxNumber | _Bpcontacts_Func_Dept | FaxNumber | Fax Number | |
| FaxNumberExtension | _Bpcontacts_Func_Dept | FaxNumberExtension | Extension | |
| EmailAddress | _Bpcontacts_Func_Dept | EmailAddress | E-Mail Address | |
| AuthorizationGroup | _Bpcontacts_Data | AuthorizationGroup | AuthorizGroup | |
| IsBusinessPurposeCompleted | _Bpcontacts_Data | IsBusinessPurposeCompleted | Purpose Completed | |
| _Bpcontacts_Address | _Bpcontacts_Address | |||
| _Bpcontacts_Data | _Bpcontacts_Data | |||
| _Bpcontacts_Func_Dept | _Bpcontacts_Func_Dept | |||
| reltyp | but050 | reltyp | Relatshp Cat. | |
| IsStandardRelationship | but050 | xdfrel | Standard Reltnshp |
Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.
-- Derived SQL interpretation of CDS view P_BusinessPartnerContacts.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: PBPCONTACTS
CREATE VIEW P_BusinessPartnerContacts AS
SELECT
but050.relnr AS RelationshipNumber,
but050.partner1 AS BusinessPartner1,
but050.partner2 AS BusinessPartner2,
but050.date_to AS ValidityEndDate,
but050.date_from AS ValidityStartDate,
_Bpcontacts_Data.FormOfAddress AS FormOfAddress,
_Bpcontacts_Data.FirstName AS FirstName,
_Bpcontacts_Data.LastName AS LastName,
_Bpcontacts_Data.BirthDate AS BirthDate,
_Bpcontacts_Func_Dept.ContactPersonDepartment AS ContactPersonDepartment,
_Bpcontacts_Func_Dept.ContactPersonFunction AS ContactPersonFunction,
_Bpcontacts_Address.Building AS Building,
_Bpcontacts_Address.Floor AS Floor,
_Bpcontacts_Address.RoomNumber AS RoomNumber,
_Bpcontacts_Address.InternationalPhoneNumber AS InternationalPhoneNumber,
_Bpcontacts_Address.PhoneCountry AS PhoneCountry,
_Bpcontacts_Address.InternationalMobilePhoneNumber AS InternationalMobilePhoneNumber,
_Bpcontacts_Address.MobilePhoneCountry AS MobilePhoneCountry,
_Bpcontacts_Address.MobilePhoneNumber AS MobilePhoneNumber,
_Bpcontacts_Address.MobilePhoneExtension AS MobilePhoneExtension,
_Bpcontacts_Address.InternationalFaxNumber AS InternationalFaxNumber,
_Bpcontacts_Address.FaxCountry AS FaxCountry,
_Bpcontacts_Address.IsDefaultAddress AS IsDefaultAddress,
_Bpcontacts_Func_Dept.PhoneNumber AS PhoneNumber,
_Bpcontacts_Func_Dept.PhoneNumberExtension AS PhoneNumberExtension,
_Bpcontacts_Func_Dept.FaxNumber AS FaxNumber,
_Bpcontacts_Func_Dept.FaxNumberExtension AS FaxNumberExtension,
_Bpcontacts_Func_Dept.EmailAddress AS EmailAddress,
_Bpcontacts_Data.AuthorizationGroup AS AuthorizationGroup,
_Bpcontacts_Data.IsBusinessPurposeCompleted AS IsBusinessPurposeCompleted,
but050.reltyp AS reltyp,
but050.xdfrel AS IsStandardRelationship
FROM but050
LEFT OUTER JOIN P_Bpcontacts_Address AS _Bpcontacts_Address ON BusinessPartner2 = _Bpcontacts_Address.BusinessPartner AND RelationshipNumber = _Bpcontacts_Address.Relationship -- association [1..*]
LEFT OUTER JOIN P_Bpcontacts_Func_Dept AS _Bpcontacts_Func_Dept ON RelationshipNumber = _Bpcontacts_Func_Dept.relnr AND BusinessPartner1 = _Bpcontacts_Func_Dept.BusinessPartner1 AND BusinessPartner2 = _Bpcontacts_Func_Dept.BusinessPartner2 -- association [1..*]
LEFT OUTER JOIN P_Bpcontacts_Data AS _Bpcontacts_Data ON BusinessPartner2 = _Bpcontacts_Data.BusinessPartner -- association [1..*]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- 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
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA