I_BUSINESSPARTNERADDRESSTP

CDS View

Business Partner Address

I_BUSINESSPARTNERADDRESSTP is a CDS View in S/4HANA. Business Partner Address. It contains 55 fields. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
C_BusinessPartnerAddress view from CONSUMPTION Business Partner Address

Fields (55)

KeyField CDS FieldsUsed in Views
KEY AddressNumber AddressNumber 1
KEY BusinessPartner BusinessPartner 1
AdditionalStreetPrefixName AdditionalStreetPrefixName 1
AdditionalStreetSuffixName AdditionalStreetSuffixName 1
AddressMoveDate AddressMoveDate 1
AddressNumberForEdit AddressNumberForEdit 1
AddressTimeZone AddressTimeZone 1
AddressValidityEndDate AddressValidityEndDate 1
AddressValidityStartDate AddressValidityStartDate 1
BPTargetAddressID BPTargetAddressID 1
BPTargetAddressText BPTargetAddressText 1
BusinessPartnerForEdit BusinessPartnerForEdit 1
CareOfName CareOfName 1
CityName CityName 1
CompanyPostalCode CompanyPostalCode 1
CorrespondenceLanguage CorrespondenceLanguage 1
Country Country 1
County County 1
CustomerSupplierCityName CustomerSupplierCityName 1
CustomerSupplierStreetName CustomerSupplierStreetName 1
DeliveryServiceNumber DeliveryServiceNumber 1
DeliveryServiceTypeCode DeliveryServiceTypeCode 1
District District 1
EmailAddress EmailAddress 1
FaxCountry FaxCountry 1
FaxNumber FaxNumber 1
FaxNumberExtension FaxNumberExtension 1
HomeCityName HomeCityName 1
HouseNumber HouseNumber 1
HouseNumberSupplementText HouseNumberSupplementText 1
MobilePhoneCountry MobilePhoneCountry 1
MobilePhoneNumber MobilePhoneNumber 1
PhoneNumber PhoneNumber 1
PhoneNumberCountry PhoneNumberCountry 1
PhoneNumberExtension PhoneNumberExtension 1
POBox POBox 1
POBoxDeviatingCityName POBoxDeviatingCityName 1
POBoxDeviatingCountry POBoxDeviatingCountry 1
POBoxDeviatingRegion POBoxDeviatingRegion 1
POBoxIsWithoutNumber POBoxIsWithoutNumber 1
POBoxLobbyName POBoxLobbyName 1
POBoxPostalCode POBoxPostalCode 1
PostalCode PostalCode 1
PrfrdCommMediumType PrfrdCommMediumType 1
Region Region 1
StandardUsage StandardUsage 1
StreetName StreetName 1
StreetPrefixName StreetPrefixName 1
StreetSuffixName StreetSuffixName 1
TaxJurisdiction TaxJurisdiction 1
TaxJurisdictionByProvider TaxJurisdictionByProvider 1
TownshipName TownshipName 1
TransportZone TransportZone 1
URLFieldLength URLFieldLength 1
WebsiteURL WebsiteURL 1
@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'

@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

      BusinessPartnerAddress.BusinessPartner                                                                           as BusinessPartnerForEdit,

      @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
      @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
      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

}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ADDRCURDEFAULTEMAILADDRESS",
"I_ADDRCURDEFAULTFAXNUMBER",
"I_ADDRCURDFLTLANDLINEPHONENMBR",
"I_ADDRCURDFLTMOBILEPHONENUMBER",
"I_ADDRESS",
"I_ADDRESSHOMEPAGEURL",
"I_ADDRESS_2",
"I_BPLATESTDEFAULTADDRESS_2",
"I_BPPROTECTEDADDRESS",
"I_BUSPARTADDRESS"
],
"ASSOCIATED":
[
"I_ADDRESS",
"I_ADDRESS_2",
"I_BPEMAILADDRESSTP",
"I_BPFAXNUMBERTP",
"I_BPLATESTDEFAULTADDRESS_2",
"I_BPMOBILEPHONENUMBERTP",
"I_BPPROTECTEDADDRESS",
"I_BPTELEPHONENUMBERTP",
"I_BPWEBSITEURLTP",
"I_BUSINESSPARTNERADDRUSAGETP",
"I_BUSINESSPARTNERTP",
"I_COUNTRYTEXT"
],
"BASE":
[
"I_BUSPARTADDRESS"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/