P_ES_TaxReturnBoxATR
P_ES_TaxReturnBoxATR is a Consumption CDS View in SAP S/4HANA. It reads from 2 data sources (I_StRpTaxReturnBoxCube, P_T007B_GLO) and exposes 68 fields with key fields CompanyCode, AccountingDocument, FiscalYear, TaxItem, TaxCode.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_StRpTaxReturnBoxCube | I_StRpTaxReturnBoxCube | from |
| P_T007B_GLO | P_T007B_GLO | left_outer |
Parameters (4)
| Name | Type | Default |
|---|---|---|
| P_StatryRptgEntity | srf_reporting_entity | |
| P_StatryRptCategory | srf_rep_cat_id | |
| P_StatryRptRunID | srf_report_run_id | |
| P_ReportingCountry | land1 |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PESTAXRETBOXATR | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| AbapCatalog.preserveKey | true | view |
Fields (68)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | I_StRpTaxReturnBoxCube | CompanyCode | |
| KEY | AccountingDocument | AccountingDocument | ||
| KEY | FiscalYear | FiscalYear | ||
| KEY | TaxItem | TaxItem | ||
| KEY | TaxCode | I_StRpTaxReturnBoxCube | TaxCode | |
| KEY | TransactionTypeDetermination | I_StRpTaxReturnBoxCube | TransactionTypeDetermination | |
| KEY | TaxBox | TaxBox | ||
| KEY | TaxGroup | TaxGroup | ||
| KEY | Country | I_StRpTaxReturnBoxCube | Country | |
| KEY | TaxDeclnAmountType | I_StRpTaxReturnBoxCube | TaxDeclnAmountType | |
| KEY | UnifiedTaxBoxStructureType | I_StRpTaxReturnBoxCube | UnifiedTaxBoxStructureType | |
| KEY | ValidFrom | ValidFrom | ||
| KEY | StatryRptgEntity | StatryRptgEntity | ||
| KEY | StatryRptCategory | StatryRptCategory | ||
| KEY | StatryRptRunID | StatryRptRunID | ||
| StatryRptRun | I_StRpTaxReturnBoxCube | StatryRptRun | ||
| TaxItemGroupingVersion | TaxItemGroupingVersion | |||
| TaxBoxStructureType | TaxBoxStructureType | |||
| ValidTo | ValidTo | |||
| DebitCreditCode | I_StRpTaxReturnBoxCube | DebitCreditCode | ||
| TaxCalculationProcedure | TaxCalculationProcedure | |||
| TaxRate | TaxRate | |||
| TaxRateValidityStartDate | I_StRpTaxReturnBoxCube | TaxRateValidityStartDate | ||
| GLAccount | GLAccount | |||
| TaxItemGroup | TaxItemGroup | |||
| BusinessPlace | BusinessPlace | |||
| TaxJurisdiction | TaxJurisdiction | |||
| LowestLevelTaxJurisdiction | LowestLevelTaxJurisdiction | |||
| AccountingDocumentType | I_StRpTaxReturnBoxCube | AccountingDocumentType | ||
| ReferenceDocumentType | ReferenceDocumentType | |||
| CAReconciliationKey | I_StRpTaxReturnBoxCube | CAReconciliationKey | ||
| ReverseDocument | ReverseDocument | |||
| ReverseDocumentFiscalYear | ReverseDocumentFiscalYear | |||
| DocumentReferenceID | DocumentReferenceID | |||
| Ledger | Ledger | |||
| LedgerGroup | LedgerGroup | |||
| PostingDate | PostingDate | |||
| DocumentDate | DocumentDate | |||
| TaxReportingDate | TaxReportingDate | |||
| ReportingDate | ReportingDate | |||
| TaxType | TaxType | |||
| IsReversal | IsReversal | |||
| IsReversed | IsReversed | |||
| FiscalPeriod | FiscalPeriod | |||
| ExchangeRate | ExchangeRate | |||
| AccountingDocumentHeaderText | AccountingDocumentHeaderText | |||
| CompanyCodeCountry | CompanyCodeCountry | |||
| ReportingCountry | ReportingCountry | |||
| TaxReturnCountry | TaxReturnCountry | |||
| CompanyCodeCurrency | CompanyCodeCurrency | |||
| CountryCurrency | CountryCurrency | |||
| DocumentCurrency | DocumentCurrency | |||
| ReportingCurrency | ReportingCurrency | |||
| AdditionalCurrency1 | AdditionalCurrency1 | |||
| AdditionalCurrency2 | AdditionalCurrency2 | |||
| TargetTaxCode | TargetTaxCode | |||
| TaxNumber1 | TaxNumber1 | |||
| TaxNumber2 | TaxNumber2 | |||
| TaxNumber3 | TaxNumber3 | |||
| BusinessPartner | BusinessPartner | |||
| BusinessPartnerName | BusinessPartnerName | |||
| BusinessPartnerCountry | I_StRpTaxReturnBoxCube | BusinessPartnerCountry | ||
| CustomerSupplierAddress | CustomerSupplierAddress | |||
| TaxIsNotDeductible | TaxIsNotDeductible | |||
| TaxBoxStructure | TaxBoxStructure | |||
| TaxBoxName | TaxBoxName | |||
| TaxBoxAggregationOperation | TaxBoxAggregationOperation | |||
| TaxCountry | I_StRpTaxReturnBoxCube | TaxCountry |
@AbapCatalog.sqlViewName: 'PESTAXRETBOXATR'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private: true
@VDM.viewType: #CONSUMPTION
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.serviceQuality: #X
@ObjectModel.usageType.dataClass: #MIXED
@AbapCatalog.preserveKey: true
define view P_ES_TaxReturnBoxATR
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' // 1 = T007* 2 = VG_CUST 3 = T007* and VG_CUST
)
left outer join P_T007B_GLO on P_T007B_GLO.ktosl = I_StRpTaxReturnBoxCube.TransactionTypeDetermination
{
key I_StRpTaxReturnBoxCube.CompanyCode,
key AccountingDocument,
key FiscalYear,
key TaxItem,
key I_StRpTaxReturnBoxCube.TaxCode,
key I_StRpTaxReturnBoxCube.TransactionTypeDetermination,
key TaxBox,
key TaxGroup,
key I_StRpTaxReturnBoxCube.Country,
key I_StRpTaxReturnBoxCube.TaxDeclnAmountType,
key I_StRpTaxReturnBoxCube.UnifiedTaxBoxStructureType,
key ValidFrom,
key StatryRptgEntity,
key StatryRptCategory,
key StatryRptRunID,
I_StRpTaxReturnBoxCube.StatryRptRun,
TaxItemGroupingVersion,
TaxBoxStructureType,
ValidTo,
I_StRpTaxReturnBoxCube.DebitCreditCode,
TaxCalculationProcedure,
TaxRate,
I_StRpTaxReturnBoxCube.TaxRateValidityStartDate,
GLAccount,
TaxItemGroup,
BusinessPlace,
TaxJurisdiction,
LowestLevelTaxJurisdiction,
I_StRpTaxReturnBoxCube.AccountingDocumentType,
ReferenceDocumentType,
I_StRpTaxReturnBoxCube.CAReconciliationKey,
ReverseDocument,
ReverseDocumentFiscalYear,
DocumentReferenceID,
Ledger,
LedgerGroup,
PostingDate,
DocumentDate,
TaxReportingDate,
ReportingDate,
TaxType,
IsReversal,
IsReversed,
FiscalPeriod,
ExchangeRate,
AccountingDocumentHeaderText,
CompanyCodeCountry,
ReportingCountry,
TaxReturnCountry,
CompanyCodeCurrency,
CountryCurrency,
DocumentCurrency,
ReportingCurrency,
AdditionalCurrency1,
AdditionalCurrency2,
@Semantics.amount.currencyCode: 'ReportingCurrency'
case P_T007B_GLO.stgrp
when '2' then AmountInReportingCurrency
else -AmountInReportingCurrency
end as AmountInReportingCurrency,
@Semantics.amount.currencyCode: 'DocumentCurrency'
case P_T007B_GLO.stgrp
when '2' then AmountInTransactionCurrency
else -AmountInTransactionCurrency
end as AmountInTransactionCurrency,
@Semantics.amount.currencyCode: 'ReportingCurrency'
case P_T007B_GLO.stgrp
when '2' then TaxBaseAmountInRptgCrcy
else -TaxBaseAmountInRptgCrcy
end as TaxBaseAmountInRptgCrcy,
@Semantics.amount.currencyCode: 'ReportingCurrency'
case P_T007B_GLO.stgrp
when '2' then TaxAmountInRptgCrcy
else -TaxAmountInRptgCrcy
end as TaxAmountInRptgCrcy,
@Semantics.amount.currencyCode: 'CompanyCodeCurrency'
case P_T007B_GLO.stgrp
when '2' then TaxBaseAmountInCoCodeCrcy
else -TaxBaseAmountInCoCodeCrcy
end as TaxBaseAmountInCoCodeCrcy,
@Semantics.amount.currencyCode: 'CompanyCodeCurrency'
case P_T007B_GLO.stgrp
when '2' then TaxAmountInCoCodeCrcy
else -TaxAmountInCoCodeCrcy
end as TaxAmountInCoCodeCrcy,
@Semantics.amount.currencyCode: 'DocumentCurrency'
case P_T007B_GLO.stgrp
when '2' then TaxBaseAmountInTransCrcy
else -TaxBaseAmountInTransCrcy
end as TaxBaseAmountInTransCrcy,
@Semantics.amount.currencyCode: 'DocumentCurrency'
case P_T007B_GLO.stgrp
when '2' then TaxAmount
else -TaxAmount
end as TaxAmount,
@Semantics.amount.currencyCode: 'CountryCurrency'
case P_T007B_GLO.stgrp
when '2' then TaxBaseAmountInCountryCrcy
else -TaxBaseAmountInCountryCrcy
end as TaxBaseAmountInCountryCrcy,
@Semantics.amount.currencyCode: 'CountryCurrency'
case P_T007B_GLO.stgrp
when '2' then TaxAmountInCountryCrcy
else -TaxAmountInCountryCrcy
end as TaxAmountInCountryCrcy,
@Semantics.amount.currencyCode: 'AdditionalCurrency1'
case P_T007B_GLO.stgrp
when '2' then TaxBaseAmtInAdditionalCrcy1
else -TaxBaseAmtInAdditionalCrcy1
end as TaxBaseAmtInAdditionalCrcy1,
@Semantics.amount.currencyCode: 'AdditionalCurrency1'
case P_T007B_GLO.stgrp
when '2' then TaxAmountInAdditionalCurrency1
else -TaxAmountInAdditionalCurrency1
end as TaxAmountInAdditionalCurrency1,
@Semantics.amount.currencyCode: 'AdditionalCurrency2'
case P_T007B_GLO.stgrp
when '2' then TaxBaseAmtInAdditionalCrcy2
else -TaxBaseAmtInAdditionalCrcy2
end as TaxBaseAmtInAdditionalCrcy2,
@Semantics.amount.currencyCode: 'AdditionalCurrency2'
case P_T007B_GLO.stgrp
when '2' then TaxAmountInAdditionalCurrency2
else -TaxAmountInAdditionalCurrency2
end as TaxAmountInAdditionalCurrency2,
TargetTaxCode,
TaxNumber1,
TaxNumber2,
TaxNumber3,
BusinessPartner,
BusinessPartnerName,
I_StRpTaxReturnBoxCube.BusinessPartnerCountry,
CustomerSupplierAddress,
TaxIsNotDeductible,
TaxBoxStructure,
TaxBoxName,
TaxBoxAggregationOperation,
I_StRpTaxReturnBoxCube.TaxCountry
}
where
IsVATRelevant = 'X'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_STRPTAXRETURNBOXCUBE",
"P_T007B_GLO"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA