P_AR_JOURNALENTRY

CDS View

P_AR_JOURNALENTRY is a CDS View in S/4HANA. It contains 31 fields. 15 CDS views read from this table.

CDS Views using this table (15)

ViewTypeJoinVDMDescription
C_AR_StRpJournalEntryTaxItem view from CONSUMPTION Journal Entry Tax Item for Argentina
C_AR_StRpVATPrintTaxDetailC view from CONSUMPTION Argentina VAT Print Tax Details - Cube
P_AR_EDplOtherPerceptionFilter view from CONSUMPTION
P_AR_ElectronicDplItemsFromFI view from CONSUMPTION
P_AR_ElectronicDplItemsFromSD view from CONSUMPTION
P_AR_JournalEntryLogDetail view from CONSUMPTION
P_AR_PurchaseTaxItem view from CONSUMPTION
P_AR_PurchaseVATRateDetail view inner CONSUMPTION
P_AR_PurTaxItemVATRate view from CONSUMPTION
P_AR_SalesFromSDWithZeroVAT view from CONSUMPTION
P_AR_SalesTaxItem view from CONSUMPTION
P_AR_StRpJournalEntryLogDetail view from CONSUMPTION
P_AR_SupplierPayable view inner CONSUMPTION
P_AR_SupplierPaymentDetail view_entity inner CONSUMPTION
P_AR_VATPrintPurchaseDetail view from CONSUMPTION

Fields (31)

KeyField CDS FieldsUsed in Views
KEY AccountingDocument AccountingDocument 11
KEY CompanyCode CompanyCode 11
KEY FiscalYear FiscalYear 11
_OneTimeAccountBP _OneTimeAccountBP 3
AccountingDocumentHeaderText AccountingDocumentHeaderText 1
AccountingDocumentType AccountingDocumentType 11
AR_Branch AR_Branch 10
AR_Branch4Digits AR_Branch4Digits 2
AR_OfficialDocumentNumber AR_OfficialDocumentNumber 10
AR_PrintCharacter AR_PrintCharacter 11
CompanyCodeCurrency CompanyCodeCurrency 3
DocumentDate DocumentDate 9
DocumentReferenceID DocumentReferenceID 11
ExchangeRate ExchangeRate 5
ExchangeRateDate ExchangeRateDate 4
FiscalPeriod FiscalPeriod 7
IsDocumentFromSD IsDocumentFromSD 2
IsReversal IsReversal 6
IsReversed IsReversed 6
LogicalSystem LogicalSystem 3
NmbrOfPages NmbrOfPages 2
OriginalReferenceDocument OriginalReferenceDocument 6
PostingDate PostingDate 11
ReferenceDocumentLogicalSystem ReferenceDocumentLogicalSystem 3
ReferenceDocumentType ReferenceDocumentType 8
ReportingDate ReportingDate 12
ReversalReferenceDocument ReversalReferenceDocument 6
ReverseDocument ReverseDocument 5
ReverseDocumentFiscalYear ReverseDocumentFiscalYear 3
TaxReportingDate TaxReportingDate 5
TransactionCurrency TransactionCurrency 7
@AbapCatalog.sqlViewName: 'PARJOURNALENTRY'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@VDM.viewType: #CONSUMPTION
@VDM.private: true
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_AR_JournalEntry
  as

  select from I_JournalEntry as JournalEntry

  association [0..*] to I_OneTimeAccountBP as _OneTimeAccountBP on  JournalEntry.CompanyCode        = _OneTimeAccountBP.CompanyCode
                                                                and JournalEntry.FiscalYear         = _OneTimeAccountBP.FiscalYear
                                                                and JournalEntry.AccountingDocument = _OneTimeAccountBP.AccountingDocument
{
  key JournalEntry.CompanyCode,
  key JournalEntry.FiscalYear,
  key JournalEntry.AccountingDocument,
      JournalEntry.FiscalPeriod,
      JournalEntry.PostingDate,
      JournalEntry.DocumentDate,
      JournalEntry.TaxReportingDate,
      cast(
        case
          when JournalEntry.TaxReportingDate = '00000000' then JournalEntry.PostingDate
          when JournalEntry.TaxReportingDate <> '00000000' then JournalEntry.TaxReportingDate
        end
      as glo_reporting_date preserving type ) as ReportingDate,
      JournalEntry.AccountingDocumentType,
      JournalEntry.AccountingDocumentCategory,
      JournalEntry.DocumentReferenceID,
      cast(
        case length( JournalEntry.DocumentReferenceID )
          when 13
            then substring( JournalEntry.DocumentReferenceID,1,4 )
          when 14
            then substring( JournalEntry.DocumentReferenceID,1,5 )
        end as fiar_branch preserving type
      )                                       as AR_Branch,
      case length( JournalEntry.DocumentReferenceID )
        when 13
          then substring( JournalEntry.DocumentReferenceID,1,4 )
        when 14
          then substring( JournalEntry.DocumentReferenceID,2,4 )
      end                                     as AR_Branch4Digits,
      cast(
        case length( JournalEntry.DocumentReferenceID )
          when 13
            then substring( JournalEntry.DocumentReferenceID,5,1 )
          when 14
            then substring( JournalEntry.DocumentReferenceID,6,1 )
          else ''
        end as j_1apchar preserving type
      )                                       as AR_PrintCharacter,
      cast(
        case length( JournalEntry.DocumentReferenceID )
          when 13
            then substring( JournalEntry.DocumentReferenceID,6,8 )
          when 14
            then substring( JournalEntry.DocumentReferenceID,7,8 )
        end as fiar_odn
      )                                       as AR_OfficialDocumentNumber,
      cast(
        case
          when JournalEntry.NmbrOfPages = '000' or JournalEntry.NmbrOfPages = ''
            then '001'
          else JournalEntry.NmbrOfPages
        end as j_1anopg
      )                                       as NmbrOfPages,
      JournalEntry.AccountingDocumentHeaderText,
      JournalEntry.IsReversal,
      JournalEntry.IsReversed,
      JournalEntry.ReverseDocument,
      JournalEntry.ReverseDocumentFiscalYear,
      JournalEntry.ReversalReferenceDocument,
      JournalEntry.OriginalReferenceDocument,
      JournalEntry.ReferenceDocumentType,

      cast(
        case
          when JournalEntry.ReferenceDocumentType = 'VBRK' or JournalEntry.ReferenceDocumentType = 'CF3PS'
            then 'X'
          else ''
        end as flag
      )                                       as IsDocumentFromSD,

      JournalEntry.ReferenceDocumentLogicalSystem,
      JournalEntry.ExchangeRateDate,
      cast( JournalEntry.ExchangeRate as fis_exchange_rate  preserving type ) as ExchangeRate,
      JournalEntry.LogicalSystem,
      JournalEntry.CompanyCodeCurrency,
      cast( JournalEntry.TransactionCurrency  as fis_rwcur preserving type ) as TransactionCurrency,
      JournalEntry.AdditionalCurrency1,
      JournalEntry.AdditionalCurrency2,
      _CompanyCode,
      _OneTimeAccountBP,
      _AccountingDocumentTypeText
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_JOURNALENTRY"
],
"ASSOCIATED":
[
"I_ACCOUNTINGDOCUMENTTYPETEXT",
"I_COMPANYCODE",
"I_ONETIMEACCOUNTBP"
],
"BASE":
[
"I_JOURNALENTRY"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/