I_DraftAdministrativeData

DDL: I_DRAFTADMINISTRATIVEDATA SQL: SDRAFT_ADMIN_CDS Type: view

Draft Administration Data

I_DraftAdministrativeData is a CDS View that provides data about "Draft Administration Data" in SAP S/4HANA. It reads from 2 data sources (sdraft_admin, sdraft_admin_cc) and exposes 23 fields with key fields DraftUUID, DraftEntityType, DraftEntityType. It has 1 association to related views. It is exposed through 2 OData services (UI_ALTVDETERMINATION_CONFIGURE, UI_PROCESSRECEIVABLES_MANAGE).

Data Sources (2)

SourceAliasJoin Type
sdraft_admin sdraft_admin from
sdraft_admin_cc sdraft_admin_cc union_all

Associations (1)

CardinalityTargetAliasCondition
[0..*] I_DraftAdministrativeUser DraftAdministrativeUser $projection.DraftUUID = DraftAdministrativeUser.DraftUUID and $projection.DraftEntityType = DraftAdministrativeUser.DraftEntityType

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName SDRAFT_ADMIN_CDS view
AbapCatalog.compiler.compareFilter true view
ClientHandling.type #CLIENT_DEPENDENT view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
EndUserText.label Draft Administration Data view
Search.searchable true view

OData Services (2)

ServiceBindingVersionContractRelease
UI_ALTVDETERMINATION_CONFIGURE UI_ALTVDETN_CONFIGURE V2 C1 NOT_RELEASED
UI_PROCESSRECEIVABLES_MANAGE UI_PROCESSRECEIVABLES_MAN V2 C1 NOT_TO_BE_RELEASED_STABLE

Fields (23)

KeyFieldSource TableSource FieldDescription
KEY DraftUUID sdraft_admin draft_key
KEY DraftEntityType sdraft_admin draft_entity
CreationDateTime sdraft_admin created_at
CreatedByUser sdraft_admin created_by
LastChangeDateTime sdraft_admin last_changed_at
LastChangedByUser sdraft_admin last_changed_by
DraftAccessType sdraft_admin access_type
ProcessingStartDateTime sdraft_admin in_process_since
InProcessByUser sdraft_admin in_process_by
DraftIsKeptByUser sdraft_admin kept_by_user
EnqueueStartDateTime sdraft_admin enqueue_since
draft_keyasDraftUUID
KEY DraftEntityType sdraft_admin_cc draft_entity
CreationDateTime sdraft_admin_cc created_at
CreatedByUser sdraft_admin_cc created_by
LastChangeDateTime sdraft_admin_cc last_changed_at
LastChangedByUser sdraft_admin_cc last_changed_by
DraftAccessType sdraft_admin_cc access_type
ProcessingStartDateTime sdraft_admin_cc in_process_since
InProcessByUser sdraft_admin_cc in_process_by
DraftIsKeptByUser sdraft_admin_cc kept_by_user
EnqueueStartDateTime sdraft_admin_cc enqueue_since
DraftAdministrativeUser DraftAdministrativeUser
@AbapCatalog.sqlViewName: 'SDRAFT_ADMIN_CDS'
@AbapCatalog.compiler.compareFilter: true

@ClientHandling.type:              #CLIENT_DEPENDENT
@AccessControl.authorizationCheck: #PRIVILEGED_ONLY

@EndUserText.label: 'Draft Administration Data'
@AccessControl.privilegedAssociations: ['DraftAdministrativeUser']

@Search.searchable: true

define view I_DraftAdministrativeData
  as select from           sdraft_admin

    left outer to one join usr21 as CreatedByUserDesc     on CreatedByUserDesc.bname = sdraft_admin.created_by

    left outer to one join usr21 as LastChangedByUserDesc on LastChangedByUserDesc.bname = sdraft_admin.last_changed_by

    left outer to one join usr21 as InProcessByUserDesc   on InProcessByUserDesc.bname = sdraft_admin.in_process_by

    association [0..*] to I_DraftAdministrativeUser as DraftAdministrativeUser on  $projection.DraftUUID       = DraftAdministrativeUser.DraftUUID
                                                                               and $projection.DraftEntityType = DraftAdministrativeUser.DraftEntityType
{
      @UI.hidden
  key sdraft_admin.draft_key        as DraftUUID,

      @UI.hidden
  key sdraft_admin.draft_entity     as DraftEntityType,
      
      @Consumption.filter.selectionType: #INTERVAL
      sdraft_admin.created_at       as CreationDateTime,

      @ObjectModel.text.element: [ 'CreatedByUserDescription' ]
      @Search: { defaultSearchElement: true, fuzzinessThreshold: 0.8, ranking: #HIGH }
      @Consumption.valueHelpDefinition: [{ entity: { name: 'I_DraftAdministrativeUserVH', element: 'UserID' } } ]
      sdraft_admin.created_by       as CreatedByUser,
      
      @Consumption.filter.selectionType: #INTERVAL
      sdraft_admin.last_changed_at  as LastChangeDateTime,

      @ObjectModel.text.element: [ 'LastChangedByUserDescription' ]
      @Search: { defaultSearchElement: true, fuzzinessThreshold: 0.8, ranking: #HIGH }
      @Consumption.valueHelpDefinition: [{ entity: { name: 'I_DraftAdministrativeUserVH', element: 'UserID' } } ]
      sdraft_admin.last_changed_by  as LastChangedByUser,

      @UI.hidden
      sdraft_admin.access_type      as DraftAccessType,

      @UI.hidden
      sdraft_admin.in_process_since as ProcessingStartDateTime,

      @UI.hidden
      @ObjectModel.text.element: [ 'InProcessByUserDescription' ]
      @Search: { defaultSearchElement: true, fuzzinessThreshold: 0.8, ranking: #HIGH }
      sdraft_admin.in_process_by    as InProcessByUser,

      @UI.hidden
      sdraft_admin.kept_by_user     as DraftIsKeptByUser,

      @UI.hidden
      sdraft_admin.enqueue_since    as EnqueueStartDateTime,

      @UI.hidden
      cast ( case $session.user
               when sdraft_admin.created_by
                 then 'X'
                 else ' '
               end as sdraft_created_by_me preserving type
           )                        as DraftIsCreatedByMe,

      @UI.hidden
      cast ( case $session.user
               when sdraft_admin.last_changed_by
                 then 'X'
                 else ' '
             end as sdraft_last_changed_by_me preserving type
           )                        as DraftIsLastChangedByMe,

      @UI.hidden
      cast ( case $session.user
               when sdraft_admin.in_process_by
                 then 'X'
                 else ' '
             end as sdraft_in_process_by_me preserving type
           )                        as DraftIsProcessedByMe,

      @UI.hidden
      @Search: { defaultSearchElement: true, fuzzinessThreshold: 0.8, ranking: #HIGH }
      cast ( CreatedByUserDesc.techdesc
               as sdraft_created_by_desc preserving type
           )                        as CreatedByUserDescription,

      @UI.hidden
      @Search: { defaultSearchElement: true, fuzzinessThreshold: 0.8, ranking: #HIGH }
      cast ( LastChangedByUserDesc.techdesc
                as sdraft_last_changed_by_desc preserving type
           )                        as LastChangedByUserDescription,

      @UI.hidden
      @Search: { defaultSearchElement: true, fuzzinessThreshold: 0.8, ranking: #HIGH }
      cast ( InProcessByUserDesc.techdesc
                as sdraft_in_process_by_desc preserving type
           )                        as InProcessByUserDescription,

      DraftAdministrativeUser

}
union all

select from              sdraft_admin_cc

  left outer to one join usr21 as CreatedByUserDesc     on CreatedByUserDesc.bname = sdraft_admin_cc.created_by

  left outer to one join usr21 as LastChangedByUserDesc on LastChangedByUserDesc.bname = sdraft_admin_cc.last_changed_by

  left outer to one join usr21 as InProcessByUserDesc   on InProcessByUserDesc.bname = sdraft_admin_cc.in_process_by

  association [0..*] to I_DraftAdministrativeUser as DraftAdministrativeUser on  $projection.DraftUUID       = DraftAdministrativeUser.DraftUUID
                                                                             and $projection.DraftEntityType = DraftAdministrativeUser.DraftEntityType
  
{
  key sdraft_admin_cc.draft_key        as DraftUUID,

  key sdraft_admin_cc.draft_entity     as DraftEntityType,

      sdraft_admin_cc.created_at       as CreationDateTime,

      sdraft_admin_cc.created_by       as CreatedByUser,

      sdraft_admin_cc.last_changed_at  as LastChangeDateTime,

      sdraft_admin_cc.last_changed_by  as LastChangedByUser,

      sdraft_admin_cc.access_type      as DraftAccessType,

      sdraft_admin_cc.in_process_since as ProcessingStartDateTime,

      sdraft_admin_cc.in_process_by    as InProcessByUser,

      sdraft_admin_cc.kept_by_user     as DraftIsKeptByUser,

      sdraft_admin_cc.enqueue_since    as EnqueueStartDateTime,

      cast ( case $session.user
               when sdraft_admin_cc.created_by
                 then 'X'
                 else ' '
               end as sdraft_created_by_me preserving type
           )                           as DraftIsCreatedByMe,

      cast ( case $session.user
               when sdraft_admin_cc.last_changed_by
                 then 'X'
                 else ' '
             end as sdraft_last_changed_by_me preserving type
           )                           as DraftIsLastChangedByMe,

      cast ( case $session.user
               when sdraft_admin_cc.in_process_by
                 then 'X'
                 else ' '
             end as sdraft_in_process_by_me preserving type
           )                           as DraftIsProcessedByMe,

      cast ( CreatedByUserDesc.techdesc
               as sdraft_created_by_desc preserving type
           )                           as CreatedByUserDescription,

      cast ( LastChangedByUserDesc.techdesc
                as sdraft_last_changed_by_desc preserving type
           )                           as LastChangedByUserDescription,

      cast ( InProcessByUserDesc.techdesc
                as sdraft_in_process_by_desc preserving type
           )                           as InProcessByUserDescription,

      DraftAdministrativeUser
}