@AbapCatalog.sqlViewName: 'CPURGDOCSIM'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Purchasing Document Simulation Job'
@ObjectModel.usageType.serviceQuality: #C
@AccessControl.personalData.blocking: #REQUIRED
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.resultSet.sizeCategory: #XS
@VDM.viewType:#CONSUMPTION
@Search.searchable: true
@UI.headerInfo: {
typeName: 'Job Item',
typeNamePlural: 'Job Items',
title: { type: #STANDARD, value: 'ApplicationJobDescription' },
description: { type: #STANDARD, value: 'ReleaseDateTime' }
}
@AccessControl.privilegedAssociations: ['_UserContactCard']
define view C_PurgDocSimulationJob
as select from I_PurchasingDocSimulationJob as _SimulationJob
inner join P_AppJobStatus as _JobStatus on _JobStatus.ApplicationJobName = _SimulationJob.ApplicationJobName
and _JobStatus.ApplicationJob = _SimulationJob.ApplicationJob
association [1..*] to C_SimulationLogStatusCount as _Occurrences on $projection.SimulationJobUUID = _Occurrences.SimulationJobUUID
association [1..*] to C_PurgDocsMassChgSimlnMsgs as _PurgDocsMassChgSimlnMsgs on $projection.SimulationJobUUID = _PurgDocsMassChgSimlnMsgs.SimulationJobUUID
// association [0..1] to C_PurgDocJobErrMsgCnt as _UniqueErrWrngCnt on $projection.SimulationJobUUID = _UniqueErrWrngCnt.SimulationJobUUID
--CDS C_PurgDocJobStsMsgCnt has been replaced with P_PurgDocJobOtherMsgCnt
// association [0..1] to C_PurgDocJobStsMsgCnt as _UniqueMsgCount on $projection.SimulationJobUUID = _UniqueMsgCount.SimulationJobUUID
// association [0..1] to P_PURGDOCJOBOTHERMSGCNT as _UniqueMsgCount on $projection.SimulationJobUUID = _UniqueMsgCount.SimulationJobUUID
// association [0..1] to P_PurgDocsSimlnLogItemMsgCnt as _ItemMsgCnt on $projection.SimulationJobUUID = _ItemMsgCnt.SimulationJobUUID
association [0..1] to P_PurgDocsSimlnLgHdrMsgCnt as _DocumentMsgCnt on $projection.SimulationJobUUID = _DocumentMsgCnt.SimulationJobUUID
association [0..1] to I_UserContactCard as _UserContactCard on $projection.CreatedByUser = _UserContactCard.ContactCardID
association [0..1] to C_PurgDocCatForMntrMassChgVH as _PurchasingDocCategoryVH on $projection.PurchasingDocumentCategory = _PurchasingDocCategoryVH.PurchasingDocumentCategory
association [0..1] to C_PurchasingDocSubtypeVH as _PurchasingDocSubtypeVH on $projection.PurchasingDocumentSubtype = _PurchasingDocSubtypeVH.PurchasingDocumentSubtype
{
@UI.facet: [
{
purpose: #STANDARD,
id: 'SimulationLogStatusCount',
position: 5,
importance: #HIGH,
label: 'Messages',
type: #LINEITEM_REFERENCE,
targetQualifier: 'ErrorMessagesTable',
targetElement: '_Occurrences'
}
,
{
purpose: #STANDARD,
id: 'SimulationDocumentStatus',
position: 6,
importance: #HIGH,
label: 'Documents Affected by Errors/Warnings',
type: #LINEITEM_REFERENCE,
targetQualifier: 'DocumentStatusTable',
targetElement: '_PurgDocsMassChgSimlnMsgs'
}
]
@UI.hidden: true
key SimulationJobUUID,
@UI.hidden: true
PlannedStartTime,
@UI.hidden: true
_SimulationJob.ApplicationJob,
@UI.hidden: true
_SimulationJob.ApplicationJobName,
@UI.hidden: true
ApplicationLogHandle,
@UI.lineItem: [{position: 30 }]
@UI.selectionField: [{position: 40 }]
@Consumption: { filter:{ selectionType: #INTERVAL, multipleSelections: false} }
@EndUserText.label: 'Planned Start'
@EndUserText.quickInfo: 'Planned Start'
PlannedStartDate,
@UI.hidden: true
CreatedByUser,
@UI.lineItem: [{position: 50 }]
@EndUserText.label: 'Error Messages'
// _UniqueErrWrngCnt.ErrorCount as NumberOfUniqueErrors,
NumberOfUniqueErrors,
@UI.lineItem: [{position: 60 }]
// @Consumption.filter.hidden: true
@EndUserText.label: 'Warning Messages'
// _UniqueErrWrngCnt.WarningCount as NumberOfUniqueWarnings,
NumberOfUniqueWarnings,
@UI.hidden: true
// _UniqueMsgCount.NumberOfUniqueInfoSuccessMsgs,
NumberOfUniqueInfoSuccessMsgs,
@UI.selectionField: [{position: 10 }]
@ObjectModel.text.element: ['ApplicationJobStatusText']
@Consumption.valueHelpDefinition: [{entity:{name: 'I_PurgDocSimlnJobStatus', element: 'Status'}}]
@UI.lineItem: [{position: 70}]
@EndUserText.label: 'Status'
@EndUserText.quickInfo: 'Status'
_JobStatus.AsyncApplicationJobStatus,
// case
// when ReferenceApplicationJobName is initial
// then _JobStatus.StatusCode
// else 'X'
// end as StatusCode,
@UI.selectionField: [{position: 30 }]
@Consumption: { filter:{ selectionType: #INTERVAL, multipleSelections: false} }
@EndUserText.label: 'Created At'
@EndUserText.quickInfo: 'Created At'
_JobStatus.CreationDate,
@UI.hidden: true
_JobStatus.CreationTime,
@UI.lineItem: [{position: 70, criticality: 'StatusCriticality', criticalityRepresentation: #WITHOUT_ICON}]
@EndUserText.label: 'Status'
@EndUserText.quickInfo: 'Status'
@Consumption.filter.hidden: true
cast('' as mmpur_status_text) as ApplicationJobStatusText,
@UI.hidden: true
case _JobStatus.AsyncApplicationJobStatus
when 'F'
then 3
when 'A'
then 1
else 0
end as StatusCriticality,
@UI.hidden: true
case _JobStatus.AsyncApplicationJobStatus
when 'F' then '1'
when 'R' then '2'
when 'A' then '3'
else '4' end as IndicatorValue,
@UI.hidden: true
ReleaseDateTime,
@UI.selectionField: [{position: 20 }]
@UI.lineItem: [{position: 20 }]
@EndUserText.label: 'Job'
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.7 }
ApplicationJobDescription,
@UI.hidden: true
LogNumber,
@UI.hidden: true
cast ('' as abap.char( 120 )) as InternalComment,
@UI.hidden: true
cast ('' as abap.char( 1 )) as ErrorFlagIsSet,
@UI.hidden: true
cast ('' as abap.char( 1 )) as WarningFlagIsSet,
@UI.selectionField: [{position: 50 }]
@EndUserText.label: 'Created By'
@UI.lineItem: [{position: 40 }]
_UserContactCard.FullName as FullName,
@UI.hidden: true
// _ItemMsgCnt.NumberOfErrorMsgDocuments,
NumberOfErrorMsgDocuments,
@UI.hidden: true
// _ItemMsgCnt.NumberOfInfoSuccessMsgDocs,
NumberOfInfoSuccessMsgDocs,
@UI.hidden: true
// _ItemMsgCnt.NumberOfWarningMsgDocuments,
NumberOfWarningMsgDocuments,
//Document Item count at General Facet
@Consumption.filter.hidden: true
_DocumentMsgCnt.NumberOfDocuments,
_Occurrences,
_PurgDocsMassChgSimlnMsgs,
@Consumption.filter.hidden: true
_UserContactCard,
@UI.hidden: true
PurgDocMassUpdtIsSimulated,
@EndUserText.label: 'Document Category'
@ObjectModel.text.association: '_PurchasingDocCategoryVH'
@ObjectModel.text.control: #ASSOCIATED_TEXT_UI_HIDDEN
@Consumption.valueHelp: '_PurchasingDocCategoryVH'
@UI.textArrangement: #TEXT_ONLY
PurchasingDocumentCategory,
@EndUserText.label: 'Document Sub Category'
@ObjectModel.text.association: '_PurchasingDocSubtypeVH'
@ObjectModel.text.control: #ASSOCIATED_TEXT_UI_HIDDEN
@Consumption.valueHelp: '_PurchasingDocSubtypeVH'
@UI.textArrangement: #TEXT_ONLY
// @UI.hidden: true
@Consumption.filter.hidden: true
PurchasingDocumentSubtype,
@UI.hidden: true
ReferenceApplicationJobName,
@UI.hidden: true
ApplicationJobTemplate,
@UI.hidden: true
ApplicationJobTemplateVersion,
@UI.hidden: true
cast(' ' as balnrext) as RefApplicationJobDescription,
@UI.hidden: true
cast ('' as abap.sstring( 1332 )) as PurgDocsSkippedForUpdt,
@UI.hidden: true
cast ('' as abap.sstring( 1332 )) as PurgDocsExclForUpdt,
@UI.hidden: true
cast ('' as abap.char( 1 )) as PurgDocsAreSkippedForUpdt,
@UI.hidden:true
@Consumption.filter.hidden: true
_PurchasingDocCategoryVH,
@UI.hidden:true
@Consumption.filter.hidden: true
_PurchasingDocCategoryVH.PurchasingDocumentCategoryName as PurchasingDocumentCategoryName,
@UI.hidden:true
@Consumption.filter.hidden: true
_PurchasingDocSubtypeVH
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"C_PURGDOCCATFORMNTRMASSCHGVH",
"I_PURCHASINGDOCSIMULATIONJOB",
"I_USERCONTACTCARD",
"P_APPJOBSTATUS",
"P_PURGDOCSSIMLNLGHDRMSGCNT"
],
"ASSOCIATED":
[
"C_PURCHASINGDOCSUBTYPEVH",
"C_PURGDOCCATFORMNTRMASSCHGVH",
"C_PURGDOCSMASSCHGSIMLNMSGS",
"C_SIMULATIONLOGSTATUSCOUNT",
"I_USERCONTACTCARD",
"P_PURGDOCSSIMLNLGHDRMSGCNT"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/