I_CHANGERECORDDOCUMENT_2
Change Record Document
I_CHANGERECORDDOCUMENT_2 is a CDS View in S/4HANA. Change Record Document. It contains 4 fields. 1 CDS views read from this table.
CDS Views using this table (1)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| R_ChgRecdRefDocTP | view_entity | inner | TRANSACTIONAL | Change Record Object Ref Doc - TP |
Fields (4)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| DocumentInfoRecordDocNumber | DocumentInfoRecord | 1 | |
| DocumentInfoRecordDocPart | DocumentPart | 1 | |
| DocumentInfoRecordDocType | DocumentType | 1 | |
| DocumentInfoRecordDocVersion | DocumentVersion | 1 |
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Change Record Document'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
serviceQuality: #C,
sizeCategory: #L,
dataClass: #TRANSACTIONAL
}
@VDM.viewType: #COMPOSITE
define view entity I_ChangeRecordDocument_2
as select from I_ChangeRecordItemDetail as Document --Old view
inner join R_CHGRECDATAMIGRATIONSTATUS as tf on(
// tf.ChgRecdDataMigrationPhase = 'X'
// )
// or(
tf.ChgRecdDataMigrationPhase = 'R'
)
association [0..1] to I_ChgRecHdrExtension as _HeaderExtension on _HeaderExtension.ParentChangeRecordUUID = Document.ChangeRecordUUID
{
key Document.ChangeRecordReferenceUUID,
Document.ChangeRecordUUID,
case when Document.ChgRecRefInternalKey1 is initial
then cast(substring( Document.ChangeRecordReference, 1, 3) as dokar)
else cast(Document.ChgRecRefInternalKey1 as dokar)
end as DocumentInfoRecordDocType,
case when Document.ChgRecRefInternalKey2 is initial
then cast(substring( Document.ChangeRecordReference, 4, 25) as doknr)
else cast(Document.ChgRecRefInternalKey2 as doknr)
end as DocumentInfoRecordDocNumber,
case when Document.ChgRecRefInternalKey3 is initial
then cast (substring( Document.ChangeRecordReference, 29, 2) as dokvr)
else cast(Document.ChgRecRefInternalKey3 as dokvr)
end as DocumentInfoRecordDocVersion,
case when Document.ChgRecRefInternalKey4 is initial
then cast(substring( Document.ChangeRecordReference, 31, 3) as doktl_d)
else cast(Document.ChgRecRefInternalKey4 as doktl_d)
end as DocumentInfoRecordDocPart
}
where Document.ChangeRecordReferenceType = 'DOC'
and _HeaderExtension.ChgRecdSilentDataMigrtnStatus <> '01'
union all select from I_ChangeRecordDocInfoRecord as Document-- New View
inner join R_CHGRECDATAMIGRATIONSTATUS as tf on(
tf.ChgRecdDataMigrationPhase = 'F'
)
or(
tf.ChgRecdDataMigrationPhase = 'R'
)
{
key Document.ChangeRecordReferenceUUID,
Document.ChangeRecordUUID,
Document.DocumentInfoRecordDocType,
Document.DocumentInfoRecordDocNumber,
Document.DocumentInfoRecordDocVersion,
Document.DocumentInfoRecordDocPart
}