SRFD_DocumentDataFilterBase

DDL: SRFD_DOCUMENTDATAFILTERBASE Type: view_entity Package: GLO_GEN_SRF_RUNTIME

Base view for preview filter grouping

SRFD_DocumentDataFilterBase is a CDS View that provides data about "Base view for preview filter grouping" in SAP S/4HANA. It reads from 2 data sources (SRFD_DocumentData, srf_element) and exposes 17 fields with key fields StatryRptDocUUID, StatryRptTaskUUID, StatryRptSchemaElementId, StatryRptSchemaAttributeId, StatryRptSequenceNumber. It has 3 associations to related views. Part of development package GLO_GEN_SRF_RUNTIME.

Data Sources (2)

SourceAliasJoin Type
SRFD_DocumentData RunData from
srf_element SchElem inner

Parameters (4)

NameTypeDefault
p_partition_no srf_partition_no
p_element_id srf_element_id
p_schema_id srf_schema_id
p_log_version srf_dmlg_version

Associations (3)

CardinalityTargetAliasCondition
[0..*] srf_rep_run_dmlg _RunLog RunData.StatryRptDocUUID = _RunLog.parent_key and RunData.StatryRptSchemaElementId = _RunLog.element_id and RunData.StatryRptSequenceNumber = _RunLog.sequence_no and RunData.StatryRptParentSequenceNumber = _RunLog.parent_seq_no and _RunLog.dmlg_version = $parameters.p_log_version and (_RunLog.change_indicator = '' or _RunLog.change_indicator = 'N' )
[1] srf_rep_run_data _RunDataParent _RunDataParent.parent_key = RunData.StatryRptDocUUID and _RunDataParent.root_key = RunData.StatryRptTaskUUID and _RunDataParent.element_id = SchElem.parent_element_id and _RunDataParent.attribute_id is initial and _RunDataParent.sequence_no = RunData.StatryRptParentSequenceNumber and _RunDataParent.partition_no = $parameters.p_partition_no
[0..1] SRFD_DocumentData _RefElem RunData.StatryRptDocUUID = _RefElem.StatryRptDocUUID and RunData.StatryRptTaskUUID = _RefElem.StatryRptTaskUUID and SchElem.reference_element_id = _RefElem.StatryRptSchemaElementId and RunData.StatryRptSequenceNumber = _RefElem.StatryRptSequenceNumber and RunData.StatryRptParentSequenceNumber = _RefElem.StatryRptParentSequenceNumber

Annotations (6)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Base view for preview filter grouping view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #S view
ObjectModel.usageType.dataClass #MIXED view

Fields (17)

KeyFieldSource TableSource FieldDescription
KEY StatryRptDocUUID SRFD_DocumentData StatryRptDocUUID
KEY StatryRptTaskUUID SRFD_DocumentData StatryRptTaskUUID
KEY StatryRptSchemaElementId SRFD_DocumentData StatryRptSchemaElementId
KEY StatryRptSchemaAttributeId SRFD_DocumentData StatryRptSchemaAttributeId
KEY StatryRptSequenceNumber SRFD_DocumentData StatryRptSequenceNumber
KEY StatryRptParentSequenceNumber SRFD_DocumentData StatryRptParentSequenceNumber
StatryRptDocDataChangeInd SRFD_DocumentData StatryRptDocDataChangeInd
StatryRptPreviousSeqNo SRFD_DocumentData StatryRptPreviousSeqNo
StatryRptSubordinalNo SRFD_DocumentData StatryRptSubordinalNo
StatryRptLogVersion
StatryRptPartitionNo
StatryRptSchemaParentElementId srf_element parent_element_id
StatryRptSchemaRefElementId srf_element reference_element_id
StatryRptDocDataValue SRFD_DocumentData StatryRptDocDataValue
_RunLog _RunLog
_RunDataParent _RunDataParent
_RefElem _RefElem
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Base view for preview filter grouping'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
  serviceQuality: #X,
  sizeCategory: #S,
  dataClass: #MIXED
}
define view entity SRFD_DocumentDataFilterBase
  with parameters
    p_doc_uuid    : /bobf/conf_key,
    @Consumption.defaultValue: '0'
    p_partition_no : srf_partition_no, 
    p_element_id  : srf_element_id,
    p_schema_id   : srf_schema_id,
    @Consumption.defaultValue: 'GEN'
    p_log_version : srf_dmlg_version
  as select from SRFD_DocumentData as RunData
    inner join   srf_element       as SchElem on  SchElem.element_id     = RunData.StatryRptSchemaElementId
                                              and SchElem.schema_id      = $parameters.p_schema_id
                                              and SchElem.schema_version = 'ACT'
  //left outer join srf_rep_run_dmlg  as RunLog

  association [0..*] to srf_rep_run_dmlg  as _RunLog        on  RunData.StatryRptDocUUID              = _RunLog.parent_key
                                                            and RunData.StatryRptSchemaElementId      = _RunLog.element_id
                                                            and RunData.StatryRptSequenceNumber       = _RunLog.sequence_no
                                                            and RunData.StatryRptParentSequenceNumber = _RunLog.parent_seq_no
                                                            and _RunLog.dmlg_version                  = $parameters.p_log_version
                                                            and (_RunLog.change_indicator = '' or _RunLog.change_indicator = 'N' )
  association [1] to srf_rep_run_data  as _RunDataParent on  _RunDataParent.parent_key   = RunData.StatryRptDocUUID
                                                            and _RunDataParent.root_key     = RunData.StatryRptTaskUUID
                                                            and _RunDataParent.element_id   = SchElem.parent_element_id
                                                            and _RunDataParent.attribute_id is initial
                                                            and _RunDataParent.sequence_no  = RunData.StatryRptParentSequenceNumber
                                                            and _RunDataParent.partition_no = $parameters.p_partition_no
  association [0..1] to SRFD_DocumentData as _RefElem       on  RunData.StatryRptDocUUID              = _RefElem.StatryRptDocUUID
                                                            and RunData.StatryRptTaskUUID             = _RefElem.StatryRptTaskUUID
                                                            and SchElem.reference_element_id          = _RefElem.StatryRptSchemaElementId
                                                            and RunData.StatryRptSequenceNumber       = _RefElem.StatryRptSequenceNumber
                                                            and RunData.StatryRptParentSequenceNumber = _RefElem.StatryRptParentSequenceNumber
{
  key  RunData.StatryRptDocUUID,
  key  RunData.StatryRptTaskUUID,
  key  RunData.StatryRptSchemaElementId       as StatryRptSchemaElementId,
  key  RunData.StatryRptSchemaAttributeId     as StatryRptSchemaAttributeId,
  key  RunData.StatryRptSequenceNumber        as StatryRptSequenceNumber,
  key  RunData.StatryRptParentSequenceNumber  as StatryRptParentSequenceNumber,
       //SchElem.parent_element_id,

       //SchElem.max_occurs,

       case
         when RunData.StatryRptSchemaElementId = $parameters.p_element_id then RunData.StatryRptSequenceNumber
         else RunData.StatryRptParentSequenceNumber
       end                                    as StatryRptRowSequenceNo,
       RunData.StatryRptDocDataChangeInd      as StatryRptDocDataChangeInd,
       RunData.StatryRptPreviousSeqNo         as StatryRptPreviousSeqNo,
       RunData.StatryRptSubordinalNo          as StatryRptSubordinalNo,
       $parameters.p_log_version              as StatryRptLogVersion,
       $parameters.p_partition_no             as StatryRptPartitionNo,
       //RunLog.msgty                           as StatryRptMessageType



       SchElem.parent_element_id              as StatryRptSchemaParentElementId,
       SchElem.reference_element_id           as StatryRptSchemaRefElementId,
       RunData.StatryRptDocDataValue          as StatryRptDocDataValue,


       _RunLog,
       _RunDataParent,
       _RefElem
}
where
  (
            RunData.StatryRptDocUUID  = $parameters.p_doc_uuid
    and     RunData.StatryRptPartitionNo = $parameters.p_partition_no
    and     RunData.StatryRptDocDataChangeInd <> 'DE'
    and(
            SchElem.element_id        = $parameters.p_element_id
      or(
            SchElem.parent_element_id = $parameters.p_element_id
        and SchElem.max_occurs        = 1
      )
    )
  )