I_ShiftNoteDocumentLink
Shift Note Document Link
I_ShiftNoteDocumentLink is a Composite CDS View that provides data about "Shift Note Document Link" in SAP S/4HANA. It reads from 3 data sources (I_DocumentInfoRecord, I_DocumentInfoRecordObjectLink, I_ShiftNote) and exposes 25 fields with key fields DocumentInfoRecordDocType, DocumentInfoRecordDocVersion, DocumentInfoRecordDocNumber, DocumentInfoRecordDocPart. It has 4 associations to related views.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_DocumentInfoRecord | docu | inner |
| I_DocumentInfoRecordObjectLink | link | inner |
| I_ShiftNote | note | from |
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_ChangeMaster | _ChangeNumber | $projection.ChangeNumber = _ChangeNumber.ChangeNumber |
| [0..1] | I_User | _CreatedByUser | $projection.CreatedByUser = _CreatedByUser.UserID |
| [0..1] | I_User | _ChangedByUser | $projection.LastChangedByUser = _ChangedByUser.UserID -- to child: attachments |
| [0..*] | I_DocumentInfoRecordAttachment | _DocumentAttachment | $projection.DocumentInfoRecordDocType = _DocumentAttachment.DocumentInfoRecordDocType and $projection.DocumentInfoRecordDocNumber = _DocumentAttachment.DocumentInfoRecordDocNumber and $projection.DocumentInfoRecordDocVersion = _DocumentAttachment.DocumentInfoRecordDocVersion and $projection.DocumentInfoRecordDocPart = _DocumentAttachment.DocumentInfoRecordDocPart |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #MANDATORY | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| EndUserText.label | Shift Note Document Link | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.modelingPattern | #NONE | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| VDM.lifecycle.contract.type | #PUBLIC_LOCAL_API | view | |
| VDM.viewType | #COMPOSITE | view |
Fields (25)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | DocumentInfoRecordDocType | I_DocumentInfoRecord | DocumentInfoRecordDocType | |
| KEY | DocumentInfoRecordDocVersion | |||
| KEY | DocumentInfoRecordDocNumber | |||
| KEY | DocumentInfoRecordDocPart | |||
| DocumentInfoRecord | I_DocumentInfoRecord | DocumentInfoRecord | ||
| InternalDocumentStatus | I_DocumentInfoRecord | InternalDocumentStatus | ||
| LinkedSAPObject | I_DocumentInfoRecordObjectLink | LinkedSAPObject | ||
| LinkedSAPObjectKey | I_DocumentInfoRecordObjectLink | LinkedSAPObjectKey | ||
| ChangeNumber | I_DocumentInfoRecord | ChangeNumber | ||
| CreationDateTime | ||||
| CreatedByUser | I_DocumentInfoRecord | CreatedByUser | ||
| ChangedDateTime | ||||
| LastChangedByUser | I_DocumentInfoRecord | LastChangedByUser | ||
| ShiftNoteID | I_ShiftNote | ShiftNoteID | ||
| ShiftNoteType | I_ShiftNote | ShiftNoteType | ||
| _DocumentAttachment | _DocumentAttachment | |||
| _ChangeNumber | _ChangeNumber | |||
| _CreatedByUser | _CreatedByUser | |||
| _ChangedByUser | _ChangedByUser | |||
| _Text | I_DocumentInfoRecordObjectLink | _Text | ||
| _DocType | I_DocumentInfoRecord | _DocType | ||
| _DocNumber | I_DocumentInfoRecord | _DocNumber | ||
| _DocVersion | I_DocumentInfoRecord | _DocVersion | ||
| _DocPart | I_DocumentInfoRecord | _DocPart | ||
| _DocDesc | I_DocumentInfoRecord | _DocDesc |
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #NOT_REQUIRED
@AccessControl.privilegedAssociations: ['_CreatedByUser', '_ChangedByUser']
@EndUserText.label: 'Shift Note Document Link'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.modelingPattern: #NONE
@ObjectModel.supportedCapabilities: [#CDS_MODELING_DATA_SOURCE, #SQL_DATA_SOURCE]
@ObjectModel.usageType: {serviceQuality: #C,sizeCategory: #L, dataClass: #TRANSACTIONAL}
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@VDM.viewType: #COMPOSITE
define view entity I_ShiftNoteDocumentLink
as select from I_ShiftNote as note
inner join I_DocumentInfoRecordObjectLink as link on link.LinkedSAPObjectKey = note.ShiftNoteID
inner join I_DocumentInfoRecord as docu on link.DocumentInfoRecordDocType = docu.DocumentInfoRecordDocType
and link.DocumentInfoRecordDocNumber = docu.DocumentInfoRecordDocNumber
and link.DocumentInfoRecordDocPart = docu.DocumentInfoRecordDocPart
and link.DocumentInfoRecordDocVersion = docu.DocumentInfoRecordDocVersion
association [0..1] to I_ChangeMaster as _ChangeNumber on $projection.ChangeNumber = _ChangeNumber.ChangeNumber
association [0..1] to I_User as _CreatedByUser on $projection.CreatedByUser = _CreatedByUser.UserID
association [0..1] to I_User as _ChangedByUser on $projection.LastChangedByUser = _ChangedByUser.UserID
-- to child: attachments
association [0..*] to I_DocumentInfoRecordAttachment as _DocumentAttachment on $projection.DocumentInfoRecordDocType = _DocumentAttachment.DocumentInfoRecordDocType
and $projection.DocumentInfoRecordDocNumber = _DocumentAttachment.DocumentInfoRecordDocNumber
and $projection.DocumentInfoRecordDocVersion = _DocumentAttachment.DocumentInfoRecordDocVersion
and $projection.DocumentInfoRecordDocPart = _DocumentAttachment.DocumentInfoRecordDocPart
{
@ObjectModel.text.association: '_DocDesc'
key docu.DocumentInfoRecordDocType,
key cast(docu.DocumentInfoRecordDocVersion as dokvr preserving type) as DocumentInfoRecordDocVersion,
key cast(docu.DocumentInfoRecordDocNumber as doknr preserving type) as DocumentInfoRecordDocNumber,
key cast(docu.DocumentInfoRecordDocPart as doktl_d preserving type) as DocumentInfoRecordDocPart,
// Doclink data
docu.DocumentInfoRecord,
docu.InternalDocumentStatus,
@Consumption.hidden: true
link.LinkedSAPObject,
@Consumption.hidden: true
link.LinkedSAPObjectKey,
// Admin data
docu.ChangeNumber,
@Semantics.systemDateTime.createdAt: true
cast(docu.CreationDateTime as hp_created_at preserving type) as CreationDateTime,
@Semantics.user.createdBy: true
docu.CreatedByUser,
@Semantics.systemDateTime.lastChangedAt: true
cast(docu.ChangedDateTime as hp_changed_at preserving type) as ChangedDateTime,
@Semantics.user.lastChangedBy: true
docu.LastChangedByUser,
// Shift note data
note.ShiftNoteID,
note.ShiftNoteType,
// Associations
_DocumentAttachment,
_ChangeNumber,
_CreatedByUser,
_ChangedByUser,
link._Text,
docu._DocType,
docu._DocNumber,
docu._DocVersion,
docu._DocPart,
docu._DocDesc
}
where link.LinkedSAPObject = 'PMQMEL'
or link.LinkedSAPObject = 'QMQMEL'
or link.LinkedSAPObject = 'SMQMEL'
or link.LinkedSAPObject = 'CMQMEL'
or link.LinkedSAPObject = 'NMQMEL';
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_DOCUMENTINFORECORD",
"I_DOCUMENTINFORECORDOBJECTLINK",
"I_SHIFTNOTE"
],
"ASSOCIATED":
[
"I_CHANGEMASTER",
"I_DOCUMENTINFORECORDATTACHMENT",
"I_DOCUMENTINFORECORDDESC",
"I_DOCUMENTINFORECORDDOCNUMBER",
"I_DOCUMENTINFORECORDDOCPRT",
"I_DOCUMENTINFORECORDDOCTYPE",
"I_DOCUMENTINFORECORDDOCVERSION",
"I_DOCUMENTINFORECORDOBJLINKT",
"I_USER"
],
"BASE":
[
"I_DOCUMENTINFORECORD",
"I_DOCUMENTINFORECORDOBJECTLINK"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- 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 Annotations — A Complete Guide
- 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