C_PurgDocSimulationJob

DDL: C_PURGDOCSIMULATIONJOB SQL: CPURGDOCSIM Type: view CONSUMPTION

Purchasing Document Simulation Job

C_PurgDocSimulationJob is a Consumption CDS View that provides data about "Purchasing Document Simulation Job" in SAP S/4HANA. It reads from 2 data sources (P_AppJobStatus, I_PurchasingDocSimulationJob) and exposes 41 fields with key field SimulationJobUUID. It has 6 associations to related views.

Data Sources (2)

SourceAliasJoin Type
P_AppJobStatus _JobStatus inner
I_PurchasingDocSimulationJob _SimulationJob from

Associations (6)

CardinalityTargetAliasCondition
[1..*] C_SimulationLogStatusCount _Occurrences $projection.SimulationJobUUID = _Occurrences.SimulationJobUUID
[1..*] C_PurgDocsMassChgSimlnMsgs _PurgDocsMassChgSimlnMsgs $projection.SimulationJobUUID = _PurgDocsMassChgSimlnMsgs.SimulationJobUUID --CDS C_PurgDocJobStsMsgCnt has been replaced with P_PurgDocJobOtherMsgCnt
[0..1] P_PurgDocsSimlnLgHdrMsgCnt _DocumentMsgCnt $projection.SimulationJobUUID = _DocumentMsgCnt.SimulationJobUUID
[0..1] I_UserContactCard _UserContactCard $projection.CreatedByUser = _UserContactCard.ContactCardID
[0..1] C_PurgDocCatForMntrMassChgVH _PurchasingDocCategoryVH $projection.PurchasingDocumentCategory = _PurchasingDocCategoryVH.PurchasingDocumentCategory
[0..1] C_PurchasingDocSubtypeVH _PurchasingDocSubtypeVH $projection.PurchasingDocumentSubtype = _PurchasingDocSubtypeVH.PurchasingDocumentSubtype

Annotations (18)

NameValueLevelField
AbapCatalog.sqlViewName CPURGDOCSIM view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Purchasing Document Simulation Job view
ObjectModel.usageType.serviceQuality #C view
AccessControl.personalData.blocking #REQUIRED view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.resultSet.sizeCategory #XS view
VDM.viewType #CONSUMPTION view
Search.searchable true view
UI.headerInfo.typeName Job Item view
UI.headerInfo.typeNamePlural Job Items view
UI.headerInfo.title.type #STANDARD view
UI.headerInfo.title.value ApplicationJobDescription view
UI.headerInfo.description.type #STANDARD view
UI.headerInfo.description.value ReleaseDateTime view

Fields (41)

KeyFieldSource TableSource FieldDescription
KEY SimulationJobUUID SimulationJobUUID
PlannedStartTime PlannedStartTime
ApplicationJob I_PurchasingDocSimulationJob ApplicationJob
ApplicationJobName I_PurchasingDocSimulationJob ApplicationJobName
ApplicationLogHandle ApplicationLogHandle
PlannedStartDate PlannedStartDate Planned Start
CreatedByUser CreatedByUser
NumberOfUniqueErrors NumberOfUniqueErrors Error Messages
NumberOfUniqueWarnings NumberOfUniqueWarnings Warning Messages
NumberOfUniqueInfoSuccessMsgs NumberOfUniqueInfoSuccessMsgs
AsyncApplicationJobStatus P_AppJobStatus AsyncApplicationJobStatus Status
CreationDate P_AppJobStatus CreationDate Created At
CreationTime P_AppJobStatus CreationTime
ApplicationJobStatusText Status
ReleaseDateTime ReleaseDateTime
ApplicationJobDescription ApplicationJobDescription Job
LogNumber LogNumber
InternalComment
ErrorFlagIsSet
WarningFlagIsSet
FullName _UserContactCard FullName Created By
NumberOfErrorMsgDocuments NumberOfErrorMsgDocuments
NumberOfInfoSuccessMsgDocs NumberOfInfoSuccessMsgDocs
NumberOfWarningMsgDocuments NumberOfWarningMsgDocuments
NumberOfDocuments _DocumentMsgCnt NumberOfDocuments
_Occurrences _Occurrences
_PurgDocsMassChgSimlnMsgs _PurgDocsMassChgSimlnMsgs
_UserContactCard _UserContactCard
PurgDocMassUpdtIsSimulated PurgDocMassUpdtIsSimulated
PurchasingDocumentCategory PurchasingDocumentCategory Document Category
PurchasingDocumentSubtype PurchasingDocumentSubtype Document Sub Category
ReferenceApplicationJobName ReferenceApplicationJobName
ApplicationJobTemplate ApplicationJobTemplate
ApplicationJobTemplateVersion ApplicationJobTemplateVersion
RefApplicationJobDescription
PurgDocsSkippedForUpdt
PurgDocsExclForUpdt
PurgDocsAreSkippedForUpdt
_PurchasingDocCategoryVH _PurchasingDocCategoryVH
PurchasingDocumentCategoryName _PurchasingDocCategoryVH PurchasingDocumentCategoryName
_PurchasingDocSubtypeVH _PurchasingDocSubtypeVH
@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":""
}
}*/