I_SHIFTNOTEDOCUMENTLINK

CDS View

Shift Note Document Link

I_SHIFTNOTEDOCUMENTLINK is a CDS View in S/4HANA. Shift Note Document Link. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
I_ShiftNoteAttachment view_entity from COMPOSITE Shift Note Attachment
@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":""
}
}*/