APS_COM_CHG_DOC_BASE
Change documents base view
APS_COM_CHG_DOC_BASE is a CDS View in S/4HANA. Change documents base view. It contains 19 fields. 2 CDS views read from this table.
CDS Views using this table (2)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| APS_COM_CA_CDOC_GEN | view_entity | from | Communication Arr. change documents for general changes | |
| APS_COM_CS_D2_CDOC_GEN | view_entity | from | Com. Sys. change docs (general changes) |
Fields (19)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | Action | Action | 2 |
| KEY | CDoc | CDoc | 2 |
| KEY | CDocClass | CDocClass | 2 |
| KEY | CDocKey | CDocKey | 2 |
| KEY | DBTable | ChangeCategory | 1 |
| KEY | DBTableKey | DBTableKey | 2 |
| KEY | FieldName | FieldName | 2 |
| ActionTxt | ActionTxt | 2 | |
| Attribute | Attribute | 2 | |
| AttributeText | AttributeText | 1 | |
| ChangedAt | ChangedAt | 2 | |
| CreatedByUser | ChangedByUser | 2 | |
| CreatedByUsrTxt | ChangedByUserTxt | 2 | |
| CreationDate | ChangedDate | 2 | |
| CreationTime | ChangedTime | 2 | |
| DBTableKeyUUID | DBTableKeyUUID | 1 | |
| DBTableText | ChangeCategoryText | 2 | |
| NewValue | NewValue | 2 | |
| OldValue | OldValue | 2 |
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Change documents base view'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
serviceQuality: #X,
sizeCategory: #M,
dataClass: #MIXED
}
define view entity APS_COM_CHG_DOC_BASE
as select from I_ChangeDocument as changedoc
inner join I_ChangeDocumentItem as p on(
p.ChangeDocObject = changedoc.ChangeDocObject
and p.ChangeDocument = changedoc.ChangeDocument
)
left outer join APS_COM_STRUCT_COMP_DTEL_TXT as tablFields on tablFields.TableName = p.DatabaseTable
and tablFields.FieldName = p.ChangeDocDatabaseTableField
left outer join dd02t as StructureText on StructureText.tabname = p.DatabaseTable
and StructureText.as4local = 'A'
and StructureText.as4vers = '0000'
and StructureText.ddlanguage = $session.system_language
left outer join t100 as _Text_Created on _Text_Created.sprsl = $session.system_language
and _Text_Created.arbgb = 'APS_COM_COMMON'
and _Text_Created.msgnr = '027'
left outer join t100 as _Text_Changed on _Text_Changed.sprsl = $session.system_language
and _Text_Changed.arbgb = 'APS_COM_COMMON'
and _Text_Changed.msgnr = '028'
left outer join t100 as _Text_Deleted on _Text_Deleted.sprsl = $session.system_language
and _Text_Deleted.arbgb = 'APS_COM_COMMON'
and _Text_Deleted.msgnr = '029'
association [0..1] to aps_user_ddl as _user on changedoc.CreatedByUser = _user.UserID
{
key changedoc.ChangeDocObjectClass as CDocClass,
key changedoc.ChangeDocObject as CDocKey,
key changedoc.ChangeDocument as CDoc,
key p.DatabaseTable as DBTable,
key p.ChangeDocTableKey as DBTableKey,
key p.ChangeDocDatabaseTableField as FieldName,
key p.ChangeDocItemChangeType as Action,
case $projection.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,
StructureText.ddtext as DBTableText,
changedoc.CreatedByUser as CreatedByUser,
_user.UserDescription as CreatedByUsrTxt,
changedoc.CreationDate as CreationDate,
changedoc.CreationTime as CreationTime,
concat($projection.CreationDate, $projection.CreationTime) as ChangedAt,
tablFields.DataElement as Attribute,
tablFields.DataElementLongText as AttributeText,
p.ChangeDocNewFieldValue as NewValue,
p.ChangeDocPreviousFieldValue as OldValue,
// if db table key is a uuid, cast it to according length. can be used in other views
cast( ltrim( $projection.DBTableKey, ' ' ) as abap.char(32) ) as DBTableKeyUUID
}