aps_user_ddl

DDL: APS_USER_DDL SQL: APS_USER Type: view Package: SR_APS_IAM_COMMON

User

aps_user_ddl is a CDS View that provides data about "User" in SAP S/4HANA. It reads from 1 data source (usr21) and exposes 4 fields with key field UserID. It has 1 association to related views. Part of development package SR_APS_IAM_COMMON.

Data Sources (1)

SourceAliasJoin Type
usr21 usr21 from

Associations (1)

CardinalityTargetAliasCondition
[0..1] aps_bp _BusinessPartner $projection.BusinessPartnerUUID = _BusinessPartner.businesspartneruuid

Annotations (3)

NameValueLevelField
ClientDependent true view
AbapCatalog.sqlViewName APS_USER view
EndUserText.label User view

Fields (4)

KeyFieldSource TableSource FieldDescription
KEY UserID
UserDescription
BusinessPartnerUUID bpperson
_BusinessPartner _BusinessPartner
@ClientDependent: true
@AbapCatalog.sqlViewName: 'APS_USER'
@EndUserText.label: 'User'

// SAP_BASIS representation of the VDM CDS view "I_User".

// Users represent either persons or technical entities.

// Users created for persons, communication and printing are owned by the customer.

// All other users are owned by SAP.

// Because any kind of user can create or change data in the system, 

// fields like "CreatedByUser" or "LastChangedByUser" must refer to this entity via a "[0..1]" association

// to obtain a descriptive text of the user. It must not be assumed, that the target of the association exists.

// It must not be assumed that such a user always corresponds to a business partner of type person.

// This views must not be exposed to end users directly because it exposes person relevant information.

// It must only be used in the definition context specific consumption views as target for the "CreatedByUser"

// and "LastChangedByUser" associations.

define view aps_user_ddl as select from usr21

association [0..1]  to aps_bp                            as _BusinessPartner
                    on $projection.BusinessPartnerUUID  =  _BusinessPartner.businesspartneruuid
 {
    key cast( usr21.bname as APS_USERID )             as UserID
    ,   cast( usr21.techdesc as APS_USERDESCRIPTION ) as UserDescription
    ,   case usr21.idadtype
           when '02' then ' '
           when '04' then ' '
           else 'X'             
        end                                           as IsTechnicalUser

    // The BusinessPartnerUUID is only used for the association and shall not be used directly.

    ,  @Consumption.hidden:true
       bpperson                                       as BusinessPartnerUUID
    
    // Public associations

    , _BusinessPartner
}