aps_iam_app_core

DDL: APS_IAM_APP_CORE Type: view_entity Package: SR_APS_IAM_APP_CORE

IAM: App - App Core View

aps_iam_app_core is a CDS View that provides data about "IAM: App - App Core View" in SAP S/4HANA. It reads from 5 data sources (aps_iam_w_bu_cat, aps_iam_w_bc_app, aps_iam_c_app, tadir, p_aps_iam_feature_scope_c) and exposes 9 fields with key field AppID. Part of development package SR_APS_IAM_APP_CORE.

Data Sources (5)

SourceAliasJoin Type
aps_iam_w_bu_cat bc left_outer
aps_iam_w_bc_app bc_app left_outer
aps_iam_c_app scope left_outer
tadir td left_outer
p_aps_iam_feature_scope_c toggl inner

Annotations (2)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label IAM: App - App Core View view

Fields (9)

KeyFieldSource TableSource FieldDescription
KEY AppID app app_id
TransactionCode app tcode
UIAppID app ui_app_id
ChangedOn app change_timestamp
ChangedBy app change_user
AppType app app_type
ABAPLanguageVersion app abap_language_version
ScopeState aps_iam_c_app scope_state
ScopeDependent app scope_dependent
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'IAM: App - App Core View'

define view entity aps_iam_app_core
  as select distinct from aps_iam_w_app             as app

  // Remove AAV that are not in a migrated catalog (Internal system: ready for testing treated as finished)

    left outer join       aps_iam_w_bc_app          as bc_app on bc_app.app_id = app.app_id
    left outer join       aps_iam_w_bu_cat          as bc     on bc.bu_catalog_id = bc_app.bu_catalog_id
    left outer join       tadir                     as td     on  td.pgmid    = 'R3TR'
                                                              and td.object   = 'DEVC'
                                                              and td.obj_name = 'SR_APS_IAM_IAM_HOME'

  // Only show Scope Dependent Apps if they are in scope

    left outer join       aps_iam_c_app             as scope  on scope.app_id = app.app_id

  // Only show AAV if feature toggle is enabled

    inner join            p_aps_iam_feature_scope_c as toggl  on toggl.FeatureToggle = 'APS_IAM_APP_AS_ENTITY'
{
  key app.app_id                  as AppID,

      cast(
        app.read_only
      as boole_d preserving type) as ReadOnly,

      app.tcode                   as TransactionCode,
      app.ui_app_id               as UIAppID,

      app.change_timestamp        as ChangedOn,
      app.change_user             as ChangedBy,

      cast(
        app.forbid_use_with_successor
      as boole_d preserving type) as ForbiddenWithSuccessors,
      cast(
        app.no_direct_assignment
      as boole_d preserving type) as NoDirectAssignment,
      cast(
        app.exclude_start_auth
      as boole_d preserving type) as ExcludeStartAuthorization,

      app.app_type                as AppType,
      app.abap_language_version   as ABAPLanguageVersion,

      scope.scope_state           as ScopeState,
      app.scope_dependent         as ScopeDependent
}
where
  // In customer systems only show apps of type TRAN if they are assigned to a migrated Business Catalog

  // In internal systems show every app of type TRAN if they are assigned to any Business Catalog

  (
          app.app_type            <> 'TRAN'
    or    bc.app_migration_status =  '3'
    //    or(

    //          bc.app_migration_status =  '2'

    //      and td.obj_name             =  'SR_APS_IAM_HOME'

    //    )

    or(
          bc.bu_catalog_id        is not initial
      and td.obj_name             =  'SR_APS_IAM_IAM_HOME'
    )
  )
  // Only show scope dependent apps if they are in scope

  and(
          app.scope_dependent     <> 'X'
    or    scope.scope_state       <> '1'
  )
  // Only show apps of type TRAN if feature toggle is enabled

  and(
          app.app_type            <> 'TRAN'
    or    toggl.Status            =  'X'
  )