P_AR_EDplOtherPerceptionFilter

DDL: P_AR_EDPLOTHERPERCEPTIONFILTER SQL: PAREDUPPRCPTFLTR Type: view CONSUMPTION

P_AR_EDplOtherPerceptionFilter is a Consumption CDS View in SAP S/4HANA. It reads from 2 data sources (P_AR_JournalEntry, P_AR_TaxItem) and exposes 16 fields with key fields CompanyCode, FiscalYear, AccountingDocument, TaxItem.

Data Sources (2)

SourceAliasJoin Type
P_AR_JournalEntry JournalEntry from
P_AR_TaxItem TaxItem inner

Parameters (1)

NameTypeDefault
P_RptgAmountIsInTransCrcy fiar_use_transaction_currency

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PAREDUPPRCPTFLTR view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #CONSUMPTION view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (16)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode P_AR_JournalEntry CompanyCode
KEY FiscalYear P_AR_JournalEntry FiscalYear
KEY AccountingDocument P_AR_JournalEntry AccountingDocument
KEY TaxItem P_AR_TaxItem TaxItem
CompanyCodeCountry P_AR_TaxItem CompanyCodeCountry
StRpTaxClassification P_AR_TaxItem StRpTaxClassification
DocumentDate P_AR_JournalEntry DocumentDate
PostingDate P_AR_JournalEntry PostingDate
ReportingDate P_AR_JournalEntry ReportingDate
AccountingDocumentType P_AR_JournalEntry AccountingDocumentType
AR_Branch P_AR_JournalEntry AR_Branch
AR_OfficialDocumentNumber P_AR_JournalEntry AR_OfficialDocumentNumber
AR_PrintCharacter P_AR_JournalEntry AR_PrintCharacter
DocumentReferenceID P_AR_JournalEntry DocumentReferenceID
AddressRegion P_AR_TaxItem AddressRegion
MunicipalJurisdiction P_AR_TaxItem MunicipalJurisdiction
@AbapCatalog.sqlViewName: 'PAREDUPPRCPTFLTR'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.dataClass: #MIXED
@VDM.viewType: #CONSUMPTION
@VDM.private: true
@ClientHandling.algorithm: #SESSION_VARIABLE

define view P_AR_EDplOtherPerceptionFilter
  with parameters
    P_RptgAmountIsInTransCrcy : fiar_use_transaction_currency
    
 as select from P_AR_JournalEntry as JournalEntry
    inner join  P_AR_TaxItem      as TaxItem on  TaxItem.CompanyCode        = JournalEntry.CompanyCode
                                             and TaxItem.AccountingDocument = JournalEntry.AccountingDocument
                                             and TaxItem.FiscalYear         = JournalEntry.FiscalYear 
{
  key JournalEntry.CompanyCode,
  key JournalEntry.FiscalYear,
  key JournalEntry.AccountingDocument,
  key TaxItem.TaxItem,
      TaxItem.CompanyCodeCountry,
      TaxItem.StRpTaxClassification,  
      JournalEntry.DocumentDate,
      JournalEntry.PostingDate,
      JournalEntry.ReportingDate,
      JournalEntry.AccountingDocumentType,
      JournalEntry.AR_Branch,
      JournalEntry.AR_OfficialDocumentNumber,
      JournalEntry.AR_PrintCharacter,
      JournalEntry.DocumentReferenceID,
      TaxItem.AddressRegion,
      TaxItem.MunicipalJurisdiction,
      
      cast(
        case $parameters.P_RptgAmountIsInTransCrcy
          when 'X'
            then TaxItem.TransactionCurrency
          else TaxItem.CompanyCodeCurrency
        end as glo_reporting_currency preserving type
      )                           as ReportingCurrency,  
      
      cast(
        case $parameters.P_RptgAmountIsInTransCrcy
          when 'X'
            then TaxItem.TaxAmountInTransCrcy
          else TaxItem.TaxAmountInCoCodeCrcy
        end as glo_tax_amount_rptg_crcy preserving type
      )                           as TaxAmountInRptgCrcy     
      
}

where ( JournalEntry.IsReversed <> 'X' or JournalEntry.AR_OfficialDocumentNumber is not initial )
  and ( TaxItem.StRpTaxClassification = 'MP' or TaxItem.StRpTaxClassification = 'GI' or TaxItem.StRpTaxClassification = 'GP' )
  and TaxItem.TaxRate <> 0  
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"P_AR_JOURNALENTRY",
"P_AR_TAXITEM"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/