I_ADDRESSEMAILADDRESS_2

CDS View

Email Address

I_ADDRESSEMAILADDRESS_2 is a CDS View in S/4HANA. Email Address. It contains 7 fields. 6 CDS views read from this table.

CDS Views using this table (6)

ViewTypeJoinVDMDescription
I_AddrCurDefaultEmailAddress view_entity from BASIC Current Default Email Address
I_BPAddressIndependentEmail view from BASIC Root View for Address Independent Email for BP app
I_BPContactEmlAddrTP view inner TRANSACTIONAL TP View BP Contact Person Email Address
I_BPEmailAddress view from BASIC Business Partner Email Core View
I_BPRelshpCntctPersnEmlAddrTP view_entity inner TRANSACTIONAL RAP BO Contact Person Email Address
R_AddressEmailAddressTP view_entity from Email Address - TP

Fields (7)

KeyField CDS FieldsUsed in Views
KEY AddressID AddressID,AddressIDForEdit 2
KEY AddressPersonID Person 2
KEY CommMediumSequenceNumber OrdinalNumber,OrdinalNumberForEdit 4
_AddressCommunicationRemark _AddressCommunicationRemark 1
CommLineNotForUnsolicitedCntct CommNumberIsNotUsed 2
EmailAddress EmailAddress 4
EmailAddressIsCurrentDefault IsDefaultEmailAddress 4
@AccessControl.authorizationCheck: #PRIVILEGED_ONLY
@AccessControl.privilegedAssociations: ['_AddressCommunicationRemark', '_AddressCommunicationUsage']
@EndUserText.label: 'Email Address'
//@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_AddressEmailAddress_2
  as select from adr6

  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 = 'INT'

  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 = 'INT'
{
  key addrnumber                                                        as AddressID,
  key persnumber                                                        as AddressPersonID,
  key consnumber                                                        as CommMediumSequenceNumber,
      smtp_addr                                                         as EmailAddress,
      cast (flgdefault as ad_emailcurdflt preserving type)              as EmailAddressIsCurrentDefault,
      cast (flg_nouse as ad_commlinenotforunslctdcntct preserving type) as CommLineNotForUnsolicitedCntct,
      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
}
where
  date_from = '00010101'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"ADR6"
],
"ASSOCIATED":
[
"I_ADDRESSCOMMUNICATIONREMARK_2",
"I_ADDRESSCOMMUNICATIONUSAGE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/