I_BusinessPartnerAddressTP

DDL: I_BUSINESSPARTNERADDRESSTP SQL: IBPADDRESSTP Type: view TRANSACTIONAL Package: VDM_MD_BP

Business Partner Address

I_BusinessPartnerAddressTP is a Transactional CDS View that provides data about "Business Partner Address" in SAP S/4HANA. It reads from 1 data source (I_BusPartAddress) and exposes 72 fields with key fields BusinessPartner, AddressNumber. It has 9 associations to related views. Part of development package VDM_MD_BP.

Data Sources (1)

SourceAliasJoin Type
I_BusPartAddress BusinessPartnerAddress from

Associations (9)

CardinalityTargetAliasCondition
[1..1] I_BusinessPartnerTP _BusinessPartner $projection.BusinessPartner = _BusinessPartner.BusinessPartner
[1..*] I_BusinessPartnerAddrUsageTP _BusinessPartnerAddrUsage $projection.BusinessPartner = _BusinessPartnerAddrUsage.BusinessPartner and $projection.AddressNumber = _BusinessPartnerAddrUsage.AddressNumber
[0..*] I_BPTelephoneNumberTP _BPTelephoneNumber $projection.BusinessPartner = _BPTelephoneNumber.BusinessPartner and $projection.AddressNumber = _BPTelephoneNumber.AddressID
[0..*] I_BPMobilePhoneNumberTP _BPMobilePhoneNumber $projection.BusinessPartner = _BPMobilePhoneNumber.BusinessPartner and $projection.AddressNumber = _BPMobilePhoneNumber.AddressID
[0..*] I_BPFaxNumberTP _BPFaxNumber $projection.BusinessPartner = _BPFaxNumber.BusinessPartner and $projection.AddressNumber = _BPFaxNumber.AddressID
[0..*] I_BPWebsiteURLTP _BPWebsiteURL $projection.BusinessPartner = _BPWebsiteURL.BusinessPartner and $projection.AddressNumber = _BPWebsiteURL.AddressID
[0..*] I_BPEmailAddressTP _BPEmailAddress $projection.BusinessPartner = _BPEmailAddress.BusinessPartner and $projection.AddressNumber = _BPEmailAddress.AddressID
[1..1] I_BPLatestDefaultAddress_2 _StandardAddrUsage $projection.BusinessPartner = _StandardAddrUsage.BusinessPartner
[0..1] I_CountryText _CountryText $projection.country = _CountryText.Country and _CountryText.Language = $session.system_language

Annotations (15)

NameValueLevelField
AbapCatalog.sqlViewName IBPADDRESSTP view
ClientDependent true view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #TRANSACTIONAL view
ObjectModel.deleteEnabled EXTERNAL_CALCULATION view
ObjectModel.updateEnabled EXTERNAL_CALCULATION view
Search.searchable true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #REQUIRED view
EndUserText.label Business Partner Address view
ObjectModel.writeDraftPersistence BUPA_ADRC_D view
ObjectModel.draftEnabled true view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MASTER view

Fields (72)

KeyFieldSource TableSource FieldDescription
KEY BusinessPartner I_BusPartAddress BusinessPartner
KEY AddressNumber I_BusPartAddress AddressID
BusinessPartnerForEdit I_BusPartAddress BusinessPartner
AddressNumberForEdit
ValidityStartDate I_BusPartAddress ValidityStartDate
ValidityEndDate I_BusPartAddress ValidityEndDate
AddressValidityStartDate
AddressValidityEndDate
CareOfName
StreetPrefixName
AdditionalStreetPrefixName
HouseNumber
StreetName
CustomerSupplierStreetName
HouseNumberSupplementText
StreetSuffixName
AdditionalStreetSuffixName
HomeCityName
District
PostalCode
CityName
CustomerSupplierCityName
Country
Region
AddressTimeZone
TransportZone
TaxJurisdiction
TaxJurisdictionByProvider
CompanyPostalCode
DeliveryServiceTypeCode
DeliveryServiceNumber
POBox
POBoxIsWithoutNumber
POBoxPostalCode
POBoxLobbyName
POBoxDeviatingCityName
POBoxDeviatingRegion
POBoxDeviatingCountry
CorrespondenceLanguage
PrfrdCommMediumType
PhoneNumber
FaxNumber
PhoneNumberCountry
PhoneNumberExtension
FaxCountry
FaxNumberExtension
MobilePhoneNumber
MobilePhoneCountry
EmailAddress
County
TownshipName _AddressDefaultRepresentation TertiaryRegionName
BPTargetAddressID I_BusPartAddress BPTargetAddressID
BPAddressMoveDateTime I_BusPartAddress BPAddressMoveDateTime
AddressMoveDate
InternationalPhoneNumber
CompleteAddress
BPTargetAddressText
BPAddressIsProtected _BPProtectedAddress BPAddressIsProtected
URLFieldLength
WebsiteURL
_BusinessPartner _BusinessPartner
_BusinessPartnerAddrUsage _BusinessPartnerAddrUsage
_BPTelephoneNumber _BPTelephoneNumber
_BPMobilePhoneNumber _BPMobilePhoneNumber
_BPFaxNumber _BPFaxNumber
_BPWebsiteURL _BPWebsiteURL
_BPEmailAddress _BPEmailAddress
_CountryText _CountryText
_StandardAddrUsage _StandardAddrUsage
_BPProtectedAddress _BPProtectedAddress
_AddressDefaultRepresentation _AddressDefaultRepresentation
_Address _Address
@AbapCatalog.sqlViewName: 'IBPADDRESSTP'
@ClientDependent: true
@AbapCatalog.compiler.compareFilter: true
@VDM.viewType: #TRANSACTIONAL
//@ObjectModel.writeEnabled: true

@ObjectModel.createEnabled
@ObjectModel.deleteEnabled: 'EXTERNAL_CALCULATION'
//@ObjectModel.deleteEnabled


@ObjectModel.updateEnabled: 'EXTERNAL_CALCULATION'
@ObjectModel.loadEnabled
@Search.searchable: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #REQUIRED
@EndUserText.label: 'Business Partner Address'
@Consumption.dbHints: [ 'USE_HEX_PLAN' ]
@ObjectModel.writeDraftPersistence: 'BUPA_ADRC_D'
@ObjectModel.draftEnabled:true
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass: #MASTER

// Root view changed and fields have been exposed using the new view as part of I_Address_2 adoption

define view I_BusinessPartnerAddressTP

  as select from I_BusPartAddress as BusinessPartnerAddress
  association [1..1] to I_BusinessPartnerTP          as _BusinessPartner          on  $projection.BusinessPartner = _BusinessPartner.BusinessPartner

  association [1..*] to I_BusinessPartnerAddrUsageTP as _BusinessPartnerAddrUsage on  $projection.BusinessPartner = _BusinessPartnerAddrUsage.BusinessPartner
                                                                                  and $projection.AddressNumber   = _BusinessPartnerAddrUsage.AddressNumber

  association [0..*] to I_BPTelephoneNumberTP        as _BPTelephoneNumber        on  $projection.BusinessPartner = _BPTelephoneNumber.BusinessPartner
                                                                                  and $projection.AddressNumber   = _BPTelephoneNumber.AddressID

  association [0..*] to I_BPMobilePhoneNumberTP      as _BPMobilePhoneNumber      on  $projection.BusinessPartner = _BPMobilePhoneNumber.BusinessPartner
                                                                                  and $projection.AddressNumber   = _BPMobilePhoneNumber.AddressID

  association [0..*] to I_BPFaxNumberTP              as _BPFaxNumber              on  $projection.BusinessPartner = _BPFaxNumber.BusinessPartner
                                                                                  and $projection.AddressNumber   = _BPFaxNumber.AddressID

  association [0..*] to I_BPWebsiteURLTP             as _BPWebsiteURL             on  $projection.BusinessPartner = _BPWebsiteURL.BusinessPartner
                                                                                  and $projection.AddressNumber   = _BPWebsiteURL.AddressID

  association [0..*] to I_BPEmailAddressTP           as _BPEmailAddress           on  $projection.BusinessPartner = _BPEmailAddress.BusinessPartner
                                                                                  and $projection.AddressNumber   = _BPEmailAddress.AddressID

  //association [1..1] to I_BPLatestDefaultAddress     as _StandardAddrUsage        on  $projection.BusinessPartner = _StandardAddrUsage.BusinessPartner

  association [1..1] to I_BPLatestDefaultAddress_2   as _StandardAddrUsage        on  $projection.BusinessPartner = _StandardAddrUsage.BusinessPartner

  association [0..1] to I_CountryText                as _CountryText              on  $projection.country   = _CountryText.Country
                                                                                  and _CountryText.Language = $session.system_language

{

      @semanticKey: true
  key BusinessPartnerAddress.BusinessPartner                                                                           as BusinessPartner,
      @semanticKey: true
  key BusinessPartnerAddress.AddressID                                                                                 as AddressNumber,

      @Search.defaultSearchElement: true
      @Search.fuzzinessThreshold: 0.8
      @Search.ranking: #HIGH
      @ObjectModel.foreignKey.association: null
      BusinessPartnerAddress.BusinessPartner                                                                           as BusinessPartnerForEdit,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
      cast(BusinessPartnerAddress.AddressID as char10)                                                                 as AddressNumberForEdit,
       //BusinessPartnerAddress.AddressID                                                                                 as AddressNumberForEdit,


      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress.ValidityStartDate,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress.ValidityEndDate,

      @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      tstmp_to_dats(BusinessPartnerAddress.ValidityStartDate,'UTC',  $session.client, 'NULL')                          as AddressValidityStartDate,

      @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      tstmp_to_dats(BusinessPartnerAddress.ValidityEndDate,'UTC',  $session.client, 'NULL')                            as AddressValidityEndDate,

      // BusinessPartnerAddress.AddressType,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.CareOfName,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.StreetPrefixName1                                           as StreetPrefixName, //Added


      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.StreetPrefixName2                                           as AdditionalStreetPrefixName, //Added


      //BusinessPartnerAddress.FullName,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.HouseNumber,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.StreetName,

      //dummy street for cloud

      //cast( '                                        ' as abap.sstring( 60 )  )    as CustomerSupplierStreetName,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.StreetName                                                  as CustomerSupplierStreetName,
      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.HouseNumberSupplementText,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.StreetSuffixName1                                           as StreetSuffixName, //Added


      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.StreetSuffixName2                                           as AdditionalStreetSuffixName, //Added


      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.VillageName                                                 as HomeCityName, //Added


      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.DistrictName                                                as District,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.PostalCode,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.CityName,
      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION' //Added dummy city for cloud

      BusinessPartnerAddress._AddressDefaultRepresentation.CityName                                                    as CustomerSupplierCityName,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.Country,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.Region,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.AddressTimeZone,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.TransportZone, //Added


      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.TaxJurisdiction, //Added


      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.TaxJurisdiction                                             as TaxJurisdictionByProvider,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.CompanyPostalCode,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.DeliveryServiceTypeCode, //Added


      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.DeliveryServiceNumber,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.POBox,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.POBoxIsWithoutNumber,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.POBoxPostalCode,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.POBoxLobbyName,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.POBoxDeviatingCityName,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.POBoxDeviatingRegion,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.POBoxDeviatingCountry,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.CorrespondenceLanguage,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.PrfrdCommMediumType,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation._CurrentDfltLandlinePhoneNmbr.PhoneAreaCodeSubscriberNumber as PhoneNumber,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation._CurrentDfltFaxNumber.FaxAreaCodeSubscriberNumber           as FaxNumber,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation._CurrentDfltLandlinePhoneNmbr.PhoneNumberCountry            as PhoneNumberCountry, //added


      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation._CurrentDfltLandlinePhoneNmbr.PhoneExtensionNumber          as PhoneNumberExtension, //added


      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation._CurrentDfltFaxNumber.FaxNumberCountry                      as FaxCountry, //added


      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation._CurrentDfltFaxNumber.FaxExtensionNumber                    as FaxNumberExtension, //added


      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation._CurrentDfltMobilePhoneNumber.PhoneAreaCodeSubscriberNumber as MobilePhoneNumber, //added


      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation._CurrentDfltMobilePhoneNumber.PhoneNumberCountry            as MobilePhoneCountry, //added


      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation._CurrentDfltEmailAddress.EmailAddress,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      BusinessPartnerAddress._AddressDefaultRepresentation.SecondaryRegionName                                         as County,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      _AddressDefaultRepresentation.TertiaryRegionName                                                                 as TownshipName,

      BusinessPartnerAddress.BPTargetAddressID,

      BusinessPartnerAddress.BPAddressMoveDateTime,

      tstmp_to_dats(BusinessPartnerAddress.BPAddressMoveDateTime,'UTC',  $session.client, 'NULL')                      as AddressMoveDate,

      //concat_with_space(concat_with_space(concat_with_space(concat_with_space(StreetName,HouseNumber,1),PostalCode,1),CityName,1),Country,1) as AddressLine1Text,

      //cast( ' ' as abap.char( 127 ) )                                                                                                        as AddressLine1Text,


      /* case
         when _TelCntryPrefixValueHelp.TelephoneCountryPrefix is null and PhoneNumberExtension is null  and PhoneNumber is null
           then EmailAddress
         when EmailAddress is null
           then concat('+',concat_with_space(_TelCntryPrefixValueHelp.TelephoneCountryPrefix,concat_with_space(PhoneNumber, PhoneNumberExtension,1),1))
         else
           concat_with_space(concat('+',concat_with_space(_TelCntryPrefixValueHelp.TelephoneCountryPrefix,concat_with_space(PhoneNumber, PhoneNumberExtension,1),1)),EmailAddress,1)
       end as AddressLine2Text, */
      //cast( ' ' as abap.char( 289 ) )                                                                                                        as AddressLine2Text,



      // commented for I_Address_2 adoption

      //     coalesce(_Address._DefaultCorporatePhoneNumber.InternationalPhoneNumber, _Address._DefaultPrivatePhoneNumber.InternationalPhoneNumber) as InternationalPhoneNumber,



      //     coalesce(_AddressDefaultRepresentation._CurrentDfltLandlinePhoneNmbr.InternationalPhoneNumber, _AddressDefaultRepresentation._CurrentDfltMobilePhoneNumber.InternationalPhoneNumber) as InternationalPhoneNumber,


      _AddressDefaultRepresentation._CurrentDfltLandlinePhoneNmbr.InternationalPhoneNumber,


      /* @ObjectModel.readOnly: true
      case when HouseNumber='' and StreetName='' and CityName='' and PostalCode=''
      then HouseNumber
      else
      case when HouseNumber='' and StreetName=''
      then concat_with_space(PostalCode,CityName,1)
      else
      concat_with_space(HouseNumber,concat(StreetName,concat_with_space(',',concat_with_space(PostalCode,CityName,1),1)),1)
      end
      end                            as FormattedAddress,*/
      //cast( ' ' as abap.char( 124 ) )                                                                                                        as FormattedAddress,


      // concat_with_space(concat(concat_with_space(concat_with_space(concat_with_space(HouseNumber,StreetName,1),',',1),CityName,1),','),concat_with_space(_CountryText.CountryName,PostalCode,1),1)                                             as CompleteAddress,

      cast( ' ' as abap.char( 177 ) )                                                                                  as CompleteAddress,
      @ObjectModel.enabled : true
      cast( ' ' as abap.sstring( 260 )  )                                                                              as BPTargetAddressText,

      @ObjectModel.readOnly: true
      case when  _StandardAddrUsage.AddressNumber = AddressID
      then cast('X' as boole_d)
      //      else

      //      cast(' ' as boole_d)

      end                                                                                                              as StandardUsage,

      @ObjectModel.readOnly: true
      _BPProtectedAddress.BPAddressIsProtected,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      coalesce(_Address._DefaultCorpURLAddress.URLFieldLength, _Address._DefaultPvtURLAddress.URLFieldLength)          as URLFieldLength,
      //      BusinessPartnerAddress.URLFieldLength    as URLFieldLength,


      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      _Address._DefaultURLAddress.WebsiteURL,
      //    _AddressDefaultRepresentation._MainWebsiteURL.UniformResourceIdentifier                                          as WebsiteURL,

      //     cast (BusinessPartnerAddress._AddressDefaultRepresentation._MainWebsiteURL.UniformResourceIdentifier


      @ObjectModel.association.type: [#TO_COMPOSITION_ROOT,#TO_COMPOSITION_PARENT]
      _BusinessPartner,
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _BusinessPartnerAddrUsage,
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _BPTelephoneNumber,
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _BPMobilePhoneNumber,
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _BPFaxNumber,
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _BPWebsiteURL,
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _BPEmailAddress,
      _CountryText,
      _StandardAddrUsage,
      _BPProtectedAddress,
      _AddressDefaultRepresentation,
      _Address

}