P_ES_TaxReturnBoxATRCheckCorr

DDL: P_ES_TAXRETURNBOXATRCHECKCORR SQL: PESBOXATRCHKCORR Type: view COMPOSITE

P_ES_TaxReturnBoxATRCheckCorr is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_StRpTaxItemBoxConfiguration) and exposes 15 fields with key fields Country, TaxCode, TransactionTypeDetermination, DebitCreditCode, TaxDeclnAmountType.

Data Sources (1)

SourceAliasJoin Type
I_StRpTaxItemBoxConfiguration I_StRpTaxItemBoxConfiguration from

Parameters (1)

NameTypeDefault
P_TaxBoxConfiguration figen_tdt_taxbox_config

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PESBOXATRCHKCORR view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.dataClass #CUSTOMIZING view
AbapCatalog.preserveKey true view

Fields (15)

KeyFieldSource TableSource FieldDescription
KEY Country Country
KEY TaxCode TaxCode
KEY TransactionTypeDetermination TransactionTypeDetermination
KEY DebitCreditCode DebitCreditCode
KEY TaxDeclnAmountType TaxDeclnAmountType
KEY TaxBoxStrucValidityStartDate TaxBoxStrucValidityStartDate
KEY UnifiedTaxBoxStructureType UnifiedTaxBoxStructureType
KEY AccountingDocumentType AccountingDocumentType
KEY SupplierAccountGroup SupplierAccountGroup
KEY TaxRateValidityStartDate TaxRateValidityStartDate
KEY SpecialGLCode SpecialGLCode
KEY TaxCountry TaxCountry
TaxBoxStrucValidityEndDate TaxBoxStrucValidityEndDate
TaxRateValidityEndDate TaxRateValidityEndDate
InCorrectionBox
@AbapCatalog.sqlViewName: 'PESBOXATRCHKCORR'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private: true
@VDM.viewType: #COMPOSITE
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.sizeCategory: #M
@ObjectModel.usageType.serviceQuality: #B
@ObjectModel.usageType.dataClass: #CUSTOMIZING
@AbapCatalog.preserveKey: true

define view P_ES_TaxReturnBoxATRCheckCorr
  with parameters
    P_TaxBoxConfiguration : figen_tdt_taxbox_config
  as select from I_StRpTaxItemBoxConfiguration ( P_TaxBoxConfiguration  : $parameters.P_TaxBoxConfiguration )
{
  key Country,
      // key TaxItemGroupingVersion, // Superfluous, already covered by UnifiedTaxBoxStructureType

  key TaxCode,
  key TransactionTypeDetermination,
  key DebitCreditCode,
  key TaxDeclnAmountType,
  key TaxBoxStrucValidityStartDate,
  key UnifiedTaxBoxStructureType,
      // key TaxBoxStructureType, // Superfluous, already covered by UnifiedTaxBoxStructureType

  key AccountingDocumentType,
  key SupplierAccountGroup,
  key TaxRateValidityStartDate,
  key SpecialGLCode,
  key TaxCountry,
      // key TaxJurisdiction // Not Propagated

      TaxBoxStrucValidityEndDate, // Boud to TaxBoxStrucValidityStartDate

      TaxRateValidityEndDate, // Bound to TaxRateValidityStartDate

      'X' as InCorrectionBox
}
where
  // Output VAT

     TaxBox = '14' // Correction invoices taxable amount

  or TaxBox = '15' // Correction invoices tax amount

  or TaxBox = '25' // Correction invoices taxable amount Equalization VAT

  or TaxBox = '26' // Correction invoices tax amount Equalization VAT (Only equalization VAT ASB)

  // Input VAT

  or TaxBox = '40' // Correction invoices taxable amount

  or TaxBox = '41' // Correction invoices tax amount

group by
  Country,
  TaxCode,
  TransactionTypeDetermination,
  DebitCreditCode,
  TaxDeclnAmountType,
  TaxBoxStrucValidityStartDate,
  UnifiedTaxBoxStructureType,
  AccountingDocumentType,
  SupplierAccountGroup,
  TaxRateValidityStartDate,
  SpecialGLCode,
  TaxCountry,
  TaxBoxStrucValidityEndDate,
  TaxRateValidityEndDate
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_STRPTAXITEMBOXCONFIGURATION"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/