SUIM_CHDOC_USR_PROF

DDL: SUIM_CHDOC_USR_PROF Type: view_entity Package: SUIM_CHDOC

Get User Authorization Change Documents

SUIM_CHDOC_USR_PROF is a CDS View that provides data about "Get User Authorization Change Documents" in SAP S/4HANA. It reads from 3 data sources (cdhdr, cdpos, ush04_ext) and exposes 27 fields with key fields bname, modda, modti, tstmp, modbe. Part of development package SUIM_CHDOC.

Data Sources (3)

SourceAliasJoin Type
cdhdr h from
cdpos p inner
ush04_ext x union

Annotations (6)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Get User Authorization Change Documents view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.dataClass #MIXED view

Fields (27)

KeyFieldSource TableSource FieldDescription
KEY bname
KEY modda cdhdr udate
KEY modti cdhdr utime
KEY tstmp
KEY modbe cdhdr username
KEY tabname cdpos tabname
KEY fname
changenr cdhdr changenr
src_nam
chngindwhenIthen34else32endasrow_num
x_role
bnameasbname
KEY modda ush04_ext modda
KEY modti ush04_ext modti
KEY tstmp
KEY modbe ush04_ext modbe
KEY tabname
KEY fname
changenr
src_typ
src_nam
chngind ush04_ext chngind
chngindwhenIthen34else32endasrow_num
old_value ush04_ext profn_bef
new_value ush04_ext profn_new
x_role
x_prof
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Get User Authorization Change Documents'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
  serviceQuality: #X,
  sizeCategory: #S,
  dataClass: #MIXED
}
define view entity SUIM_CHDOC_USR_PROF 
 // get user profile assignment changes

 // from object class IDENTITY table SUSR_UST04

 as select from cdhdr as h
   inner join cdpos as p on ( p.objectclas = 'IDENTITY'  and  p.objectid = h.objectid and p.changenr = h.changenr )
   association to suim_chdoc_get_appl_identity as appl on ( appl.objectid = h.objectid and appl.changenr = h.changenr ) 
 {
  key substring( h.objectid, 1, 12 ) as bname,
  key h.udate                        as modda,
  key h.utime                        as modti,
  key concat( h.udate, h.utime )     as tstmp,
  key h.username                     as modbe,
  key p.tabname                      as tabname,
  key 'PROF'                         as fname,
      h.changenr                     as changenr,
      case when h.tcode > '' then 'TRAN'
           else coalesce( appl.object, '' ) 
      end                            as src_typ,
      coalesce ( appl.obj_name, h.tcode ) as src_nam,
      case when p.value_old = '' and p.value_new > '' then 'I'
           when p.value_new = '' and p.value_old > '' then 'D'
           when p.chngind  = 'U'                      then 'M'
           when p.chngind  = 'E'                      then 'D'
           else p.chngind
      end                            as chngind,
      case p.chngind
       when 'I'  then 34
                 else 32
      end                            as row_num,
      case p.chngind 
        when 'D' then substring(p.tabkey, 1, 12)
        when 'E' then substring(p.tabkey, 1, 12)
        else ''
      end as old_value,
       case p.chngind 
        when 'I' then substring(p.tabkey, 1, 12)
        else ''
      end                            as new_value,
      '<no_role>'                    as x_role,
      substring(p.tabkey, 1, 12)     as x_prof
 } 
 where h.objectclas = 'IDENTITY' and p.tabname = 'SUSR_UST04'
 
 
 // USH04_EXT contains the computed change records from USH04

 // ... table is filled by CL_SUIM_CHDOC_HELPER=>SYNC_USH04()

 union select from ush04_ext as x  
   { 
     key  x.bname                             as bname,
     key  x.modda                             as modda,
     key  x.modti                             as modti,
     key  concat( x.modda, x.modti )          as tstmp,
     key  x.modbe                             as modbe,
     key  'USH04_EXT'                         as tabname,
     key  'PROF'                              as fname,
          '1'                                 as changenr,
          ''                                  as src_typ,
          ''                                  as src_nam,
          x.chngind                           as chngind,
          case x.chngind
            when 'I'  then 34
            else 32
          end                                 as row_num,
          x.profn_bef                         as old_value,
          x.profn_new                         as new_value,          
         '<no_role>'                          as x_role,
         coalesce( x.profn_new, x.profn_bef ) as x_prof
   } 
   where chngind <> '=' and x.profn_bef <> x.profn_new