P_BPUsrAssignment

DDL: P_BPUSRASSIGNMENT SQL: PBPUSRASSIGN Type: view BASIC

Business User - User Assignment

P_BPUsrAssignment is a Basic CDS View that provides data about "Business User - User Assignment" in SAP S/4HANA. It reads from 2 data sources (usr02, usr21) and exposes 10 fields with key field UserID. It has 1 association to related views.

Data Sources (2)

SourceAliasJoin Type
usr02 _Root from
usr21 usr21 inner

Associations (1)

CardinalityTargetAliasCondition
[0..1] adr6 _Email $projection.AddressNumber = _Email.addrnumber and $projection.PersonNumber = _Email.persnumber and _Email.date_from = '00010101'

Annotations (7)

NameValueLevelField
VDM.private true view
AbapCatalog.sqlViewName PBPUSRASSIGN view
AbapCatalog.compiler.compareFilter true view
ClientDependent true view
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Business User - User Assignment view
VDM.viewType #BASIC view

Fields (10)

KeyFieldSource TableSource FieldDescription
KEY UserID
Firstname adrp name_first
Lastname adrp name_last
UserDescription
AddressNumber usr21 addrnumber
PersonNumber usr21 persnumber
DefaultEmailAddress
UserGroup usr02 class
adcp adcp
adrp adrp
@VDM.private: true
@AbapCatalog.sqlViewName: 'PBPUSRASSIGN'
@AbapCatalog.compiler.compareFilter: true
@ClientDependent: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Business User - User Assignment'
@VDM.viewType: #BASIC
define view P_BPUsrAssignment as select from usr02 as _Root
    inner join            usr21              on  usr21.bname              = _Root.bname
    association [0..1] to adr6   as _Email   on  $projection.AddressNumber = _Email.addrnumber
                                             and $projection.PersonNumber  = _Email.persnumber
                                             and _Email.date_from     = '00010101'
    association [0..1] to adcp                on  $projection.AddressNumber = adcp.addrnumber
                                             and $projection.PersonNumber   = adcp.persnumber
                                             and adcp.nation      = ''
                                             and adcp.date_from   = '00010101'
    association [0..1] to adrp                on  $projection.PersonNumber = adrp.persnumber
                                             and adrp.nation      = ''
                                             and adrp.date_from   = '00010101'                                           
{
  key cast( _Root.bname as vdm_userid preserving type )              as UserID,
      adrp.name_first                                                as Firstname, 
      adrp.name_last                                                 as Lastname,
      cast( usr21.techdesc as vdm_userdescription preserving type )  as UserDescription,
      usr21.addrnumber                                               as AddressNumber, 
      usr21.persnumber                                               as PersonNumber,
      _Email[1: flgdefault = 'X'].smtp_addr                          as DefaultEmailAddress,
      _Root.class                                                    as UserGroup, 
      adcp,
      adrp
}      
where 
  usr21.idadtype = '00' //User with classical Address