swf_daag_retention_time

DDL: SWF_DAAG_RETENTION_TIME SQL: SWFDAAGRETTIM Type: view

Retention times of final WF instances

swf_daag_retention_time is a CDS View that provides data about "Retention times of final WF instances" in SAP S/4HANA. It reads from 1 data source (SWF_DAAG_RETENTION_SETTINGS) and exposes 7 fields with key fields topLevelTask, workflowInstance.

Data Sources (1)

SourceAliasJoin Type
SWF_DAAG_RETENTION_SETTINGS SWF_DAAG_RETENTION_SETTINGS from

Annotations (5)

NameValueLevelField
AbapCatalog.sqlViewName SWFDAAGRETTIM view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Retention times of final WF instances view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY topLevelTask topLevelTask Task
KEY workflowInstance workflowInstance WorkItem ID
finishTimestamp finishTimestamp Completed
taskSettingExists taskSettingExists
retentionTimeInDays retentionTimeInDays
systemRetentionTimeInDays systemRetentionTimeInDays
dec150endasretentionTimeEnd

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view swf_daag_retention_time.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: SWFDAAGRETTIM

CREATE VIEW swf_daag_retention_time AS
SELECT
  topLevelTask,
  workflowInstance,
  finishTimestamp,
  taskSettingExists,
  retentionTimeInDays,
  systemRetentionTimeInDays,
  case when taskSettingExists = 'X' and retentionTimeInDays > -1 then tstmp_add_seconds( finishTimestamp, cast( ( 24 * 60 * 60 * retentionTimeInDays ) as abap.dec(15,0) ), 'INITIAL' ) when systemRetentionTimeInDays is not null and systemRetentionTimeInDays is not initial and systemRetentionTimeInDays > -1 and taskSettingExists = '' then tstmp_add_seconds( finishTimestamp, cast( ( 24 * 60 * 60 * systemRetentionTimeInDays ) as abap.dec(15,0) ), 'INITIAL' ) else cast( '99991231235959' as abap.dec( 15, 0 ) ) end as retentionTimeEnd AS dec150endasretentionTimeEnd
FROM SWF_DAAG_RETENTION_SETTINGS
;