I_SHIFTNOTE

CDS View

Shift Note

I_SHIFTNOTE is a CDS View in S/4HANA. Shift Note. It contains 2 fields. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
I_ShiftNoteDocumentLink view_entity from COMPOSITE Shift Note Document Link

Fields (2)

KeyField CDS FieldsUsed in Views
ShiftNoteID ShiftNoteID 1
ShiftNoteType ShiftNoteType 1
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #NOT_REQUIRED
@AccessControl.privilegedAssociations: ['_CreatedByUser', '_LastChangedByUser', '_ReportedByUser']
@Consumption.ranked: true
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.modelingPattern: #NONE
@ObjectModel.supportedCapabilities: [#CDS_MODELING_DATA_SOURCE, #SQL_DATA_SOURCE, #SEARCHABLE_ENTITY]
@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #L, dataClass: #TRANSACTIONAL}
@Search.searchable: true
@VDM.lifecycle.contract.type: #PUBLIC_LOCAL_API
@VDM.viewType: #COMPOSITE
@EndUserText.label: 'Shift Note'

define view entity I_ShiftNote
    as select from I_Notification as sn
    association [1..1] to I_User             as _CreatedByUser     on  $projection.CreatedByUser = _CreatedByUser.UserID
    association [0..1] to I_User             as _LastChangedByUser on  $projection.LastChangedByUser = _LastChangedByUser.UserID
    association [0..1] to I_User             as _ReportedByUser    on  $projection.ReportedByUser = _ReportedByUser.UserID
    association [1..1] to I_NotificationType as _ShiftNoteType     on  $projection.ShiftNoteType = _ShiftNoteType.NotificationType
    association [0..1] to I_WorkCenter       as _WorkCenter        on  $projection.ShiftNoteWorkCenterInternalID = _WorkCenter.WorkCenterInternalID
                                                                   and $projection.ShiftNoteWorkCenterType       = _WorkCenter.WorkCenterTypeCode
--  to reference
    association [0..1] to I_ShiftNoteReferenceObject as _ReferenceObject on $projection.ShiftNoteID = _ReferenceObject.ShiftNoteID
--  to documents
    association [0..*] to I_ShiftNoteDocumentLink    as _DocumentLink    on $projection.ShiftNoteID = _DocumentLink.ShiftNoteID

{
      @ObjectModel.text.element: ['ShiftNoteText']
      @Search: {defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.9}
  key cast(sn.Notification as cocf_sn_id preserving type)         as ShiftNoteID,

      // Admin data

      @Semantics.user.createdBy: true
      sn.CreatedByUser,
      @Semantics.systemDate.createdAt: true
      sn.CreationDate,
      @Semantics.user.lastChangedBy: true
      sn.LastChangedByUser,
      @Semantics.systemDate.lastChangedAt: true
      sn.LastChangedDate,
      sn.ChangedDateTime,
      sn.NotificationReportingDate                                as ReportingDate,
      sn.ReportedByUser,
      cast(sn.IsDeleted as aufloekz preserving type)              as ShiftNoteIsMarkedForDeletion,

      // Notification data

      @ObjectModel.foreignKey.association: '_ShiftNoteType'
      cast(sn.NotificationType as cocf_sn_sntype preserving type) as ShiftNoteType,
      @Semantics.text: true
      cast(sn.NotificationText as cocf_sn_sntext preserving type) as ShiftNoteText,
      @Consumption.hidden: true
      sn.NotificationCodeGroup,

      // Shift note data

      sn.ShiftNoteOrigin,
      @Consumption.hidden: true
      sn.ShiftNoteWorkCenterType,
      @Consumption.hidden: true
      sn.ShiftNoteWorkCenterInternalID,
      _WorkCenter.WorkCenter     as WorkCenter,
      _WorkCenter.Plant          as Plant,
      cast(sn.FunctionalLocation as ps_s4_tplnr preserving type)  as FunctionalLocation,
      sn.Equipment,

      // Associations

      _CreatedByUser,
      _LastChangedByUser,
      _ReportedByUser,
      _WorkCenter,
      _ShiftNoteType,
      _ReferenceObject,
      _DocumentLink
--    sn._NotificationCatalog,
--    sn._NotificationCodeGroup,
--    sn._NotificationCode
}
where ShiftNoteOrigin = '01'
   or ShiftNoteOrigin = '02';
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_NOTIFICATION",
"I_WORKCENTER"
],
"ASSOCIATED":
[
"I_NOTIFICATIONTYPE",
"I_SHIFTNOTEDOCUMENTLINK",
"I_SHIFTNOTEREFERENCEOBJECT",
"I_USER",
"I_WORKCENTER"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/