I_User
User
I_User is a Basic CDS View that provides data about "User" in SAP S/4HANA. It reads from 1 data source (usr21) and exposes 6 fields with key field UserID. It has 2 associations to related views. It is exposed through 16 OData services (API_IAM_SUSR_READ, C_SALESORDERMANAGE_SD, UI_CREDITMEMOREQUESTMANAGE, ...). Part of development package SUSR.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| usr21 | usr21 | from |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_AddrCurDefaultEmailAddress | _AddrCurDefaultEmailAddress | usr21.persnumber = _AddrCurDefaultEmailAddress.AddressPersonID and usr21.addrnumber = _AddrCurDefaultEmailAddress.AddressID |
| [0..1] | I_UserAddress | _UserAddress | usr21.bname = _UserAddress.UserID |
Annotations (13)
| Name | Value | Level | Field |
|---|---|---|---|
| EndUserText.label | User | view | |
| VDM.viewType | #BASIC | view | |
| VDM.lifecycle.contract.type | #PUBLIC_LOCAL_API | view | |
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.sqlViewName | IUSER | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view | |
| ObjectModel.usageType.dataClass | #MASTER | view | |
| ObjectModel.usageType.serviceQuality | #A | view | |
| ObjectModel.usageType.sizeCategory | #M | view | |
| ObjectModel.representativeKey | UserID | view |
OData Services (16)
| Service | Binding | Version | Contract | Release |
|---|---|---|---|---|
| API_IAM_SUSR_READ | API_IAM_SUSR_READ | V4 | C2 | C1 |
| C_SALESORDERMANAGE_SD | C_SALESORDERMANAGE_SRV | V4 | C1 | NOT_RELEASED |
| UI_CREDITMEMOREQUESTMANAGE | UI_CREDITMEMOREQUESTMANAGE | V4 | C1 | NOT_RELEASED |
| UI_CUSTOMERRETURNMANAGE | UI_CUSTOMERRETURNMANAGE | V4 | C1 | NOT_RELEASED |
| UI_DEBITMEMOREQUESTMANAGE | UI_DEBITMEMOREQUESTMANAGE | V4 | C1 | NOT_RELEASED |
| UI_INBOUNDDELIVERYMANAGE | UI_INBOUNDDELIVERYMANAGE | V4 | C1 | NOT_RELEASED |
| UI_PRELIMBILLINGDOCUMENT_F6990 | UI_PRELIMBILLINGDOCUMENT_F6990 | V4 | C1 | NOT_RELEASED |
| UI_PURCONTRRENEGTTN_MANAGE | UI_PURCONTRRENEGTTN_MANAGE | V2 | C1 | NOT_RELEASED |
| UI_RFM_PO_MNG | UI_RFM_PO_MNG | V2 | C1 | NOT_RELEASED |
| UI_RFM_PRVSNLSLSCONTR | UI_RFM_PRVSNLSLSCONTR | V2 | C1 | NOT_RELEASED |
| UI_RFM_SUPPLY_SORTRULE | UI_RFM_SUPPLY_SORTRULE | V2 | C1 | NOT_RELEASED |
| UI_SALESCONTRACTMANAGE | UI_SALESCONTRACTMANAGE | V4 | C1 | NOT_RELEASED |
| UI_SALESDOCUMENTMANAGE | UI_SALESDOCUMENTMANAGE | V4 | C1 | NOT_RELEASED |
| UI_SALESQUOTATIONMANAGE | UI_SALESQUOTATIONMANAGE | V4 | C1 | NOT_RELEASED |
| UI_SLSORDERWITHOUTCHARGEMANAGE | UI_SLSORDERWITHOUTCHARGEMANAGE | V4 | C1 | NOT_RELEASED |
| UI_SUPLRUSRDFNDCRITRA_MANAGE | UI_SUPLRUSRDFNDCRITRA | V2 | C1 | NOT_RELEASED |
@EndUserText.label: 'User'
@VDM.viewType: #BASIC
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@AbapCatalog.preserveKey: true
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.sqlViewName: 'IUSER'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl: { authorizationCheck: #PRIVILEGED_ONLY
, privilegedAssociations: [ '_UserAddress'
, '_AddrCurDefaultEmailAddress'
]
, personalData.blocking: #BLOCKED_DATA_EXCLUDED
}
@ObjectModel.usageType.dataClass: #MASTER
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory: #M
@ObjectModel.representativeKey: 'UserID'
// 1. Background information:
// Users represent either persons or technical entities.
// Cloud Environment: Users created for persons, communication and printing are owned by the customer.
// All other users are owned by SAP.
// On Premise Environment: All users are owned by the customer.
//
// 2. Restrictions:
// Because any kind of user can create or change data in the system,
// fields like "CreatedByUser" or "LastChangedByUser" must refer to this entity by a "[0..1]" association
// to obtain a descriptive text of the user.
// -> Do not assume that the target of the association exists.
// -> Do not assume that such a user always corresponds to a business partner of type person ('BP person').
//
// This view must not be exposed to end users directly, because it exposes person relevant information.
// Only use this view in the definition of context-specific consumption views as a target for the "CreatedByUser"
// and "LastChangedByUser" associations. That's why, the view definition intentionally does not contain the
// "@ObjectModel.representativeKey", "@ObjectModel.text.element" or "@Analytics..." annotations.
//
// 3. Hints/Remarks:
// For users connected to a BP person, the UserDescrition contains what was formerly known as 'Person Fullname'.
// For users having classical address (on premise only) the UserDescrition is defined by the customer.
// In this case, it rarely contains 'Person Fullname'.
// For users without address data we differentiate between cloud and on premise environment:
// -> Cloud: Preset by SAP.
// -> On Premise: Defined by the customer.
// Also here, it's quite unusual that UserDescription contains 'Person Fullname', because usually
// there is no individual person behind it. Usually it contains a description of the purpose of
// the technical entity.
define view I_User
as select from usr21
association [0..1] to I_AddrCurDefaultEmailAddress as _AddrCurDefaultEmailAddress
on usr21.persnumber = _AddrCurDefaultEmailAddress.AddressPersonID
and usr21.addrnumber = _AddrCurDefaultEmailAddress.AddressID
association [0..1] to I_UserAddress as _UserAddress
on usr21.bname = _UserAddress.UserID
{
@ObjectModel.text.element:['UserDescription']
key cast( usr21.bname as vdm_userid preserving type ) as UserID,
@Semantics.text: true
cast( usr21.techdesc as vdm_userdescription preserving type ) as UserDescription,
case usr21.idadtype
when '00' then ' ' //users having classical address (NO connection to Business Partner)
when '02' then ' ' //users connected to a BP person
when '03' then ' ' //users connected to a BP person with a relation to a BP Organization
when '04' then ' ' //users connected to a BP person and have a BP workplace address
else 'X' //users without address data (intended for technical purposes only)
end as IsTechnicalUser,
_AddrCurDefaultEmailAddress,
@Consumption.hidden:true
@Analytics.hidden:true
usr21.persnumber as AddressPersonID,
@Consumption.hidden:true
@Analytics.hidden:true
usr21.addrnumber as AddressID,
_UserAddress
}
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA