P_CPBUPAEMAILALL
Business Partner Emails from all sources
P_CPBUPAEMAILALL is a Consumption CDS View that provides data about "Business Partner Emails from all sources" in SAP S/4HANA. It reads from 5 data sources (I_BPContactToFuncAndDept, I_BusinessPartner, I_BusinessPartnerAddress, I_CustomerCompany, I_SupplierCompany) and exposes 79 fields with key fields EmailAddress, BusinessPartner, EmailSourceType, BusinessPartner, EmailSourceType. It has 2 associations to related views.
Data Sources (5)
| Source | Alias | Join Type |
|---|---|---|
| I_BPContactToFuncAndDept | _BPRelationship | union |
| I_BusinessPartner | _BusinessPartner | union |
| I_BusinessPartnerAddress | _BusinessPartnerAddress | union |
| I_CustomerCompany | _CustomerCompany | from |
| I_SupplierCompany | _SupplierCompany | union |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | I_AddressEmailAddress | _AddressEmailAddress | _AddressEmailAddress.AddressID = _BusinessPartner.IndependentAddressID and _AddressEmailAddress.CommNumberIsNotUsed = '' |
| [1] | I_BusinessPartner | _BusinessPartner | _BusinessPartner.BusinessPartner = $projection.BusinessPartner |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PCPBUPAEMAILA | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ObjectModel.usageType.dataClass | #MASTER | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | Business Partner Emails from all sources | view |
Fields (79)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | EmailAddress | |||
| KEY | BusinessPartner | Busn. Partner | ||
| KEY | EmailSourceType | |||
| AddressID | Src Address No | |||
| CompanyCode | I_CustomerCompany | CompanyCode | Receiver Company Code | |
| ContactPerson | I_CustomerCompany | Customer | Busn. Partner | |
| AuthorizationGroup | AuthorizGroup | |||
| RelationshipCategory | Relationsh.Cat. | |||
| BusinessPartnerCategory | Partner Cat. | |||
| UxFcFirstName | First Name | |||
| UxFcLastName | Last Name | |||
| UxFcGroupBusinessPartnerName1 | Name 1 | |||
| UxFcGroupBusinessPartnerName2 | Name 2 | |||
| UxFcOrganizationBPName1 | Name 1 | |||
| UxFcOrganizationBPName2 | Name 2 | |||
| AuxValidityStartDate | ||||
| KEY | BusinessPartner | Busn. Partner | ||
| KEY | EmailSourceType | |||
| AddressID | Src Address No | |||
| CompanyCode | I_SupplierCompany | CompanyCode | Receiver Company Code | |
| ContactPerson | I_SupplierCompany | Supplier | Busn. Partner | |
| AuthorizationGroup | AuthorizGroup | |||
| RelationshipCategory | Relationsh.Cat. | |||
| BusinessPartnerCategory | Partner Cat. | |||
| UxFcFirstName | First Name | |||
| UxFcLastName | Last Name | |||
| UxFcGroupBusinessPartnerName1 | Name 1 | |||
| UxFcGroupBusinessPartnerName2 | Name 2 | |||
| UxFcOrganizationBPName1 | Name 1 | |||
| UxFcOrganizationBPName2 | Name 2 | |||
| AuxValidityStartDate | ||||
| EmailAddress | ||||
| KEY | BusinessPartner | I_BusinessPartner | BusinessPartner | Busn. Partner |
| KEY | EmailSourceType | |||
| AddressID | IndependentAddressID | Src Address No | ||
| CompanyCode | Receiver Company Code | |||
| ContactPerson | I_BusinessPartner | BusinessPartner | Busn. Partner | |
| AuthorizationGroup | I_BusinessPartner | AuthorizationGroup | AuthorizGroup | |
| RelationshipCategory | Relationsh.Cat. | |||
| BusinessPartnerCategory | I_BusinessPartner | BusinessPartnerCategory | Partner Cat. | |
| UxFcFirstName | I_BusinessPartner | FirstName | First Name | |
| UxFcLastName | I_BusinessPartner | LastName | Last Name | |
| UxFcGroupBusinessPartnerName1 | I_BusinessPartner | GroupBusinessPartnerName1 | Name 1 | |
| UxFcGroupBusinessPartnerName2 | I_BusinessPartner | GroupBusinessPartnerName2 | Name 2 | |
| UxFcOrganizationBPName1 | I_BusinessPartner | OrganizationBPName1 | Name 1 | |
| UxFcOrganizationBPName2 | I_BusinessPartner | OrganizationBPName2 | Name 2 | |
| AuxValidityStartDate | ||||
| EmailAddress | ||||
| KEY | BusinessPartner | I_BusinessPartnerAddress | BusinessPartner | Busn. Partner |
| AddressID | I_BusinessPartnerAddress | AddressNumber | Src Address No | |
| CompanyCode | Receiver Company Code | |||
| ContactPerson | I_BusinessPartnerAddress | BusinessPartner | Busn. Partner | |
| AuthorizationGroup | I_BusinessPartner | AuthorizationGroup | AuthorizGroup | |
| RelationshipCategory | Relationsh.Cat. | |||
| BusinessPartnerCategory | I_BusinessPartner | BusinessPartnerCategory | Partner Cat. | |
| UxFcFirstName | I_BusinessPartner | FirstName | First Name | |
| UxFcLastName | I_BusinessPartner | LastName | Last Name | |
| UxFcGroupBusinessPartnerName1 | I_BusinessPartner | GroupBusinessPartnerName1 | Name 1 | |
| UxFcGroupBusinessPartnerName2 | I_BusinessPartner | GroupBusinessPartnerName2 | Name 2 | |
| UxFcOrganizationBPName1 | I_BusinessPartner | OrganizationBPName1 | Name 1 | |
| UxFcOrganizationBPName2 | I_BusinessPartner | OrganizationBPName2 | Name 2 | |
| AuxValidityStartDate | ||||
| EmailAddress | ||||
| KEY | BusinessPartner | I_BPContactToFuncAndDept | BusinessPartnerCompany | Busn. Partner |
| KEY | EmailSourceType | |||
| AddressID | Src Address No | |||
| CompanyCode | Receiver Company Code | |||
| ContactPerson | I_BPContactToFuncAndDept | BusinessPartnerPerson | Busn. Partner | |
| AuthorizationGroup | I_BusinessPartner | AuthorizationGroup | AuthorizGroup | |
| RelationshipCategory | I_BPContactToFuncAndDept | RelationshipCategory | Relationsh.Cat. | |
| BusinessPartnerCategory | I_BusinessPartner | BusinessPartnerCategory | Partner Cat. | |
| UxFcFirstName | I_BusinessPartner | FirstName | First Name | |
| UxFcLastName | I_BusinessPartner | LastName | Last Name | |
| UxFcGroupBusinessPartnerName1 | I_BusinessPartner | GroupBusinessPartnerName1 | Name 1 | |
| UxFcGroupBusinessPartnerName2 | I_BusinessPartner | GroupBusinessPartnerName2 | Name 2 | |
| UxFcOrganizationBPName1 | I_BusinessPartner | OrganizationBPName1 | Name 1 | |
| UxFcOrganizationBPName2 | I_BusinessPartner | OrganizationBPName2 | Name 2 | |
| AuxValidityStartDate | ||||
| AuxValidityEndDate |
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_CPBUPAEMAILALL.
-- 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: PCPBUPAEMAILA
CREATE VIEW P_CPBUPAEMAILALL AS
SELECT
cast( _CustomerCompany.AccountingClerkInternetAddress as ad_smtpadr ) AS EmailAddress,
_CustomerCompany._Customer._CustomerToBusinessPartner._BusinessPartner.BusinessPartner AS BusinessPartner,
cast ( '1' as fin_corr_email_source_type ) AS EmailSourceType,
cast( '' as ad_addrnum ) AS AddressID,
_CustomerCompany.CompanyCode AS CompanyCode,
_CustomerCompany.Customer AS ContactPerson,
_CustomerCompany._Customer._CustomerToBusinessPartner._BusinessPartner.AuthorizationGroup AS AuthorizationGroup,
cast( '' as bu_reltyp ) AS RelationshipCategory,
_CustomerCompany._Customer._CustomerToBusinessPartner._BusinessPartner.BusinessPartnerCategory AS BusinessPartnerCategory,
_CustomerCompany._Customer._CustomerToBusinessPartner._BusinessPartner.FirstName AS UxFcFirstName,
_CustomerCompany._Customer._CustomerToBusinessPartner._BusinessPartner.LastName AS UxFcLastName,
_CustomerCompany._Customer._CustomerToBusinessPartner._BusinessPartner.GroupBusinessPartnerName1 AS UxFcGroupBusinessPartnerName1,
_CustomerCompany._Customer._CustomerToBusinessPartner._BusinessPartner.GroupBusinessPartnerName2 AS UxFcGroupBusinessPartnerName2,
_CustomerCompany._Customer._CustomerToBusinessPartner._BusinessPartner.OrganizationBPName1 AS UxFcOrganizationBPName1,
_CustomerCompany._Customer._CustomerToBusinessPartner._BusinessPartner.OrganizationBPName2 AS UxFcOrganizationBPName2,
cast( $session.system_date as abap.dats ) AS AuxValidityStartDate,
cast( $session.system_date as abap.dats ) AS AuxValidityEndDate
FROM I_CustomerCompany AS _CustomerCompany
LEFT OUTER JOIN I_AddressEmailAddress AS _AddressEmailAddress ON _AddressEmailAddress.AddressID = _BusinessPartner.IndependentAddressID AND _AddressEmailAddress.CommNumberIsNotUsed = '' -- association [0..*]
LEFT OUTER JOIN I_BusinessPartner AS _BusinessPartner ON _BusinessPartner.BusinessPartner = BusinessPartner -- association [1]
-- UNION with additional select branch(es): I_SupplierCompany, I_BusinessPartner, I_BusinessPartnerAddress, I_BPContactToFuncAndDept
;
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