I_BPCURRENTDEFAULTADDRESS

CDS View

Business Partner Current Default Address

I_BPCURRENTDEFAULTADDRESS is a CDS View in S/4HANA. Business Partner Current Default Address. It contains 2 fields. 10 CDS views read from this table.

CDS Views using this table (10)

ViewTypeJoinVDMDescription
C_EnvrmtWastePartnerDfltAddr view from CONSUMPTION Waste Partner Default Address
FAC_DART_Z3_C_BP_ADDRESS view left_outer Business Partner Address for Customer
FAC_DART_Z3_S_BP_ADDRESS view left_outer Business Partner Address for Supplier
I_BPCurrentDefaultAddressGov view union_all COMPOSITE BP Current Default Address (Governance)
I_LglCntntMBusinessPartnerEml view from COMPOSITE Business Partner Email
P_BG_BusinessPartnerCountry view from COMPOSITE Business Partner Country
P_BPCurrentAddress view from COMPOSITE
P_NO_SAFTJournalCustSupMD view inner COMPOSITE SAF-T Norway Journal Item BP Master Data
P_RU_BusinessPartnerEmailAll view from COMPOSITE
P_RU_BusinessPartnerEmailAll view union COMPOSITE

Fields (2)

KeyField CDS FieldsUsed in Views
KEY BusinessPartner BusinessPartner 2
AddressID AddressNumber 1
@AbapCatalog.sqlViewName: 'IBPCURRDEFADDR'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@VDM.viewType: #BASIC
@EndUserText.label: 'Business Partner Current Default Address'
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #MASTER
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.personalData.blocking: #REQUIRED
@AccessControl.privilegedAssociations:  [ '_Address', '_AddressDefaultRepresentation']
@AbapCatalog.preserveKey:true
define view I_BPCurrentDefaultAddress
  as select from but020
    inner join   but021_fs on(
      but020.partner            =  but021_fs.partner
      and but020.addrnumber     =  but021_fs.addrnumber
      and
      //   but020.addr_valid_to = but021_fs.valid_to and

      but021_fs.adr_kind        =  'XXDEFAULT'
      and but020.nation         =  ' '
      and(
       // but021_fs.valid_from    is null *Commented for ESH restrction

       // or

         but021_fs.valid_from =  0
        or but021_fs.valid_from <= tstmp_current_utctimestamp()
      )
      and(
      //  but021_fs.valid_to      is null

     //   or 

        but021_fs.valid_to   =  0
        or but021_fs.valid_to   >= tstmp_current_utctimestamp()
      )
    )

  association [1..1] to I_Address            as _Address                      on  $projection.AddressID = _Address.AddressID
  association [0..1] to I_Address            as _StandardAddress              on  $projection.AddressID = _StandardAddress.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.AddressID       = _BPProtectedAddress.AddressID
  association [0..1] to I_Address_2          as _AddressDefaultRepresentation on  $projection.AddressID       = _AddressDefaultRepresentation.AddressID
                                                                        //      and _AddressDefaultRepresentation.AddressRepresentationCode is initial  //Commented for ESH      

                                                                              and _AddressDefaultRepresentation.AddressRepresentationCode = ''                                                                 
{
  key but020.partner         as BusinessPartner,
      //but021_fs.addrnumber   as AddressID, -> for testing LCHAR datatype -> view generation

      but020.addrnumber      as AddressID,
      but020.addr_valid_from as ValidityStartDateTime,
      but020.addr_valid_to   as ValidityEndDateTime,

      _BPProtectedAddress.BPAddressIsProtected,

      _Address
      //newly added associations

  ,
      _StandardAddress,
      _BusinessPartner.AuthorizationGroup,
      _BusinessPartner,
      // I_Address_2 adoption

      _AddressDefaultRepresentation
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BPPROTECTEDADDRESS",
"I_BUSINESSPARTNER",
"BUT020",
"BUT021_FS"
],
"ASSOCIATED":
[
"I_ADDRESS",
"I_ADDRESS_2",
"I_BPPROTECTEDADDRESS",
"I_BUSINESSPARTNER"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/