R_MngJrnlEntryWorkflowStatus

DDL: R_MNGJRNLENTRYWORKFLOWSTATUS Type: view_entity COMPOSITE Package: ODATA_MANAGE_JOURNAL_ENTRY_V2

Journal Entry Workflow Status

R_MngJrnlEntryWorkflowStatus is a Composite CDS View that provides data about "Journal Entry Workflow Status" in SAP S/4HANA. It reads from 1 data source (P_ManageJournalEntry) and exposes 3 fields with key fields CompanyCode, FiscalYear, AccountingDocument. It has 1 association to related views. Part of development package ODATA_MANAGE_JOURNAL_ENTRY_V2.

Data Sources (1)

SourceAliasJoin Type
P_ManageJournalEntry _JournalEntry from

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_DocSingleWorkflowInfo _Status $projection.CompanyCode = _Status.CompanyCode and $projection.AccountingDocument = _Status.AccountingDocument and $projection.FiscalYear = _Status.FiscalYear

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Journal Entry Workflow Status view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view

Fields (3)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode P_ManageJournalEntry CompanyCode
KEY FiscalYear P_ManageJournalEntry FiscalYear
KEY AccountingDocument P_ManageJournalEntry AccountingDocument
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'Journal Entry Workflow Status'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
  serviceQuality: #X,
  sizeCategory: #XXL,
  dataClass: #MIXED
}

@VDM: {
  viewType: #COMPOSITE,
  lifecycle.contract.type:#SAP_INTERNAL_API
}

define view entity R_MngJrnlEntryWorkflowStatus
as select from P_ManageJournalEntry  as _JournalEntry

  association [0..1] to I_DocSingleWorkflowInfo        as _Status       on  $projection.CompanyCode        = _Status.CompanyCode
                                                                        and $projection.AccountingDocument = _Status.AccountingDocument
                                                                        and $projection.FiscalYear         = _Status.FiscalYear                                                                 
  
{
  key _JournalEntry.CompanyCode,
  key _JournalEntry.FiscalYear,
  key _JournalEntry.AccountingDocument,
  
  cast( 
    // normal document with wf

    case when ( _JournalEntry.TransactionCode = 'FBVB' ) 
           and ( _JournalEntry.AccountingDocumentCategory =  '' 
             or  _JournalEntry.AccountingDocumentCategory =  'L' 
             or  _JournalEntry.AccountingDocumentCategory =  'U' ) 
           and ( _Status.WorkItem <> '000000000000' )
           and ( _Status.AccountingDocument is not null ) 
              then _Status.AccountingDocumentStatus
         // parked with wf

         when ( _JournalEntry.TransactionCode = 'FBDC_P001'
             or _JournalEntry.TransactionCode = 'FBDC_P050'
             or _JournalEntry.TransactionCode = 'FBDC_P051' )
           and( _JournalEntry.AccountingDocumentCategory =  'Z'
             or _JournalEntry.AccountingDocumentCategory =  'V' )
           and ( _Status.AccountingDocument is not null ) 
               then _Status.AccountingDocumentStatus
         else
           // other documents mapped as Not Workflow Relevant

           'Q'
            end as fac_mje_wf_status preserving type )                     as AcctgDocumentWorkflowStatus
            

}