I_BUSINESSPARTNERADDRESS_2
Basic View for BP Address
I_BUSINESSPARTNERADDRESS_2 is a CDS View in S/4HANA. Basic View for BP Address. It contains 13 fields. 2 CDS views read from this table.
CDS Views using this table (2)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| I_CADisputeCaseContactVH | view | from | COMPOSITE | Dispute Case Contact in Contract Account |
| R_WorkAssgmtPrivateAddressTP | view_entity | from | TRANSACTIONAL | Private Address for Work Assignment |
Fields (13)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | AddressNumber | AddressNumber | 1 |
| CityName | CityName | 1 | |
| Country | Country | 1 | |
| DistrictName | DistrictName | 1 | |
| Floor | Floor | 1 | |
| HouseNumber | HouseNumber | 1 | |
| HouseNumberSupplementText | HouseNumberSupplementText | 1 | |
| POBox | POBox | 1 | |
| POBoxPostalCode | POBoxPostalCode | 1 | |
| PostalCode | PostalCode | 1 | |
| Region | Region | 1 | |
| RoomNumber | RoomNumber | 1 | |
| StreetName | StreetName | 1 |
@AbapCatalog.sqlViewName: 'IBPADDRESS2'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #REQUIRED
//@AccessControl.privilegedAssociations: [ '_Address' ]
@VDM.viewType: #BASIC
@EndUserText.label: 'Basic View for BP Address'
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass: #MASTER
@AbapCatalog.preserveKey:true
define view I_BusinessPartnerAddress_2
as select from but020
left outer to one join adrc on but020.addrnumber = adrc.addrnumber
and adrc.date_from = '00010101'
and adrc.nation = ' '
left outer to one join adcp on adcp.addrnumber = adrc.addrnumber
and adcp.date_from = '00010101'
and adcp.nation = ' '
and adcp.comp_pers = 'P'
// association [1..1] to I_Address as _Address on $projection.AddressNumber = _Address.AddressID
//
// association [1..1] to I_BusinessPartner as _BusinessPartner on $projection.BusinessPartner = _BusinessPartner.BusinessPartner
//
// association [0..1] to I_BPProtectedAddress as _BPProtectedAddress on $projection.BusinessPartner = _BPProtectedAddress.BusinessPartner
// and $projection.AddressNumber = _BPProtectedAddress.AddressID
{
key but020.client as mandt,
key but020.partner as BusinessPartner,
key but020.addrnumber as AddressNumber,
but020.addr_valid_from as ValidityStartDate,
but020.addr_valid_to as ValidityEndDate,
but020.address_guid as BusinessPartnerAddressUUID,
name_co as CareOfName,
location as AdditionalStreetSuffixName,
// @ObjectModel: {
// foreignKey.association: '_LanguageValueHelp'
//,mandatory: true
// }
// @ObjectModel.text.association: '_LanguageText'
langu as CorrespondenceLanguage,
adrc.deflt_comm as PrfrdCommMediumType,
po_box as POBox,
po_box_num as POBoxIsWithoutNumber,
post_code2 as POBoxPostalCode,
po_box_lobby as POBoxLobbyName,
po_box_loc as POBoxDeviatingCityName,
po_box_reg as POBoxDeviatingRegion,
po_box_cty as POBoxDeviatingCountry,
deli_serv_type as DeliveryServiceTypeCode,
deli_serv_number as DeliveryServiceNumber,
time_zone as AddressTimeZone,
adrc.chckstatus as CityFileTestStatus,
adrc.dont_use_s as AddressStreetUnusable,
adrc.dont_use_p as AddressPostBoxUnusable,
cast(substring(replace(concat(name1, concat(' &@', name2)), '&@', ''),1,80) as adfullname ) as FullName,
// name1 as Name,
// name2 as AdditionalName,
city1 as CityName,
city2 as DistrictName,
city_code as CityNumber,
home_city as HomeCityName,
post_code1 as PostalCode,
post_code3 as CompanyPostalCode,
street as StreetName,
str_suppl1 as StreetPrefixName,
str_suppl2 as AdditionalStreetPrefixName,
str_suppl3 as StreetSuffixName,
house_num1 as HouseNumber,
house_num2 as HouseNumberSupplementText,
adrc.building as Building,
adrc.floor as Floor,
adrc.roomnumber as RoomNumber,
country as Country,
region as Region,
county as BPCountyText,
county_code as CountyCode,
township_code as TownshipCode,
township as TownshipName,
// title as Title, // replace with FormOf Address
title as FormOfAddress,
//fields required for globalisation
name1 as BusinessPartnerName1,
name2 as BusinessPartnerName2,
adrc.nation as Nation,
adrc.tel_number as PhoneNumber,
adrc.fax_number as AddressFaxNumber,
adrc.sort1 as SearchTerm1,
adrc.sort2 as SearchTerm2,
mc_street as StreetSearch,
mc_city1 as CitySearch,
//Following fields are needed in BP Customer-Supplier Apps
name3 as BusinessPartnerName3,
name4 as BusinessPartnerName4,
taxjurcode as TaxJurisdiction,
transpzone as TransportZone,
city_code2 as AddressCityPostBoxCode,
adcp.persnumber as Person //NULL possible here.
// _Address._DefaultPhoneNumber.PhoneNumber,
// _Address._DefaultPhoneNumber. DestinationLocationCountry as PhoneNumberCountry,
// _Address._DefaultPhoneNumber.PhoneNumberExtension,
// _Address._DefaultFaxNumber.FaxNumber,
// _Address._DefaultFaxNumber.FaxCountry,
// _Address._DefaultFaxNumber.FaxNumberExtension,
// _Address._DefaultMobilePhoneNumber.PhoneNumber as MobilePhoneNumber,
// _Address._DefaultMobilePhoneNumber. DestinationLocationCountry as MobilePhoneCountry,
// _Address._DefaultEmailAddress.EmailAddress,
// _Address._DefaultURLAddress.URLFieldLength,
// _Address._DefaultURLAddress.WebsiteURL
//
// _Address,
// _BusinessPartner,
// _BPProtectedAddress
}