P_TxDocStRpActy0

DDL: P_TXDOCSTRPACTY0 SQL: PTXDOCSTRPACTY0 Type: view COMPOSITE

P_TxDocStRpActy0 is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_JournalEntry, I_TaxReportingDateStRpActivity) and exposes 4 fields with key fields CompanyCode, FiscalYear, FiscalYear, AccountingDocument.

Data Sources (2)

SourceAliasJoin Type
I_JournalEntry I_JournalEntry from
I_TaxReportingDateStRpActivity I_TaxReportingDateStRpActivity union

Parameters (2)

NameTypeDefault
P_TaxReportingFromDate vatdate
P_TaxReportingToDate vatdate

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PTXDOCSTRPACTY0 view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
VDM.private true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #COMPOSITE view

Fields (4)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode
KEY FiscalYear FiscalYear
KEY FiscalYear FiscalYear
KEY AccountingDocument AccountingDocument
@AbapCatalog.sqlViewName: 'PTXDOCSTRPACTY0'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@VDM.private: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #COMPOSITE
define view P_TxDocStRpActy0
  with parameters
    P_TaxReportingFromDate : vatdate,
    P_TaxReportingToDate   : vatdate
  as select from I_JournalEntry
{
  key CompanyCode,
  key FiscalYear,
  key AccountingDocument
}
where
        TaxReportingDate between $parameters.P_TaxReportingFromDate and $parameters.P_TaxReportingToDate
  or(
        TaxReportingDate = '00000000'
    and PostingDate      between $parameters.P_TaxReportingFromDate and $parameters.P_TaxReportingToDate
  )
  or    TaxReportingDate = '99991231'

union 

select from I_TaxReportingDateStRpActivity
{
  key  CompanyCode,
  key  FiscalYear,
  key  AccountingDocument
}
where
  (
        OriginalTaxReportingDate between $parameters.P_TaxReportingFromDate and $parameters.P_TaxReportingToDate
    and OriginalTaxReportingDate <> '99991231'
  )
  or(
        OldTaxReportingDate      between $parameters.P_TaxReportingFromDate and $parameters.P_TaxReportingToDate
    and OldTaxReportingDate      <> '99991231'
  )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_JOURNALENTRY",
"I_TAXREPORTINGDATESTRPACTIVITY"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/