C_NL_StRpAcceptedTaxItemCube

DDL: C_NL_STRPACCEPTEDTAXITEMCUBE SQL: CNLSRACCTAXITMC Type: view CONSUMPTION

[Obsolete] NL VAT - Reported Tax Items

C_NL_StRpAcceptedTaxItemCube is a Consumption CDS View (Cube) that provides data about "[Obsolete] NL VAT - Reported Tax Items" in SAP S/4HANA. It reads from 2 data sources (I_StRpJournalEntryLog, I_StRpTaxItemBoxCube) and exposes 40 fields with key fields StatryRptgEntity, StatryRptCategory, StatryRptRunID, AccountingDocument, CompanyCode.

Data Sources (2)

SourceAliasJoin Type
I_StRpJournalEntryLog I_StRpJournalEntryLog inner
I_StRpTaxItemBoxCube I_StRpTaxItemBoxCube inner

Annotations (12)

NameValueLevelField
VDM.viewType #CONSUMPTION view
Analytics.dataCategory #CUBE view
AbapCatalog.sqlViewName CNLSRACCTAXITMC view
AbapCatalog.compiler.compareFilter true view
EndUserText.label [Obsolete] NL VAT - Reported Tax Items view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #MIXED view
Metadata.allowExtensions true view

Fields (40)

KeyFieldSource TableSource FieldDescription
KEY StatryRptgEntity I_StRpRepRun StatryRptgEntity
KEY StatryRptCategory I_StRpRepRun StatryRptCategory
KEY StatryRptRunID I_StRpRepRun StatryRptRunID
KEY AccountingDocument I_StRpJournalEntryLog AccountingDocument
KEY CompanyCode I_StRpJournalEntryLog CompanyCode
KEY FiscalYear I_StRpJournalEntryLog FiscalYear
KEY TaxCode TaxCode
KEY TransactionTypeDetermination TransactionTypeDetermination
KEY TaxBox TaxBox
KEY TaxDeclnAmountType TaxDeclnAmountType
KEY TaxItemGroupingVersion TaxItemGroupingVersion
TaxItem I_StRpTaxItemBoxCube TaxItem
PostingDate PostingDate
DocumentDate DocumentDate
TaxReportingDate TaxReportingDate
ReportingDate ReportingDate
FiscalPeriod FiscalPeriod
AccountingDocumentType AccountingDocumentType
DocumentReferenceID DocumentReferenceID
CompanyCodeCountry CompanyCodeCountry
ReportingCountry ReportingCountry
TaxReturnCountry TaxReturnCountry
ExchangeRate ExchangeRate
TaxRate TaxRate
GLAccount GLAccount
BusinessPlace BusinessPlace
TaxJurisdiction TaxJurisdiction
LowestLevelTaxJurisdiction LowestLevelTaxJurisdiction
TaxNumber1 TaxNumber1
TaxNumber2 TaxNumber2
TaxNumber3 TaxNumber3
BusinessPartner BusinessPartner
BusinessPartnerName BusinessPartnerName
CustomerSupplierAddress CustomerSupplierAddress
TaxType TaxType
TargetTaxCode TargetTaxCode
ReportingCurrency ReportingCurrency
DocumentCurrency DocumentCurrency
AdditionalCurrency1 AdditionalCurrency1
AdditionalCurrency2 AdditionalCurrency2
//Documentation about annotations can be found at http://help.sap.com searching for CDS annotations

@VDM.viewType: #CONSUMPTION
@Analytics: { dataCategory: #CUBE }
@AbapCatalog.sqlViewName: 'CNLSRACCTAXITMC'
@AbapCatalog.compiler.compareFilter: true
@EndUserText.label: '[Obsolete] NL VAT - Reported Tax Items'
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #BLOCKED_DATA_INCLUDED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.dataClass: #MIXED
@Metadata.allowExtensions:true


////////////////////////////////////////////////////////////////////////////////////////////////////////

// This view creates a list of already reported tax items submitted to and accepted by the government 

////////////////////////////////////////////////////////////////////////////////////////////////////////


define view C_NL_StRpAcceptedTaxItemCube

  as select distinct from
    I_StRpRepRun

  inner join
    I_StRpJournalEntryLog
    on I_StRpJournalEntryLog.StatryRptCategory = I_StRpRepRun.StatryRptCategory
    and I_StRpJournalEntryLog.StatryRptgEntity = I_StRpRepRun.StatryRptgEntity
    and I_StRpJournalEntryLog.StatryRptRunID = I_StRpRepRun.StatryRptRunID

  inner join
    I_StRpTaxItemBoxCube
    on I_StRpTaxItemBoxCube.AccountingDocument = I_StRpJournalEntryLog.AccountingDocument
    and I_StRpTaxItemBoxCube.CompanyCode = I_StRpJournalEntryLog.CompanyCode
    and I_StRpTaxItemBoxCube.FiscalYear = I_StRpJournalEntryLog.FiscalYear    

{
  key I_StRpRepRun.StatryRptgEntity,
  key I_StRpRepRun.StatryRptCategory,
  key I_StRpRepRun.StatryRptRunID,
  key I_StRpJournalEntryLog.AccountingDocument,
  key I_StRpJournalEntryLog.CompanyCode,
  key I_StRpJournalEntryLog.FiscalYear, 
  key TaxCode,
  key TransactionTypeDetermination,
  key TaxBox,
  key TaxDeclnAmountType,
  key TaxItemGroupingVersion,
  I_StRpTaxItemBoxCube.TaxItem,
  PostingDate,
  DocumentDate,
  TaxReportingDate,
  ReportingDate,
  FiscalPeriod,
  AccountingDocumentType,
  DocumentReferenceID,
  CompanyCodeCountry,
  ReportingCountry,
  TaxReturnCountry,
  ExchangeRate,
  TaxRate,
  GLAccount,
  BusinessPlace,
  TaxJurisdiction,
  LowestLevelTaxJurisdiction,
  TaxNumber1,
  TaxNumber2,
  TaxNumber3,
  BusinessPartner,
  BusinessPartnerName,
  CustomerSupplierAddress,
  TaxType,
  TargetTaxCode,
  
  @Semantics.currencyCode:true
  ReportingCurrency,
  
  @DefaultAggregation:#SUM
  @Semantics.amount.currencyCode: 'ReportingCurrency'      
  case
    when TaxBox = '06' or TaxBox = '10' or TaxBox = '11' or TaxBox = '62' or TaxBox = '63' then AmountInReportingCurrency
    else - AmountInReportingCurrency
  end as AmountInReportingCurrency,
  
  @Semantics.currencyCode:true
  DocumentCurrency,
  
  @DefaultAggregation:#SUM
  @Semantics.amount.currencyCode: 'DocumentCurrency'      
  case
    when TaxBox = '06' or TaxBox = '10' or TaxBox = '11' or TaxBox = '62' or TaxBox = '63' then AmountInTransactionCurrency
    else - AmountInTransactionCurrency
  end as AmountInTransactionCurrency,
  
  @Semantics.currencyCode:true
  AdditionalCurrency1,
  
  @DefaultAggregation:#SUM
  @Semantics.amount.currencyCode: 'AdditionalCurrency1'      
  case
    when TaxBox = '06' or TaxBox = '10' or TaxBox = '11' or TaxBox = '62' or TaxBox = '63' then AmountInAdditionalCurrency1
    else - AmountInAdditionalCurrency1
  end as AmountInAdditionalCurrency1,
  
  @Semantics.currencyCode:true
  AdditionalCurrency2,
  
  @DefaultAggregation:#SUM
  @Semantics.amount.currencyCode: 'AdditionalCurrency2'      
  case
    when TaxBox = '06' or TaxBox = '10' or TaxBox = '11' or TaxBox = '62' or TaxBox = '63' then AmountInAdditionalCurrency2
    else - AmountInAdditionalCurrency2
  end as AmountInAdditionalCurrency2
}
where
  // Consider only already accepted runs

  I_StRpRepRun.StatryRptRunStatus = 'SOK'
  // Filter the documents where configuration is not maintained

  and TaxDeclnAmountType <> '' 
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_STRPJOURNALENTRYLOG",
"I_STRPREPRUN",
"I_STRPTAXITEMBOXCUBE"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/