I_NotifTaskTimeStamps

DDL: I_NOTIFTASKTIMESTAMPS Type: view_entity COMPOSITE Package: VDM_QM_NOTIFICATION

Notification Task Time Stamps

I_NotifTaskTimeStamps is a Composite CDS View that provides data about "Notification Task Time Stamps" in SAP S/4HANA. It reads from 2 data sources (I_QltyMgmtSystAndUsrTmeZn, I_NotificationTask) and exposes 14 fields with key fields Notification, NotificationTask. Part of development package VDM_QM_NOTIFICATION.

Data Sources (2)

SourceAliasJoin Type
I_QltyMgmtSystAndUsrTmeZn _QltyMgmtSystAndUsrTmeZn left_outer
I_NotificationTask I_NotificationTask from

Parameters (1)

NameTypeDefault
P_QltyTimeStampPrepOptn vdm_qltytimestampprepoptn

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
AccessControl.personalData.blocking #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
EndUserText.label Notification Task Time Stamps view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.serviceQuality #A view

Fields (14)

KeyFieldSource TableSource FieldDescription
KEY Notification I_NotificationTask Notification
KEY NotificationTask I_NotificationTask NotificationTask
QltyMgmtSystemTimeZone I_QltyMgmtSystAndUsrTmeZn QltyMgmtSystemTimeZone
QltyMgmtUserTimeZone I_QltyMgmtSystAndUsrTmeZn QltyMgmtUserTimeZone
NotifTaskPlannedEndDate I_NotificationTask NotifTaskPlannedEndDate
NotifTaskPlannedEndTime I_NotificationTask NotifTaskPlannedEndTime
NotifTaskCompletionDate I_NotificationTask NotifTaskCompletionDate
NotifTaskCompletionTime I_NotificationTask NotifTaskCompletionTime
NotifTaskResubmissionDate I_NotificationTask NotifTaskResubmissionDate
NotifTaskResubmissionTime I_NotificationTask NotifTaskResubmissionTime
CreationDate I_NotificationTask CreationDate
CreationTime I_NotificationTask CreationTime
LastChangeDate I_NotificationTask LastChangeDate
LastChangeTime I_NotificationTask LastChangeTime
@AccessControl.authorizationCheck: #PRIVILEGED_ONLY
@AccessControl.personalData.blocking: #NOT_REQUIRED

@VDM.viewType: #COMPOSITE

@EndUserText.label: 'Notification Task Time Stamps'
@ObjectModel: {
    usageType: {
        dataClass: #TRANSACTIONAL,
        sizeCategory: #L,
        serviceQuality: #A }
} 

define view entity I_NotifTaskTimeStamps
  with parameters
      P_QltyTimeStampPrepOptn: vdm_qltytimestampprepoptn  // Conversion Option 0 = UTC Time Stamps will be create all time; 1 = UTC Time Stamps will only be created if a converion is necessary


  as select from I_NotificationTask
    left outer join I_QltyMgmtSystAndUsrTmeZn as _QltyMgmtSystAndUsrTmeZn  //left outer join instead of inner join due to performance reasons

      on _QltyMgmtSystAndUsrTmeZn.SAPClient = $session.client

{
//=== Key Fields

    key I_NotificationTask.Notification,
    key I_NotificationTask.NotificationTask,
 
//=== System and User Time Zone

    _QltyMgmtSystAndUsrTmeZn.QltyMgmtSystemTimeZone,
    _QltyMgmtSystAndUsrTmeZn.QltyMgmtUserTimeZone,
    
//=== Planned End Date, Time and Time Stamp in UTC

    I_NotificationTask.NotifTaskPlannedEndDate,
    I_NotificationTask.NotifTaskPlannedEndTime,
    
    case $parameters.P_QltyTimeStampPrepOptn
      when '1' //UTC Time Stamps will only be created if a converion is necessary 

        then case when(    I_NotificationTask.NotifTaskPlannedEndDate <> '00000000'
                       and (    (I_NotificationTask.NotifTaskTimeZone <> '' and I_NotificationTask.NotifTaskTimeZone <> _QltyMgmtSystAndUsrTmeZn.QltyMgmtUserTimeZone)
                             or (I_NotificationTask.NotifTaskTimeZone = ''  and _QltyMgmtSystAndUsrTmeZn.QltyMgmtSystemTimeZone <> _QltyMgmtSystAndUsrTmeZn.QltyMgmtUserTimeZone ))) 
                      
                    then case when(I_NotificationTask.NotifTaskTimeZone = '') 
                                then dats_tims_to_tstmp(I_NotificationTask.NotifTaskPlannedEndDate, I_NotificationTask.NotifTaskPlannedEndTime, _QltyMgmtSystAndUsrTmeZn.QltyMgmtSystemTimeZone, $session.client, 'INITIAL')
                                else dats_tims_to_tstmp(I_NotificationTask.NotifTaskPlannedEndDate, I_NotificationTask.NotifTaskPlannedEndTime, I_NotificationTask.NotifTaskTimeZone, $session.client, 'INITIAL') 
                         end 
                    else 0
             end

      else //UTC Time Stamps will be create all time

        case when(I_NotificationTask.NotifTaskPlannedEndDate <> '00000000')
               then case when(I_NotificationTask.NotifTaskTimeZone = '') 
                           then dats_tims_to_tstmp(I_NotificationTask.NotifTaskPlannedEndDate, I_NotificationTask.NotifTaskPlannedEndTime, _QltyMgmtSystAndUsrTmeZn.QltyMgmtSystemTimeZone, $session.client, 'INITIAL')
                           else dats_tims_to_tstmp(I_NotificationTask.NotifTaskPlannedEndDate, I_NotificationTask.NotifTaskPlannedEndTime, I_NotificationTask.NotifTaskTimeZone, $session.client, 'INITIAL')
                    end
               else 0 
        end 
    end as NotifTaskPlndEndDateTimeUTC,
    
//=== Completion End Date, Time and Time Stamp in UTC

    I_NotificationTask.NotifTaskCompletionDate,
    I_NotificationTask.NotifTaskCompletionTime,

    case $parameters.P_QltyTimeStampPrepOptn
      when '1' //UTC Time Stamps will only be created if a converion is necessary 

        then case when(    I_NotificationTask.NotifTaskCompletionDate <> '00000000'
                       and (    (I_NotificationTask.NotifTaskTimeZone <> '' and I_NotificationTask.NotifTaskTimeZone <> _QltyMgmtSystAndUsrTmeZn.QltyMgmtUserTimeZone)
                             or (I_NotificationTask.NotifTaskTimeZone = ''  and _QltyMgmtSystAndUsrTmeZn.QltyMgmtSystemTimeZone <> _QltyMgmtSystAndUsrTmeZn.QltyMgmtUserTimeZone ))) 
                      
                    then case when(I_NotificationTask.NotifTaskTimeZone = '') 
                                then dats_tims_to_tstmp(I_NotificationTask.NotifTaskCompletionDate, I_NotificationTask.NotifTaskCompletionTime, _QltyMgmtSystAndUsrTmeZn.QltyMgmtSystemTimeZone, $session.client, 'INITIAL')
                                else dats_tims_to_tstmp(I_NotificationTask.NotifTaskCompletionDate, I_NotificationTask.NotifTaskCompletionTime, I_NotificationTask.NotifTaskTimeZone, $session.client, 'INITIAL') 
                         end 
                    else 0
             end

      else //UTC Time Stamps will be create all time

        case when(I_NotificationTask.NotifTaskCompletionDate <> '00000000')
               then case when(I_NotificationTask.NotifTaskTimeZone = '') 
                           then dats_tims_to_tstmp(I_NotificationTask.NotifTaskCompletionDate, I_NotificationTask.NotifTaskCompletionTime, _QltyMgmtSystAndUsrTmeZn.QltyMgmtSystemTimeZone, $session.client, 'INITIAL')
                           else dats_tims_to_tstmp(I_NotificationTask.NotifTaskCompletionDate, I_NotificationTask.NotifTaskCompletionTime, I_NotificationTask.NotifTaskTimeZone, $session.client, 'INITIAL')
                    end
               else 0 
        end 
    end as NotifTaskCompletionDateTimeUTC,

//=== Resubmission Date, Time and Time Stamp in UTC

    I_NotificationTask.NotifTaskResubmissionDate,
    I_NotificationTask.NotifTaskResubmissionTime,

    case $parameters.P_QltyTimeStampPrepOptn
      when '1' //UTC Time Stamps will only be created if a converion is necessary 

        then case when(    I_NotificationTask.NotifTaskResubmissionDate <> '00000000'
                       and (    (I_NotificationTask.NotifTaskTimeZone <> '' and I_NotificationTask.NotifTaskTimeZone <> _QltyMgmtSystAndUsrTmeZn.QltyMgmtUserTimeZone)
                             or (I_NotificationTask.NotifTaskTimeZone = ''  and _QltyMgmtSystAndUsrTmeZn.QltyMgmtSystemTimeZone <> _QltyMgmtSystAndUsrTmeZn.QltyMgmtUserTimeZone ))) 
                      
                    then case when(I_NotificationTask.NotifTaskTimeZone = '') 
                                then dats_tims_to_tstmp(I_NotificationTask.NotifTaskResubmissionDate, I_NotificationTask.NotifTaskResubmissionTime, _QltyMgmtSystAndUsrTmeZn.QltyMgmtSystemTimeZone, $session.client, 'INITIAL')
                                else dats_tims_to_tstmp(I_NotificationTask.NotifTaskResubmissionDate, I_NotificationTask.NotifTaskResubmissionTime, I_NotificationTask.NotifTaskTimeZone, $session.client, 'INITIAL') 
                         end 
                    else 0
             end

      else //UTC Time Stamps will be create all time

        case when(I_NotificationTask.NotifTaskResubmissionDate <> '00000000')
               then case when(I_NotificationTask.NotifTaskTimeZone = '') 
                           then dats_tims_to_tstmp(I_NotificationTask.NotifTaskResubmissionDate, I_NotificationTask.NotifTaskResubmissionTime, _QltyMgmtSystAndUsrTmeZn.QltyMgmtSystemTimeZone, $session.client, 'INITIAL')
                           else dats_tims_to_tstmp(I_NotificationTask.NotifTaskResubmissionDate, I_NotificationTask.NotifTaskResubmissionTime, I_NotificationTask.NotifTaskTimeZone, $session.client, 'INITIAL')
                    end
               else 0 
        end 
    end as NotifTaskResubmsnDateTimeUTC,

//=== Creation Date, Time and Time Stamp in UTC

    I_NotificationTask.CreationDate,
    I_NotificationTask.CreationTime,
    
    case $parameters.P_QltyTimeStampPrepOptn
      when '1' //UTC Time Stamps will only be created if a converion is necessary 

        then case when(    I_NotificationTask.CreationDate <> '00000000'
                       and (    (I_NotificationTask.NotifTaskTimeZone <> '' and I_NotificationTask.NotifTaskTimeZone <> _QltyMgmtSystAndUsrTmeZn.QltyMgmtUserTimeZone)
                             or (I_NotificationTask.NotifTaskTimeZone = ''  and _QltyMgmtSystAndUsrTmeZn.QltyMgmtSystemTimeZone <> _QltyMgmtSystAndUsrTmeZn.QltyMgmtUserTimeZone ))) 
                      
                    then case when(I_NotificationTask.NotifTaskTimeZone = '') 
                                then dats_tims_to_tstmp(I_NotificationTask.CreationDate, I_NotificationTask.CreationTime, _QltyMgmtSystAndUsrTmeZn.QltyMgmtSystemTimeZone, $session.client, 'INITIAL')
                                else dats_tims_to_tstmp(I_NotificationTask.CreationDate, I_NotificationTask.CreationTime, I_NotificationTask.NotifTaskTimeZone, $session.client, 'INITIAL') 
                         end 
                    else 0
             end

      else //UTC Time Stamps will be create all time

        case when(I_NotificationTask.CreationDate <> '00000000')
               then case when(I_NotificationTask.NotifTaskTimeZone = '') 
                           then dats_tims_to_tstmp(I_NotificationTask.CreationDate, I_NotificationTask.CreationTime, _QltyMgmtSystAndUsrTmeZn.QltyMgmtSystemTimeZone, $session.client, 'INITIAL')
                           else dats_tims_to_tstmp(I_NotificationTask.CreationDate, I_NotificationTask.CreationTime, I_NotificationTask.NotifTaskTimeZone, $session.client, 'INITIAL')
                    end
               else 0 
        end 
    end as NotifTaskCreationDateTimeUTC,

//=== Last Change Date, Time and Time Stamp in UTC

    I_NotificationTask.LastChangeDate,
    I_NotificationTask.LastChangeTime,
    
    case $parameters.P_QltyTimeStampPrepOptn
      when '1' //UTC Time Stamps will only be created if a converion is necessary 

        then case when(    I_NotificationTask.LastChangeDate <> '00000000'
                       and (    (I_NotificationTask.NotifTaskTimeZone <> '' and I_NotificationTask.NotifTaskTimeZone <> _QltyMgmtSystAndUsrTmeZn.QltyMgmtUserTimeZone)
                             or (I_NotificationTask.NotifTaskTimeZone = ''  and _QltyMgmtSystAndUsrTmeZn.QltyMgmtSystemTimeZone <> _QltyMgmtSystAndUsrTmeZn.QltyMgmtUserTimeZone ))) 
                      
                    then case when(I_NotificationTask.NotifTaskTimeZone = '') 
                                then dats_tims_to_tstmp(I_NotificationTask.LastChangeDate, I_NotificationTask.LastChangeTime, _QltyMgmtSystAndUsrTmeZn.QltyMgmtSystemTimeZone, $session.client, 'INITIAL')
                                else dats_tims_to_tstmp(I_NotificationTask.LastChangeDate, I_NotificationTask.LastChangeTime, I_NotificationTask.NotifTaskTimeZone, $session.client, 'INITIAL') 
                         end 
                    else 0
             end

      else //UTC Time Stamps will be create all time

        case when(I_NotificationTask.LastChangeDate <> '00000000')
               then case when(I_NotificationTask.NotifTaskTimeZone = '') 
                           then dats_tims_to_tstmp(I_NotificationTask.LastChangeDate, I_NotificationTask.LastChangeTime, _QltyMgmtSystAndUsrTmeZn.QltyMgmtSystemTimeZone, $session.client, 'INITIAL')
                           else dats_tims_to_tstmp(I_NotificationTask.LastChangeDate, I_NotificationTask.LastChangeTime, I_NotificationTask.NotifTaskTimeZone, $session.client, 'INITIAL')
                    end
               else 0 
        end 
    end as NotifTaskLastChangeDateTimeUTC
}