C_PT_TaxReturnBoxQuery_2

DDL: C_PT_TAXRETURNBOXQUERY_2 SQL: CPTTAXRETBOXQ2 Type: view CONSUMPTION Package: GLO_FIN_IS_VAT_PT

ATR enabled tax Items for Portugal - Query

C_PT_TaxReturnBoxQuery_2 is a Consumption CDS View that provides data about "ATR enabled tax Items for Portugal - Query" in SAP S/4HANA. It reads from 1 data source (I_StRpTaxReturnBoxCube) and exposes 61 fields with key fields CompanyCode, AccountingDocument, FiscalYear, TaxItem, TransactionTypeDetermination. Part of development package GLO_FIN_IS_VAT_PT.

Data Sources (1)

SourceAliasJoin Type
I_StRpTaxReturnBoxCube I_StRpTaxReturnBoxCube from

Parameters (4)

NameTypeDefault
P_StatryRptgEntity srf_reporting_entity
P_StatryRptCategory srf_rep_cat_id
P_StatryRptRunID srf_report_run_id
P_ReportingCountry land1

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName CPTTAXRETBOXQ2 view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
VDM.viewType #CONSUMPTION view
Analytics.query true view
EndUserText.label ATR enabled tax Items for Portugal - Query view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.dataClass #MIXED view

Fields (61)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode
KEY AccountingDocument AccountingDocument
KEY FiscalYear FiscalYear
KEY TaxItem TaxItem
KEY TransactionTypeDetermination TransactionTypeDetermination
KEY DebitCreditCode DebitCreditCode
KEY AccountingDocumentType AccountingDocumentType
KEY SupplierAccountGroup SupplierAccountGroup
KEY UnifiedTaxBoxStructureType UnifiedTaxBoxStructureType
KEY TaxBox TaxBox
KEY TaxDeclnAmountType TaxDeclnAmountType
KEY ValidityStartDate TaxBoxStrucValidityStartDate
KEY TaxGroup TaxGroup
KEY TaxItemGrpgDebitCreditCode TaxItemGrpgDebitCreditCode
KEY TaxItemGrpgAcctgDocumentType TaxItemGrpgAcctgDocumentType
KEY TaxItemGrpgSupplierAcctGroup TaxItemGrpgSupplierAcctGroup
KEY TaxItemGrpgSpecialGLCode TaxItemGrpgSpecialGLCode
KEY StatryRptgEntity StatryRptgEntity
KEY StatryRptCategory StatryRptCategory
KEY StatryRptRunID StatryRptRunID
StatryRptRun StatryRptRun
Country Country
TaxCode TaxCode
TaxItemGroupingVersion TaxItemGroupingVersion
TaxBoxStructureType TaxBoxStructureType
ValidityEndDate TaxBoxStrucValidityEndDate
TaxCalculationProcedure TaxCalculationProcedure
TaxRate TaxRate
TaxRateValidityStartDate TaxRateValidityStartDate
GLAccount GLAccount
TaxItemGroup TaxItemGroup
ReferenceDocumentType ReferenceDocumentType
PostingDate PostingDate
DocumentDate DocumentDate
TaxReportingDate TaxReportingDate
ReportingDate ReportingDate
FiscalPeriod FiscalPeriod
CompanyCodeCountry CompanyCodeCountry
ReportingCountry ReportingCountry
TaxReturnCountry TaxReturnCountry
CompanyCodeCurrency CompanyCodeCurrency
DocumentCurrency DocumentCurrency
ReportingCurrency ReportingCurrency
AmountInReportingCurrency AmountInReportingCurrency
TaxBaseAmountInRptgCrcy TaxBaseAmountInRptgCrcy
TaxAmountInRptgCrcy TaxAmountInRptgCrcy
NonDeductibleInputTaxAmount NonDeductibleInputTaxAmount
TaxBaseAmountInCoCodeCrcy TaxBaseAmountInCoCodeCrcy
TaxAmountInCoCodeCrcy TaxAmountInCoCodeCrcy
TaxBaseAmountInTransCrcy TaxBaseAmountInTransCrcy
TaxAmount TaxAmount
TaxType TaxType
TargetTaxCode TargetTaxCode
CAReconciliationKey CAReconciliationKey
TaxTypeName TaxTypeName
TaxIsNotDeductible TaxIsNotDeductible
TaxBoxStructure TaxBoxStructure
TaxBoxStructureName TaxBoxStructureName
TaxBoxName TaxBoxName
TaxBoxCondition TaxBoxCondition
_TaxTypeText _TaxTypeText
@AbapCatalog.sqlViewName: 'CPTTAXRETBOXQ2'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #PRIVILEGED_ONLY
@VDM.viewType: #CONSUMPTION
@Analytics.query:true
@EndUserText.label: 'ATR enabled tax Items for Portugal - Query'
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #X
@ObjectModel.usageType.dataClass: #MIXED


define view C_PT_TaxReturnBoxQuery_2
  with parameters
     P_StatryRptgEntity  : srf_reporting_entity,
     P_StatryRptCategory : srf_rep_cat_id,
     P_StatryRptRunID    : srf_report_run_id,
     P_ReportingCountry  : land1

as select from I_StRpTaxReturnBoxCube(
                                                                                  P_TaxIsDeferredRelevant: 'N',
                                                                                  P_TaxIsMossRelevant   :  'N',
                                                                                  P_StatryRptgEntity     : $parameters.P_StatryRptgEntity ,
                                                                                  P_StatryRptCategory    : $parameters.P_StatryRptCategory,
                                                                                  P_StatryRptRunID       : $parameters.P_StatryRptRunID,
                                                                                  P_ReportingCountry     : $parameters.P_ReportingCountry,
                                                                                  P_TaxBoxConfiguration  : '2'
                                                                                  )

 {

      @Consumption.filter : { selectionType : #SINGLE, multipleSelections : true}
  key CompanyCode,
      @Consumption.filter : { selectionType : #RANGE, multipleSelections : true}
  key AccountingDocument,
      @Consumption.filter : { selectionType : #SINGLE, multipleSelections : true}
  key FiscalYear,
  key TaxItem,
  key TransactionTypeDetermination,
  key DebitCreditCode,
  key AccountingDocumentType,
  key SupplierAccountGroup,
      @Consumption.filter : { selectionType : #SINGLE, multipleSelections : true}
      @AnalyticsDetails.query.axis: #ROWS
  key UnifiedTaxBoxStructureType,
      @Consumption.filter : { selectionType : #RANGE, multipleSelections : true}
      @AnalyticsDetails.query.axis: #ROWS
  key TaxBox,
      @Consumption.filter : { selectionType : #SINGLE, multipleSelections : true}
      @AnalyticsDetails.query.axis: #ROWS
  key TaxDeclnAmountType,
      @Consumption.filter : { selectionType : #RANGE, multipleSelections : true}
  key TaxBoxStrucValidityStartDate as ValidityStartDate,
  key TaxGroup,
  key TaxItemGrpgDebitCreditCode,
  key TaxItemGrpgAcctgDocumentType,
  key TaxItemGrpgSupplierAcctGroup,
  key TaxItemGrpgSpecialGLCode,
  key StatryRptgEntity,
  key StatryRptCategory,
  key StatryRptRunID,
      StatryRptRun,

      Country,
      TaxCode,
      TaxItemGroupingVersion,
      TaxBoxStructureType,
      @Consumption.filter : { selectionType : #RANGE, multipleSelections : true}
      TaxBoxStrucValidityEndDate as ValidityEndDate,
      TaxCalculationProcedure,
      @AnalyticsDetails.query.hidden: true
      TaxRate,
      TaxRateValidityStartDate,
      GLAccount,
      TaxItemGroup,
      ReferenceDocumentType,
      @Consumption.filter : { selectionType : #RANGE, multipleSelections : true}
      PostingDate,
      DocumentDate,
      TaxReportingDate,
      @Consumption.filter : { selectionType : #RANGE, multipleSelections : true}
      ReportingDate,
      FiscalPeriod,
      CompanyCodeCountry,
      @Consumption.filter : { selectionType: #RANGE, multipleSelections : true}
      ReportingCountry,
      TaxReturnCountry,
      CompanyCodeCurrency,
      DocumentCurrency,
      ReportingCurrency,


      @DefaultAggregation:#SUM
      @Semantics.amount.currencyCode: 'ReportingCurrency'
      AmountInReportingCurrency,

      @DefaultAggregation:#SUM
      @Semantics.amount.currencyCode: 'ReportingCurrency'
      TaxBaseAmountInRptgCrcy,

      @DefaultAggregation:#SUM
      @Semantics.amount.currencyCode: 'ReportingCurrency'
      TaxAmountInRptgCrcy,

      @DefaultAggregation:#SUM
      @AnalyticsDetails.query.hidden: true
      @Semantics.amount.currencyCode: 'DocumentCurrency'
      NonDeductibleInputTaxAmount,

      @DefaultAggregation:#SUM
      @AnalyticsDetails.query.hidden: true
      @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
      TaxBaseAmountInCoCodeCrcy,

      @DefaultAggregation:#SUM
      @AnalyticsDetails.query.hidden: true
      @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
      TaxAmountInCoCodeCrcy,

      @DefaultAggregation:#SUM
      @AnalyticsDetails.query.hidden: true
      @Semantics.amount.currencyCode: 'DocumentCurrency'
      TaxBaseAmountInTransCrcy,

      @DefaultAggregation:#SUM
      @AnalyticsDetails.query.hidden: true
      @Semantics.amount.currencyCode: 'DocumentCurrency'
      TaxAmount,

      @ObjectModel.text.association: '_TaxTypeText'
      @AnalyticsDetails.query.display:#TEXT
      TaxType,
      TargetTaxCode,
      CAReconciliationKey,
      TaxTypeName,
      TaxIsNotDeductible,
      TaxBoxStructure,
      TaxBoxStructureName,
      TaxBoxName,
      TaxBoxCondition,

      _TaxTypeText

}