SRFD_DOCUMENTDATA

CDS View

Generated Document Data

SRFD_DOCUMENTDATA is a CDS View in S/4HANA. Generated Document Data. It contains 13 fields. 2 CDS views read from this table.

CDS Views using this table (2)

ViewTypeJoinVDMDescription
SRFD_DocumentDataEnriched view from Generated Document Data
SRFD_DocumentDataFilterBase view_entity from Base view for preview filter grouping

Fields (13)

KeyField CDS FieldsUsed in Views
KEY StatryRptDocDataUUID StatryRptDocDataUUID 1
KEY StatryRptDocUUID StatryRptDocUUID 2
KEY StatryRptParentSequenceNumber StatryRptParentSequenceNumber 2
KEY StatryRptSchemaAttributeId StatryRptSchemaAttributeId 2
KEY StatryRptSchemaElementId StatryRptSchemaElementId 2
KEY StatryRptSequenceNumber StatryRptSequenceNumber 2
KEY StatryRptTaskUUID StatryRptTaskUUID 2
StatryRptDocDataChangeInd StatryRptDocDataChangeInd 2
StatryRptDocDataGeneratedValue StatryRptDocDataGeneratedValue 1
StatryRptDocDataModifiedValue StatryRptDocDataModifiedValue 1
StatryRptDocDataValue StatryRptDocDataValue 2
StatryRptPreviousSeqNo StatryRptPreviousSeqNo 2
StatryRptSubordinalNo StatryRptSubordinalNo 2
@AbapCatalog.sqlViewName: 'SRFV_DOCDATA'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_ALLOWED
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Generated Document Data'
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory: #L
define view SRFD_DocumentData
  as select from srf_rep_run_data
{
      //Technical key fields

  key srf_rep_run_data.db_key           as StatryRptDocDataUUID,
      srf_rep_run_data.parent_key       as StatryRptDocUUID,
      srf_rep_run_data.root_key         as StatryRptTaskUUID,

      srf_rep_run_data.element_id       as StatryRptSchemaElementId,
      srf_rep_run_data.attribute_id     as StatryRptSchemaAttributeId,
      srf_rep_run_data.sequence_no      as StatryRptSequenceNumber,
      srf_rep_run_data.parent_seq_no    as StatryRptParentSequenceNumber,

      srf_rep_run_data.generated_value  as StatryRptDocDataGeneratedValue,
      srf_rep_run_data.modified_value   as StatryRptDocDataModifiedValue,

      case
      when srf_rep_run_data.change_indicator = 'UM'
        or srf_rep_run_data.change_indicator = 'CM'
        or srf_rep_run_data.change_indicator = 'CU'
        or srf_rep_run_data.change_indicator = 'CD'
      //Do not consider DM, as there can be repeating leaf that are not changed but deleted which should show generated value

      then srf_rep_run_data.modified_value
      else srf_rep_run_data.generated_value
      end                               as StatryRptDocDataValue,

      srf_rep_run_data.change_indicator as StatryRptDocDataChangeInd,

      //Internal fields to aid sequence number generation

      case
      when srf_rep_run_data.subordinal_no is not initial then srf_rep_run_data.previous_seq_no
      else srf_rep_run_data.sequence_no
      end                               as StatryRptPreviousSeqNo,
      srf_rep_run_data.subordinal_no    as StatryRptSubordinalNo,
      srf_rep_run_data.partition_no     as StatryRptPartitionNo
}