P_AR_JOURNALENTRY

CDS View

Argentina Journal Entry Calculated Fields

P_AR_JOURNALENTRY is a CDS View in S/4HANA. Argentina Journal Entry Calculated Fields. It contains 33 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_CustomerSupplierEntry view_entity from CONSUMPTION Argentina Customer/Supplier Entry
P_AR_EDplOtherPerceptionFilter view from CONSUMPTION Argentina Electronic Duplicate Other Perceptions Filter
P_AR_ElectronicDplItemsFromFI view from CONSUMPTION Argentina Electronic Duplicate - Document Details From FI
P_AR_ElectronicDplItemsFromSD view from CONSUMPTION Argentina Electronic Duplicate - Detailed Items from SD
P_AR_JournalEntryLogDetail view from CONSUMPTION Argentina Journal Entry Log Details
P_AR_JrnlEntryWthOfclDocType view_entity from CONSUMPTION Argentina Journal Entry with Official Document Type Fields
P_AR_PurchaseTaxItem view from CONSUMPTION Argentina Purchase Tax Item
P_AR_SalesFromSDWithZeroVAT view from CONSUMPTION Argentina Sales Documents from SD with Zero VAT
P_AR_SalesTaxItem view from CONSUMPTION Argentina Sales Tax Items for Statutory Reporting
P_AR_StRpJournalEntryLogDetail view from CONSUMPTION Selected Journal Entries for Reporting with Details
P_AR_SupplierPayable view inner CONSUMPTION Argentina Supplier Payable
P_AR_SupplierPaymentDetail view_entity inner CONSUMPTION Argentina Supplier Payment Detail
P_AR_VATPrintPurchaseDetail view from CONSUMPTION Argentina VAT Print Purchase Detail

Fields (33)

KeyField CDS FieldsUsed in Views
KEY AccountingDocument AccountingDocument 12
KEY CompanyCode CompanyCode 11
KEY FiscalYear FiscalYear 12
_OneTimeAccountBP _OneTimeAccountBP 3
AccountingDocumentCategory AccountingDocumentCategory 1
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 10
Branch Branch 2
CompanyCodeCurrency CompanyCodeCurrency 3
DocumentDate DocumentDate 10
DocumentReferenceID DocumentReferenceID 11
ExchangeRate ExchangeRate 5
ExchangeRateDate ExchangeRateDate 5
FiscalPeriod FiscalPeriod 8
IsDocumentFromSD IsDocumentFromSD 2
IsReversal IsReversal 6
IsReversed IsReversed 6
LogicalSystem LogicalSystem 3
NmbrOfPages NmbrOfPages 2
OriginalReferenceDocument OriginalReferenceDocument 6
PostingDate PostingDate 12
ReferenceDocumentLogicalSystem ReferenceDocumentLogicalSystem 3
ReferenceDocumentType ReferenceDocumentType 8
ReportingDate ReportingDate 12
ReversalReferenceDocument ReversalReferenceDocument 6
ReverseDocument ReverseDocument 6
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..1] to P_AR_ConversionFactors as _ConversionFactor on  _ConversionFactor.ExchangeRateType  = $projection.ExchangeRateType
                                                                    and _ConversionFactor.SourceCurrency    = $projection.TransactionCurrency
                                                                    and _ConversionFactor.TargetCurrency    = $projection.CompanyCodeCurrency
                                                                    and _ConversionFactor.ValidityStartDate <= $projection.PostingDate
                                                                    and _ConversionFactor.ValidityEndDate   >= $projection.PostingDate

  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.ExchangeRateType,
      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,
      JournalEntry.Branch,

      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(
        case
          when JournalEntry.TransactionCurrency <> JournalEntry.CompanyCodeCurrency
             then JournalEntry.AbsoluteExchangeRate * _ConversionFactor.NumberOfTargetCurrencyUnits
          else JournalEntry.AbsoluteExchangeRate
        end as fis_exchange_rate
      )                                                                      as ExchangeRate,

      JournalEntry.LogicalSystem,
      JournalEntry.CompanyCodeCurrency,
      cast( JournalEntry.TransactionCurrency  as fis_rwcur preserving type ) as TransactionCurrency,
      JournalEntry.AdditionalCurrency1,
      JournalEntry.AdditionalCurrency2,

      _CompanyCode,
      _OneTimeAccountBP,
      _AccountingDocumentTypeText,
      _ConversionFactor
}