I_ScriptedAddress
Interational Address Version
I_ScriptedAddress is a Basic CDS View that provides data about "Interational Address Version" in SAP S/4HANA. It reads from 3 data sources (adcp, adrc, adrp) and exposes 70 fields with key fields AddressNumber, AddressRepresentationCode.
Annotations (12)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | ISCRPTEDADDR | view | |
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| VDM.viewType | #BASIC | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #MASTER | view | |
| ObjectModel.representativeKey | AddressNumber | view | |
| Metadata.allowExtensions | true | view | |
| EndUserText.label | Interational Address Version | view |
Fields (70)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | AddressNumber | adrc | addrnumber | |
| KEY | AddressRepresentationCode | adrc | nation | |
| CareOfName | name_co | |||
| AdditionalStreetSuffixName | location | |||
| CorrespondenceLanguage | adrc | langu | ||
| PrfrdCommMediumType | adrc | deflt_comm | ||
| POBox | po_box | |||
| POBoxIsWithoutNumber | po_box_num | |||
| POBoxPostalCode | post_code2 | |||
| POBoxLobbyName | po_box_lobby | |||
| POBoxDeviatingCityName | po_box_loc | |||
| POBoxDeviatingRegion | po_box_reg | |||
| POBoxDeviatingCountry | po_box_cty | |||
| DeliveryServiceTypeCode | deli_serv_type | |||
| DeliveryServiceNumber | deli_serv_number | |||
| AddressTimeZone | time_zone | |||
| CityFileTestStatus | adrc | chckstatus | ||
| AddressNonDeliverableReason | adrc | dont_use_s | ||
| PostBoxNonDeliverableReason | adrc | dont_use_p | ||
| name2180asadfullnameasFullName | ||||
| CityName | city1 | |||
| District | city2 | |||
| CityCode | city_code | |||
| HomeCityName | home_city | |||
| PostalCode | post_code1 | |||
| CompanyPostalCode | post_code3 | |||
| StreetName | street | |||
| StreetPrefixName | str_suppl1 | |||
| AdditionalStreetPrefixName | str_suppl2 | |||
| StreetSuffixName | str_suppl3 | |||
| HouseNumber | house_num1 | |||
| HouseNumberSupplementText | house_num2 | |||
| Building | adrc | building | ||
| Floor | adrc | floor | ||
| RoomNumber | adrc | roomnumber | ||
| Country | country | |||
| Region | region | |||
| County | county | |||
| CountyCode | county_code | |||
| BusinessPartnerName1 | name1 | |||
| BusinessPartnerName2 | adrc | name2 | ||
| BusinessPartnerName3 | name3 | |||
| BusinessPartnerName4 | name4 | |||
| PhoneNumber | adrc | tel_number | ||
| FaxNumber | adrc | fax_number | ||
| StreetSearch | mc_street | |||
| CitySearch | mc_city1 | |||
| TaxJurisdiction | taxjurcode | |||
| TransportZone | transpzone | |||
| AddressCityPostBoxCode | city_code2 | |||
| Person | adcp | persnumber | ||
| titleendasFormOfAddress | ||||
| sort1endasSearchTerm1 | ||||
| sort2endasSearchTerm2 | ||||
| FirstName | adrp | name_first | ||
| LastName | adrp | name_last | ||
| BusinessPartnerBirthName | adrp | name2 | ||
| MiddleName | adrp | namemiddle | ||
| AdditionalLastName | adrp | name_last2 | ||
| PersonFullName | adrp | name_text | ||
| AcademicTitle | adrp | title_aca1 | ||
| AcademicTitle2 | adrp | title_aca2 | ||
| LastNamePrefix | adrp | prefix1 | ||
| LastNameSecondPrefix | adrp | prefix2 | ||
| BusinessPartnerNicknameLabel | adrp | nickname | ||
| Initials | adrp | initials | ||
| NameFormat | adrp | nameformat | ||
| NameCountry | adrp | namcountry | ||
| BPFirstNameSearchHelp | adrp | mc_namefir | ||
| BPLastNameSearchHelp | adrp | mc_namelas |
@AbapCatalog.sqlViewName: 'ISCRPTEDADDR'
@AbapCatalog.preserveKey:true
@AbapCatalog.compiler.compareFilter:true
//@Analytics : {dataCategory: #DIMENSION}
@AccessControl.authorizationCheck:#PRIVILEGED_ONLY
@VDM.viewType: #BASIC
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.serviceQuality: #B
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #MASTER
@ObjectModel.representativeKey: 'AddressNumber'
@Metadata.allowExtensions:true
@EndUserText.label: 'Interational Address Version'
define view I_ScriptedAddress
as select from adrc
left outer join adcp on adcp.addrnumber = adrc.addrnumber
and adcp.date_from = '00010101'
and adcp.nation != ' '
and adcp.comp_pers = 'P'
left outer join adrp on adcp.persnumber = adrp.persnumber
and adcp.nation = adrp.nation
{
key adrc.addrnumber as AddressNumber,
key adrc.nation as AddressRepresentationCode,
name_co as CareOfName,
location as AdditionalStreetSuffixName,
adrc.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 AddressNonDeliverableReason,
adrc.dont_use_p as PostBoxNonDeliverableReason,
cast(substring(replace(concat(name1, concat(' &@', adrc.name2)), '&@', ''),1,80)
as adfullname ) as FullName,
city1 as CityName,
city2 as District,
city_code as CityCode,
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 County,
county_code as CountyCode,
// adrc.title as FormOfAddress,
name1 as BusinessPartnerName1,
adrc.name2 as BusinessPartnerName2,
name3 as BusinessPartnerName3,
name4 as BusinessPartnerName4,
adrc.tel_number as PhoneNumber,
adrc.fax_number as FaxNumber,
mc_street as StreetSearch,
mc_city1 as CitySearch,
taxjurcode as TaxJurisdiction,
transpzone as TransportZone,
city_code2 as AddressCityPostBoxCode,
// Disabled NULL handling due to Performance. Do Null Handling in consuming layer, please
// We tested that it is cheaper to add the OR conditions into the child-associations
// case
// when adcp.persnumber is null then ' '
// -- possible alternative to the above when adrc.pers_addr = ' ' then ' '
// else adcp.persnumber
// end as Person,
adcp.persnumber as Person,
// adrp.persnumber,
// adrp.date_from,
//adrp.nation,
// adrp.date_to,
case when
adcp.persnumber is null then adrc.title else adrp.title
end as FormOfAddress,
case when
adcp.persnumber is null then adrc.sort1 else adrp.sort1
end as SearchTerm1,
case when
adcp.persnumber is null then adrc.sort2 else adrp.sort2
end as SearchTerm2,
adrp.name_first as FirstName,
adrp.name_last as LastName,
adrp.name2 as BusinessPartnerBirthName,
adrp.namemiddle as MiddleName,
adrp.name_last2 as AdditionalLastName,
adrp.name_text as PersonFullName,
// adrp.converted,
adrp.title_aca1 as AcademicTitle,
adrp.title_aca2 as AcademicTitle2,
adrp.prefix1 as LastNamePrefix,
adrp.prefix2 as LastNameSecondPrefix,
// adrp.title_sppl,
adrp.nickname as BusinessPartnerNicknameLabel,
adrp.initials as Initials,
adrp.nameformat as NameFormat,
adrp.namcountry as NameCountry,
// adrp.profession,
// adrp.sex,
// adrp.langu,
// adrp.pers_group,
// adrp.flaggroups,
// adrp.sort_phn,
// adrp.addr_comp,
// adrp.addr_pers,
// adrp.flperstel,
// adrp.flperscomm,
// adrp.persorigin,
adrp.mc_namefir as BPFirstNameSearchHelp,
adrp.mc_namelas as BPLastNameSearchHelp
// adrp.mc_name2,
// adrp.langu_crea,
// adrp.adrp_uuid,
// adrp.uuid_belated,
// adrp.id_category,
// adrp.adrp_err_status,
// adrp._dataaging
}
where
adrc.date_from = '00010101'
and adrc.nation != ' '
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"ADCP",
"ADRC",
"ADRP"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA