P_Bpcontacts_Address

DDL: P_BPCONTACTS_ADDRESS SQL: P_MD_BPC_ADR Type: view BASIC

P_Bpcontacts_Address is a Basic CDS View in SAP S/4HANA. It reads from 2 data sources (but000, but052) and exposes 26 fields with key fields Relationship, BusinessPartner, AddressID, Person. It has 5 associations to related views.

Data Sources (2)

SourceAliasJoin Type
but000 but000 inner
but052 but052 from

Associations (5)

CardinalityTargetAliasCondition
[1..1] adcp _AddressDetails $projection.AddressID = _AddressDetails.addrnumber and $projection.Person = _AddressDetails.persnumber
[1..1] P_Bpcontacts_Telephone _Telephone $projection.AddressID = _Telephone.AddressID and $projection.Person = _Telephone.Person
[1..1] P_Bpcontacts_Mobilephone _MobilePhone $projection.AddressID = _MobilePhone.AddressID and $projection.Person = _MobilePhone.Person
[1..1] adr3 _Fax $projection.AddressID = _Fax.addrnumber and $projection.Person = _Fax.persnumber
[1..1] adr6 _Email $projection.AddressID = _Email.addrnumber and $projection.Person = _Email.persnumber

Annotations (3)

NameValueLevelField
AbapCatalog.sqlViewName P_MD_BPC_ADR view
VDM.private true view
VDM.viewType #BASIC view

Fields (26)

KeyFieldSource TableSource FieldDescription
KEY Relationship but052 relnr BP Rel. Number
KEY BusinessPartner but052 partner2 Busn. Partner
KEY AddressID but052 addrnumber Address Number
KEY Person but000 persnumber Person Number
IsDefaultAddress but052 xdfadr Stand. address
Building _AddressDetails building Building code
Floor _AddressDetails floor Floor
RoomNumber _AddressDetails roomnumber Room Number
InternationalPhoneNumber _Telephone InternationalPhoneNumber Telephone no.
PhoneCountry _Telephone PhoneCountry
PhoneNumber _Telephone PhoneNumber Telephone no.
PhoneNumberExtension _Telephone PhoneNumberExtension Extension
InternationalMobilePhoneNumber _MobilePhone InternationalMobilePhoneNumber
MobilePhoneCountry _MobilePhone MobilePhoneCountry Country/Region
MobilePhoneNumber _MobilePhone MobilePhoneNumber Telephone
MobilePhoneExtension _MobilePhone MobilePhoneExtension
InternationalFaxNumber _Fax faxnr_long Fax Number
FaxCountry _Fax country Venue: Ctry/Reg
FaxNumber _Fax fax_number Fax Number
FaxNumberExtension _Fax fax_extens Extension
EmailAddress _Email smtp_addr E-Mail Address
_AddressDetails _AddressDetails
_Telephone _Telephone
_MobilePhone _MobilePhone
_Fax _Fax
_Email _Email

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_Bpcontacts_Address.
-- 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: P_MD_BPC_ADR

CREATE VIEW P_Bpcontacts_Address AS
SELECT
  but052.relnr AS Relationship,
  but052.partner2 AS BusinessPartner,
  but052.addrnumber AS AddressID,
  but000.persnumber AS Person,
  but052.xdfadr AS IsDefaultAddress,
  _AddressDetails.building AS Building,
  _AddressDetails.floor AS Floor,
  _AddressDetails.roomnumber AS RoomNumber,
  _Telephone.InternationalPhoneNumber AS InternationalPhoneNumber,
  _Telephone.PhoneCountry AS PhoneCountry,
  _Telephone.PhoneNumber AS PhoneNumber,
  _Telephone.PhoneNumberExtension AS PhoneNumberExtension,
  _MobilePhone.InternationalMobilePhoneNumber AS InternationalMobilePhoneNumber,
  _MobilePhone.MobilePhoneCountry AS MobilePhoneCountry,
  _MobilePhone.MobilePhoneNumber AS MobilePhoneNumber,
  _MobilePhone.MobilePhoneExtension AS MobilePhoneExtension,
  _Fax.faxnr_long AS InternationalFaxNumber,
  _Fax.country AS FaxCountry,
  _Fax.fax_number AS FaxNumber,
  _Fax.fax_extens AS FaxNumberExtension,
  _Email.smtp_addr AS EmailAddress
FROM but052
INNER JOIN but000 ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN adcp AS _AddressDetails ON AddressID = _AddressDetails.addrnumber AND Person = _AddressDetails.persnumber  -- association [1..1]
LEFT OUTER JOIN P_Bpcontacts_Telephone AS _Telephone ON AddressID = _Telephone.AddressID AND Person = _Telephone.Person  -- association [1..1]
LEFT OUTER JOIN P_Bpcontacts_Mobilephone AS _MobilePhone ON AddressID = _MobilePhone.AddressID AND Person = _MobilePhone.Person  -- association [1..1]
LEFT OUTER JOIN adr3 AS _Fax ON AddressID = _Fax.addrnumber AND Person = _Fax.persnumber  -- association [1..1]
LEFT OUTER JOIN adr6 AS _Email ON AddressID = _Email.addrnumber AND Person = _Email.persnumber  -- association [1..1]
;