swf_daag_retention_time
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)
| Source | Alias | Join Type |
|---|---|---|
| SWF_DAAG_RETENTION_SETTINGS | SWF_DAAG_RETENTION_SETTINGS | from |
Annotations (5)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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
;
Learn More
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA