I_ADDRESSPHONENUMBER_2

CDS View

Phone Number

I_ADDRESSPHONENUMBER_2 is a CDS View in S/4HANA. Phone Number. It contains 13 fields. 15 CDS views read from this table.

CDS Views using this table (15)

ViewTypeJoinVDMDescription
C_Arberp_Address view left_outer CONSUMPTION CDS View for Addresses
I_AddrCurDfltLandlinePhoneNmbr view_entity from BASIC Current Default Landline Phone Number
I_AddrCurDfltMobilePhoneNumber view_entity from BASIC Current Default Mobile PhoneNumber
I_Addressindependentmobile view from BASIC Core View Addr Indp Mobile
I_Addressindependentphone view from BASIC Core view for address independent phone details
I_BPAddressIndependentMobile view from BASIC Root view for AddrIndMob
I_BPAddressIndependentPhone view from BASIC Core view for address independent phone
I_BPContactMblNmbrTP view inner TRANSACTIONAL BO view for BP contact Mobile number
I_BPContactTelNmbrTP view inner TRANSACTIONAL TP View for BP Contact Person Telephone
I_BPMobilePhoneNumber view from BASIC Mobile Phone Number core view
I_BPRelshpCntctPersnMblNmbrTP view_entity inner TRANSACTIONAL BO view for Contact Person Mobile Number
I_BPRelshpCntctPersnTelNmbrTP view_entity inner TRANSACTIONAL RAP BO Contact Person Telephone Number
I_BPTelephoneNumber view from BASIC BusinessPartner Telephone Number
P_KR_BusinessPlace view left_outer COMPOSITE
R_AddressPhoneNumberTP view_entity from Phone Number - TP

Fields (13)

KeyField CDS FieldsUsed in Views
KEY AddressID AddressID,AddressIDForEdit 6
KEY AddressPersonID Person 6
KEY CommMediumSequenceNumber OrdinalNumber,OrdinalNumberForEdit 10
_AddressCommunicationRemark _AddressCommunicationRemark 1
_PhoneNumberCountry _PhoneNumberCountry 2
_PhoneNumberType _PhoneNumberType 2
CommLineNotForUnsolicitedCntct CommNumberIsNotUsed 4
InternationalPhoneNumber CompleteTelephoneNumber,InternationalMobilePhoneNumber,InternationalPhoneNumber 6
PhoneAreaCodeSubscriberNumber AddressPhoneNumber,MobilePhoneNumber,PhoneNumber 11
PhoneExtensionNumber MobilePhoneNumberExtension,PhoneExtensionNumber,PhoneNumberExtension 7
PhoneIsSMSEnabled PhoneIsSMSEnabled 4
PhoneNumberCountry DestinationLocationCountry,MobilePhoneCountry,PhoneNumberCountry 10
PhoneNumberType PhoneNumberType 10
@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'