P_BPProtectedAddrUsageCount

DDL: P_BPPROTECTEDADDRUSAGECOUNT SQL: PBPPROADRUC Type: view COMPOSITE Package: VDM_MD_BP_BASE

Number of protected usages BP address

P_BPProtectedAddrUsageCount is a Composite CDS View that provides data about "Number of protected usages BP address" in SAP S/4HANA. It reads from 3 data sources (but021_fs, tb008s, tb008u) and exposes 2 fields with key fields BusinessPartner, AddressID. Part of development package VDM_MD_BP_BASE.

Data Sources (3)

SourceAliasJoin Type
but021_fs but021_fs from
tb008s tb008s left_outer
tb008u tb008u left_outer

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PBPPROADRUC view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #COMPOSITE view
AccessControl.personalData.blocking #REQUIRED view

Fields (2)

KeyFieldSource TableSource FieldDescription
KEY BusinessPartner but021_fs partner
KEY AddressID but021_fs addrnumber
@AbapCatalog.sqlViewName: 'PBPPROADRUC'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private: true
@VDM.viewType: #COMPOSITE
@AccessControl.personalData.blocking: #REQUIRED
define view P_BPProtectedAddrUsageCount 
//as select from but020

as select from but021_fs
     //left outer join but021_fs on but020.partner   =  but021_fs.partner

                      //      and but020.addrnumber  =  but021_fs.addrnumber

                        //    and but020.nation      =  ' '

                            
     left outer join tb008u on tb008u.adr_kind = but021_fs.adr_kind
     left outer join tb008s on tb008s.operation = tb008u.operation
{
  key but021_fs.partner         as BusinessPartner,
  key but021_fs.addrnumber      as AddressID,
  sum(case when tb008s.protect = 'X' then 1 
           when tb008s.protect <> 'X' then 0 end) as BPProtectedAddrUsageCount
}
group by but021_fs.partner, but021_fs.addrnumber