I_BpContactToAddress

DDL: I_BPCONTACTTOADDRESS SQL: IBPCNTCTADDRESS Type: view BASIC

Business Partner Contact To Address

I_BpContactToAddress (Basic)

Package: Explore, extend and adapt the SAP S/4HANA Cloud Private Edition with built-in and side-by-side extension capabilities.

Database & Data Management

I_BpContactToAddress is a Basic CDS View that provides data about "Business Partner Contact To Address" in SAP S/4HANA. It reads from 2 data sources (but000, but052) and exposes 41 fields with key fields RelationshipNumber, BusinessPartnerCompany, BusinessPartnerPerson, ValidityEndDate, AddressID. It has 14 associations to related views.

SAP Help Documentation

CategoryCDS Views for Business Partner
StatusReleased
Purpose
This CDS view returns the address assigned to contact for a business partner To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views .

Prerequisites
Authorizations Users who want to use this CDS view must have the following authorization objects assigned: B_BUPA_GRP : Business Partner: Authorization Groups B_BUP_DCPD : Business Partner Processing Configuration

Deprecated Associations
These are the deprecated or decommissioned associations: Association Name Successor _MobilePhone _MobilePhone_2 _Telephone _Telephone_2 _FaxNumber _FaxNumber_2 _BPCompanyPostalAddress _BPCompanyPostalAddress_2

View on SAP Help Portal →

SAP API Hub

StateC1
Line of BusinessDatabase & Data Management
Application ComponentAP-MD-BP
PackageDatabase & Data Management for SAP S/4HANA Cloud Private Edition
Description <p>This CDS view returns the address assigned to contact for a business partner </p> <p>To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views.</p>

Documentation

Data Sources (2)

SourceAliasJoin Type
but000 but000 inner
but052 but052 from

Associations (14)

CardinalityTargetAliasCondition
[1..1] I_BusinessPartner _BusinessPartnerCompany $projection.BusinessPartnerCompany = _BusinessPartnerCompany.BusinessPartner
[1..1] I_BusinessPartner _BusinessPartnerPerson $projection.BusinessPartnerPerson = _BusinessPartnerPerson.BusinessPartner
[1..*] adcp _AddressDetails $projection.AddressID = _AddressDetails.addrnumber and $projection.PersonNumber = _AddressDetails.persnumber
[1..*] adrp _PersonDetails $projection.PersonNumber = _PersonDetails.persnumber
[1] I_BusinessPartnerAddress _BPCompanyPostalAddress $projection.AddressID = _BPCompanyPostalAddress.AddressNumber and $projection.BusinessPartnerCompany = _BPCompanyPostalAddress.BusinessPartner
[1] I_BusinessPartAddress_2 _BPCompanyPostalAddress_2 $projection.AddressID = _BPCompanyPostalAddress_2.AddressNumber and $projection.BusinessPartnerCompany = _BPCompanyPostalAddress_2.BusinessPartner
[0..1] I_AddressPhoneNumber _Telephone $projection.AddressID = _Telephone.AddressID and $projection.PersonNumber = _Telephone.Person and _Telephone.PhoneNumberType = '1'
[0..1] I_AddressPhoneNumber _MobilePhone $projection.AddressID = _MobilePhone.AddressID and $projection.PersonNumber = _MobilePhone.Person and _MobilePhone.PhoneNumberType = '3'
[0..1] I_AddressFaxNumber _FaxNumber $projection.AddressID = _FaxNumber.AddressID and $projection.PersonNumber = _FaxNumber.Person and _FaxNumber.IsDefaultFaxNumber = 'X'
[0..1] I_AddressPhoneNumber_2 _Telephone_2 $projection.AddressID = _Telephone_2.AddressID and $projection.PersonNumber = _Telephone_2.AddressPersonID and _Telephone_2.PhoneNumberType = '1'
[0..1] I_AddressPhoneNumber_2 _MobilePhone_2 $projection.AddressID = _MobilePhone_2.AddressID and $projection.PersonNumber = _MobilePhone_2.AddressPersonID and _MobilePhone_2.PhoneNumberType = '3'
[0..1] I_AddressFaxNumber_2 _FaxNumber_2 $projection.AddressID = _FaxNumber_2.AddressID and $projection.PersonNumber = _FaxNumber_2.AddressPersonID and _FaxNumber_2.FaxNumberIsCurrentDefault = 'X'
[0..1] I_Address_2 _AddressDefaultRepresentation $projection.AddressID = _AddressDefaultRepresentation.AddressID and $projection.PersonNumber = _AddressDefaultRepresentation.AddressPersonID and _AddressDefaultRepresentation.AddressRepresentationCode is initial
[0..*] I_Address_2 _AddressInternationalVersions $projection.AddressID = _AddressInternationalVersions.AddressID and $projection.PersonNumber = _AddressInternationalVersions.AddressPersonID and _AddressInternationalVersions.AddressRepresentationCode is not initial

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName IBPCNTCTADDRESS view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #REQUIRED view
VDM.viewType #BASIC view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MASTER view
ObjectModel.representativeKey RelationshipNumber view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Business Partner Contact To Address view

Fields (41)

KeyFieldSource TableSource FieldDescription
KEY RelationshipNumber but052 relnr BP Relationship Number
KEY BusinessPartnerCompany but052 partner1 Business Partner Number
KEY BusinessPartnerPerson but052 partner2 Business Partner Number
KEY ValidityEndDate but052 date_to Validity Date (Valid To)
KEY AddressID but052 addrnumber Address Number
PersonNumber but000 persnumber Person Number
IsDefaultAddress but052 xdfadr Indicator: Address is standard address
AddressRepresentationCode Version ID for International Addresses
ContactRelationshipFunction Function
ContactRelationshipDepartment Department
Floor Floor in building
Building Building (number or code)
RoomNumber Room or Apartment Number
PrfrdCommMediumType Communication Method (Key) (Business Address Services)
CorrespondenceShortName Short name for correspondence
InhouseMail Internal Mail Postal Code
InternationalPhoneNumber _Telephone_2 InternationalPhoneNumber Complete Number: Dialing Code+Number+Extension
PhoneNumberCountry _Telephone_2 PhoneNumberCountry Country/Region for Telephone/Fax Number
PhoneNumber _Telephone_2 PhoneAreaCodeSubscriberNumber Telephone No.: Dialing Code and Number
InternationalMobilePhoneNumber _MobilePhone_2 InternationalPhoneNumber Complete Number: Dialing Code+Number+Extension
MobilePhoneCountry _MobilePhone_2 PhoneNumberCountry Country/Region for Telephone/Fax Number
MobilePhoneNumber _MobilePhone_2 PhoneAreaCodeSubscriberNumber Telephone No.: Dialing Code and Number
MobilePhoneNumberExtension _MobilePhone_2 PhoneExtensionNumber Telephone no.: Extension
InternationalFaxNumber _FaxNumber_2 InternationalFaxNumber Complete Number: Dialing Code+Number+Extension
FaxCountry _FaxNumber_2 FaxNumberCountry Country/Region for Telephone/Fax Number
AuthorizationGroup _BusinessPartnerPerson AuthorizationGroup Authorization Group
IsBusinessPurposeCompleted _BusinessPartnerPerson IsBusinessPurposeCompleted Business Purpose Completed Flag
_AddressDetails _AddressDetails
_PersonDetails _PersonDetails
_BPCompanyPostalAddress _BPCompanyPostalAddress
_BusinessPartnerCompany _BusinessPartnerCompany
_BusinessPartnerPerson _BusinessPartnerPerson
_Telephone _Telephone
_MobilePhone _MobilePhone
_FaxNumber _FaxNumber
_Telephone_2 _Telephone_2
_MobilePhone_2 _MobilePhone_2
_FaxNumber_2 _FaxNumber_2
_BPCompanyPostalAddress_2 _BPCompanyPostalAddress_2
_AddressDefaultRepresentation _AddressDefaultRepresentation
_AddressInternationalVersions _AddressInternationalVersions

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 I_BpContactToAddress.
-- 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: IBPCNTCTADDRESS

CREATE VIEW I_BpContactToAddress AS
SELECT
  but052.relnr AS RelationshipNumber,
  but052.partner1 AS BusinessPartnerCompany,
  but052.partner2 AS BusinessPartnerPerson,
  but052.date_to AS ValidityEndDate,
  but052.addrnumber AS AddressID,
  but000.persnumber AS PersonNumber,
  but052.xdfadr AS IsDefaultAddress,
  _AddressDetails[1: nation = ' '].nation AS AddressRepresentationCode,
  _AddressDetails[1: nation = ' '].function AS ContactRelationshipFunction,
  _AddressDetails[1: nation = ' '].department AS ContactRelationshipDepartment,
  _AddressDetails[1: nation = ' '].floor AS Floor,
  _AddressDetails[1: nation = ' '].building AS Building,
  _AddressDetails[1: nation = ' '].roomnumber AS RoomNumber,
  _AddressDetails[1: nation = ' '].deflt_comm AS PrfrdCommMediumType,
  _AddressDetails[1: nation = ' '].id_code AS CorrespondenceShortName,
  _AddressDetails[1: nation = ' '].ih_mail AS InhouseMail,
  _Telephone_2.InternationalPhoneNumber AS InternationalPhoneNumber,
  _Telephone_2.PhoneNumberCountry AS PhoneNumberCountry,
  _Telephone_2.PhoneAreaCodeSubscriberNumber AS PhoneNumber,
  _MobilePhone_2.InternationalPhoneNumber AS InternationalMobilePhoneNumber,
  _MobilePhone_2.PhoneNumberCountry AS MobilePhoneCountry,
  _MobilePhone_2.PhoneAreaCodeSubscriberNumber AS MobilePhoneNumber,
  _MobilePhone_2.PhoneExtensionNumber AS MobilePhoneNumberExtension,
  _FaxNumber_2.InternationalFaxNumber AS InternationalFaxNumber,
  _FaxNumber_2.FaxNumberCountry AS FaxCountry,
  _BusinessPartnerPerson.AuthorizationGroup AS AuthorizationGroup,
  _BusinessPartnerPerson.IsBusinessPurposeCompleted AS IsBusinessPurposeCompleted
FROM but052
INNER JOIN but000 ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_BusinessPartner AS _BusinessPartnerCompany ON BusinessPartnerCompany = _BusinessPartnerCompany.BusinessPartner  -- association [1..1]
LEFT OUTER JOIN I_BusinessPartner AS _BusinessPartnerPerson ON BusinessPartnerPerson = _BusinessPartnerPerson.BusinessPartner  -- association [1..1]
LEFT OUTER JOIN adcp AS _AddressDetails ON AddressID = _AddressDetails.addrnumber AND PersonNumber = _AddressDetails.persnumber  -- association [1..*]
LEFT OUTER JOIN adrp AS _PersonDetails ON PersonNumber = _PersonDetails.persnumber  -- association [1..*]
LEFT OUTER JOIN I_BusinessPartnerAddress AS _BPCompanyPostalAddress ON AddressID = _BPCompanyPostalAddress.AddressNumber AND BusinessPartnerCompany = _BPCompanyPostalAddress.BusinessPartner  -- association [1]
LEFT OUTER JOIN I_BusinessPartAddress_2 AS _BPCompanyPostalAddress_2 ON AddressID = _BPCompanyPostalAddress_2.AddressNumber AND BusinessPartnerCompany = _BPCompanyPostalAddress_2.BusinessPartner  -- association [1]
LEFT OUTER JOIN I_AddressPhoneNumber AS _Telephone ON AddressID = _Telephone.AddressID AND PersonNumber = _Telephone.Person AND _Telephone.PhoneNumberType = '1'  -- association [0..1]
LEFT OUTER JOIN I_AddressPhoneNumber AS _MobilePhone ON AddressID = _MobilePhone.AddressID AND PersonNumber = _MobilePhone.Person AND _MobilePhone.PhoneNumberType = '3'  -- association [0..1]
LEFT OUTER JOIN I_AddressFaxNumber AS _FaxNumber ON AddressID = _FaxNumber.AddressID AND PersonNumber = _FaxNumber.Person AND _FaxNumber.IsDefaultFaxNumber = 'X'  -- association [0..1]
LEFT OUTER JOIN I_AddressPhoneNumber_2 AS _Telephone_2 ON AddressID = _Telephone_2.AddressID AND PersonNumber = _Telephone_2.AddressPersonID AND _Telephone_2.PhoneNumberType = '1'  -- association [0..1]
LEFT OUTER JOIN I_AddressPhoneNumber_2 AS _MobilePhone_2 ON AddressID = _MobilePhone_2.AddressID AND PersonNumber = _MobilePhone_2.AddressPersonID AND _MobilePhone_2.PhoneNumberType = '3'  -- association [0..1]
LEFT OUTER JOIN I_AddressFaxNumber_2 AS _FaxNumber_2 ON AddressID = _FaxNumber_2.AddressID AND PersonNumber = _FaxNumber_2.AddressPersonID AND _FaxNumber_2.FaxNumberIsCurrentDefault = 'X'  -- association [0..1]
LEFT OUTER JOIN I_Address_2 AS _AddressDefaultRepresentation ON AddressID = _AddressDefaultRepresentation.AddressID AND PersonNumber = _AddressDefaultRepresentation.AddressPersonID AND _AddressDefaultRepresentation.AddressRepresentationCode is initial  -- association [0..1]
LEFT OUTER JOIN I_Address_2 AS _AddressInternationalVersions ON AddressID = _AddressInternationalVersions.AddressID AND PersonNumber = _AddressInternationalVersions.AddressPersonID AND _AddressInternationalVersions.AddressRepresentationCode is not initial  -- association [0..*]
;