SAIS_USER_VALID_STATE

DDL: SAIS_USER_VALID_STATE Type: view_entity Package: SAIS_TOOLS

SUIM | Get User Valid Status

SAIS_USER_VALID_STATE is a CDS View that provides data about "SUIM | Get User Valid Status" in SAP S/4HANA. It reads from 1 data source (usr02) and exposes 8 fields with key field bname. Part of development package SAIS_TOOLS.

Data Sources (1)

SourceAliasJoin Type
usr02 usr02 from

Annotations (6)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label SUIM | Get User Valid Status view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.dataClass #MIXED view

Fields (8)

KeyFieldSource TableSource FieldDescription
KEY bname usr02 bname
class usr02 class
ustyp usr02 ustyp
uflag usr02 uflag
gltgv usr02 gltgv
gltgb usr02 gltgb
system_datethenXelseendastime_intv_valid
ustypCthenTelseXendasuser_dia_type
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'SUIM | Get User Valid Status'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
  serviceQuality: #X,
  sizeCategory: #S,
  dataClass: #MIXED
}
//----------------------------------------------------------------------

// SAIS helper view to get status flags regarding user validity status

// - used in SAIS_JOB_USER and more

// - ask the owner before reuse

//----------------------------------------------------------------------

define view entity SAIS_USER_VALID_STATE
  as select from usr02 as usr02
{
  key usr02.bname,
      usr02.class,
      usr02.ustyp,
      usr02.uflag,
      usr02.gltgv,
      usr02.gltgb,
      usr02.security_policy,
      
      case when ( usr02.gltgv is initial and usr02.gltgb is initial ) then 'X'
           when ( usr02.gltgv is initial and usr02.gltgb >= $session.system_date ) then 'X'     
           when ( usr02.gltgv  <= $session.system_date and usr02.gltgb is initial ) then 'X'      
           when ( usr02.gltgv  <= $session.system_date and usr02.gltgb >= $session.system_date ) then 'X'         
           else ''
      end   as time_intv_valid,

      case usr02.uflag
        when 0   then 'X'
        when 128 then 'X'  // Locked Due To Incorrect Logons (Limited Term) ... SSO is possible

        else ''
      end   as user_unlocked,

      case when usr02.zbvmaster = 'X' then ' '  // zbvmaster user ... no logon possible

           when usr02.ustyp     = 'L' then ' '  // reference user ... no logon possible

           when usr02.ustyp     = 'B' then 'T'  // system user ... background user (technical)

           when usr02.ustyp     = 'C' then 'T'  // communication user ... technical purpose

           else                            'X'  // local dialog and service user ... can be used in applications

      end   as user_dia_type
}