APS_COM_CHG_DOC_BASE
Change documents base view
APS_COM_CHG_DOC_BASE is a CDS View that provides data about "Change documents base view" in SAP S/4HANA. It reads from 7 data sources and exposes 19 fields with key fields CDocClass, CDocKey, CDoc, DBTable, DBTableKey. It has 1 association to related views. Part of development package SR_APS_COM_COMMON.
Data Sources (7)
| Source | Alias | Join Type |
|---|---|---|
| t100 | _Text_Changed | left_outer |
| t100 | _Text_Created | left_outer |
| t100 | _Text_Deleted | left_outer |
| I_ChangeDocument | changedoc | from |
| I_ChangeDocumentItem | p | inner |
| dd02t | StructureText | left_outer |
| APS_COM_STRUCT_COMP_DTEL_TXT | tablFields | left_outer |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | aps_user_ddl | _user | changedoc.CreatedByUser = _user.UserID |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| EndUserText.label | Change documents base view | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #M | view | |
| ObjectModel.usageType.dataClass | #MIXED | view |
Fields (19)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CDocClass | I_ChangeDocument | ChangeDocObjectClass | Change Doc. Object |
| KEY | CDocKey | I_ChangeDocument | ChangeDocObject | Object Value |
| KEY | CDoc | I_ChangeDocument | ChangeDocument | Document Number |
| KEY | DBTable | I_ChangeDocumentItem | DatabaseTable | Table Name |
| KEY | DBTableKey | I_ChangeDocumentItem | ChangeDocTableKey | Table Keys |
| KEY | FieldName | I_ChangeDocumentItem | ChangeDocDatabaseTableField | User |
| KEY | Action | I_ChangeDocumentItem | ChangeDocItemChangeType | Change Indicator |
| textelseendasActionTxt | ||||
| DBTableText | dd02t | ddtext | Short text | |
| CreatedByUser | I_ChangeDocument | CreatedByUser | User Name | |
| CreatedByUsrTxt | _user | UserDescription | Full Name | |
| CreationDate | I_ChangeDocument | CreationDate | Time Stamp | |
| CreationTime | I_ChangeDocument | CreationTime | Time of Change | |
| ChangedAt | ||||
| Attribute | APS_COM_STRUCT_COMP_DTEL_TXT | DataElement | Data Element | |
| AttributeText | APS_COM_STRUCT_COMP_DTEL_TXT | DataElementLongText | ||
| NewValue | I_ChangeDocumentItem | ChangeDocNewFieldValue | New Value | |
| OldValue | I_ChangeDocumentItem | ChangeDocPreviousFieldValue | Old Value | |
| DBTableKeyUUID |
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 APS_COM_CHG_DOC_BASE.
-- 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.
CREATE VIEW APS_COM_CHG_DOC_BASE AS
SELECT
changedoc.ChangeDocObjectClass AS CDocClass,
changedoc.ChangeDocObject AS CDocKey,
changedoc.ChangeDocument AS CDoc,
p.DatabaseTable AS DBTable,
p.ChangeDocTableKey AS DBTableKey,
p.ChangeDocDatabaseTableField AS FieldName,
p.ChangeDocItemChangeType AS Action,
case Action when 'I' then _Text_Created.text when 'J' then _Text_Created.text when 'U' then _Text_Changed.text when 'D' then _Text_Deleted.text when 'E' then _Text_Deleted.text else '' end as ActionTxt AS textelseendasActionTxt,
StructureText.ddtext AS DBTableText,
changedoc.CreatedByUser AS CreatedByUser,
_user.UserDescription AS CreatedByUsrTxt,
changedoc.CreationDate AS CreationDate,
changedoc.CreationTime AS CreationTime,
concat(CreationDate, CreationTime) AS ChangedAt,
tablFields.DataElement AS Attribute,
tablFields.DataElementLongText AS AttributeText,
p.ChangeDocNewFieldValue AS NewValue,
p.ChangeDocPreviousFieldValue AS OldValue,
cast( ltrim( DBTableKey, ' ' ) as abap.char(32) ) AS DBTableKeyUUID
FROM I_ChangeDocument AS changedoc
INNER JOIN I_ChangeDocumentItem AS p ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN APS_COM_STRUCT_COMP_DTEL_TXT AS tablFields ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN dd02t AS StructureText ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN t100 AS _Text_Created ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN t100 AS _Text_Changed ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN t100 AS _Text_Deleted ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN aps_user_ddl AS _user ON changedoc.CreatedByUser = _user.UserID -- association [0..1]
;
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