P_USERCREATIONTIMESTAMPS
Retrieve user creation timestamps from change documents
P_USERCREATIONTIMESTAMPS is a CDS View that provides data about "Retrieve user creation timestamps from change documents" in SAP S/4HANA. It reads from 2 data sources (SUIM_CHDOC_USR_HEAD_01, usr02) and exposes 3 fields with key field bname. Part of development package SUSR_CONFIG_TOOLS.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| SUIM_CHDOC_USR_HEAD_01 | suim_view | from |
| usr02 | user_exists | inner |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.extensibility.extensible | false | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| Metadata.ignorePropagatedAnnotations | false | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #MIXED | view |
Fields (3)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | bname | SUIM_CHDOC_USR_HEAD_01 | bname | |
| class | usr02 | class | ||
| clientINITIALasTimestampUserCreation |
@AbapCatalog: { viewEnhancementCategory: [ #NONE ]
, extensibility: { extensible: false } }
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private: true
//@EndUserText.label: 'Retrieve user creation timestamps from change documents'
@Metadata.ignorePropagatedAnnotations: false
@ObjectModel.usageType:{
serviceQuality: #X,
sizeCategory: #L,
dataClass: #MIXED
}
//---------------------------------------------------------------------------------
// retrieve user creation date and time from change documents
// convert creation date and time into timestamps
//---------------------------------------------------------------------------------
define view entity P_USERCREATIONTIMESTAMPS
as select from SUIM_CHDOC_USR_HEAD_01 as suim_view
inner join usr02 as user_exists on user_exists.bname = suim_view.bname
and user_exists.erdat = suim_view.chg_date
{
key suim_view.bname as bname,
user_exists.class as class,
dats_tims_to_tstmp( suim_view.chg_date, //date
max( suim_view.chg_time ), //time
cast('UTC' as abap.char(6)), //no timezoneshift
$session.client, //client
'INITIAL' ) //error returns initial value
as TimestampUserCreation
}
where
suim_view.action = 'I' //created
and user_exists.usr_created_on_datetime is initial //ignore users where field is already filled
group by
suim_view.bname,
user_exists.class,
suim_view.chg_date
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