I_AddressPhoneNumber_2
Phone Number
I_AddressPhoneNumber_2 is a Basic CDS View that provides data about "Phone Number" in SAP S/4HANA. It reads from 1 data source (adr2) and exposes 17 fields with key fields AddressID, AddressPersonID, CommMediumSequenceNumber. It has 4 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| adr2 | adr2 | from |
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | I_AddressCommunicationRemark_2 | _AddressCommunicationRemark | $projection.AddressID = _AddressCommunicationRemark.AddressID and $projection.AddressPersonID = _AddressCommunicationRemark.AddressPersonID and $projection.CommMediumSequenceNumber = _AddressCommunicationRemark.CommMediumSequenceNumber and _AddressCommunicationRemark.CommunicationMediumType = 'TEL' |
| [0..*] | I_AddressCommunicationUsage | _AddressCommunicationUsage | $projection.AddressID = _AddressCommunicationUsage.AddressID and $projection.AddressPersonID = _AddressCommunicationUsage.AddressPersonID and $projection.CommMediumSequenceNumber = _AddressCommunicationUsage.CommMediumSequenceNumber and _AddressCommunicationUsage.CommunicationMediumType = 'TEL' |
| [0..1] | I_Country | _PhoneNumberCountry | $projection.PhoneNumberCountry = _PhoneNumberCountry.Country |
| [0..1] | I_PhoneNumberType | _PhoneNumberType | $projection.PhoneNumberType = _PhoneNumberType.PhoneNumberType |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| EndUserText.label | Phone Number | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.viewType | #BASIC | view | |
| VDM.lifecycle.contract.type | #PUBLIC_LOCAL_API | view |
Fields (17)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | AddressID | addrnumber | ||
| KEY | AddressPersonID | persnumber | ||
| KEY | CommMediumSequenceNumber | consnumber | ||
| PhoneNumberCountry | country | |||
| PhNmbrIsCurrentOverallDefault | ||||
| CommLineNotForUnsolicitedCntct | ||||
| PhoneAreaCodeSubscriberNumber | tel_number | |||
| PhoneExtensionNumber | tel_extens | |||
| InternationalPhoneNumber | telnr_long | |||
| PhoneIsSMSEnabled | dft_receiv | |||
| PhoneNumberType | ||||
| datsendasValidityStartDate | ||||
| datsendasValidityEndDate | ||||
| _AddressCommunicationRemark | _AddressCommunicationRemark | |||
| _AddressCommunicationUsage | _AddressCommunicationUsage | |||
| _PhoneNumberCountry | _PhoneNumberCountry | |||
| _PhoneNumberType | _PhoneNumberType |
@AccessControl.authorizationCheck: #PRIVILEGED_ONLY
@AccessControl.privilegedAssociations: ['_AddressCommunicationRemark', '_AddressCommunicationUsage']
@EndUserText.label: 'Phone Number'
//@Metadata.allowExtensions: true
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.supportedCapabilities: [#CDS_MODELING_ASSOCIATION_TARGET, #CDS_MODELING_DATA_SOURCE, #SQL_DATA_SOURCE]
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass: #MIXED
//@ObjectModel.representativeKey: 'AddressID'
@VDM: {
viewType: #BASIC,
lifecycle.contract.type: #PUBLIC_LOCAL_API
}
define view entity I_AddressPhoneNumber_2
as select from adr2
association [0..*] to I_AddressCommunicationRemark_2 as _AddressCommunicationRemark on $projection.AddressID = _AddressCommunicationRemark.AddressID
and $projection.AddressPersonID = _AddressCommunicationRemark.AddressPersonID
and $projection.CommMediumSequenceNumber = _AddressCommunicationRemark.CommMediumSequenceNumber
and _AddressCommunicationRemark.CommunicationMediumType = 'TEL'
association [0..*] to I_AddressCommunicationUsage as _AddressCommunicationUsage on $projection.AddressID = _AddressCommunicationUsage.AddressID
and $projection.AddressPersonID = _AddressCommunicationUsage.AddressPersonID
and $projection.CommMediumSequenceNumber = _AddressCommunicationUsage.CommMediumSequenceNumber
and _AddressCommunicationUsage.CommunicationMediumType = 'TEL'
association [0..1] to I_Country as _PhoneNumberCountry on $projection.PhoneNumberCountry = _PhoneNumberCountry.Country
association [0..1] to I_PhoneNumberType as _PhoneNumberType on $projection.PhoneNumberType = _PhoneNumberType.PhoneNumberType
{
key addrnumber as AddressID,
key persnumber as AddressPersonID,
key consnumber as CommMediumSequenceNumber,
@ObjectModel.foreignKey.association: '_PhoneNumberCountry'
country as PhoneNumberCountry,
cast (flgdefault as ad_phnmbrcurovrldflt preserving type) as PhNmbrIsCurrentOverallDefault,
cast (flg_nouse as ad_commlinenotforunslctdcntct preserving type) as CommLineNotForUnsolicitedCntct,
tel_number as PhoneAreaCodeSubscriberNumber,
tel_extens as PhoneExtensionNumber,
telnr_long as InternationalPhoneNumber,
dft_receiv as PhoneIsSMSEnabled,
@ObjectModel.foreignKey.association: '_PhoneNumberType'
cast (r3_user as ad_phonenumbertype preserving type) as PhoneNumberType,
case valid_from
when '' then '00010101'
else cast( substring( valid_from,1,8) as abap.dats)
end as ValidityStartDate,
case valid_to
when '' then '99991231'
else cast( substring( valid_to,1,8) as abap.dats)
end as ValidityEndDate,
_AddressCommunicationRemark,
_AddressCommunicationUsage,
_PhoneNumberCountry,
_PhoneNumberType
}
where
date_from = '00010101'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"ADR2"
],
"ASSOCIATED":
[
"I_ADDRESSCOMMUNICATIONREMARK_2",
"I_ADDRESSCOMMUNICATIONUSAGE",
"I_COUNTRY",
"I_PHONENUMBERTYPE"
],
"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