P_PL_SAFTTAXITEMAGG
SAF-T PL Tax Item Basic
P_PL_SAFTTAXITEMAGG is a CDS View in S/4HANA. SAF-T PL Tax Item Basic. It contains 28 fields. 4 CDS views read from this table.
CDS Views using this table (4)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| P_PL_SAFTBusinessPartner | view | from | COMPOSITE | SAFT PL Business Partner |
| P_PL_SAFTCountryVAT | view | from | COMPOSITE | SAFT PL VAT Country |
| P_PL_SAFTDocItemVat | view | from | COMPOSITE | SAFT PL VAT Number Document Line Item |
| P_PL_SAFTTaxItemBasic | view | from | COMPOSITE | SAF-T PL Tax Item Basic |
Fields (28)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | AccountingDocument | AccountingDocument | 2 |
| KEY | CompanyCode | CompanyCode | 2 |
| KEY | FiscalYear | FiscalYear | 2 |
| KEY | TaxType | TaxType | 2 |
| BusinessPartnerName | BusinessPartnerName | 1 | |
| CompanyCodeCurrency | CompanyCodeCurrency | 1 | |
| Customer | Customer | 1 | |
| CustomerSupplierAddress | CustomerSupplierAddress | 1 | |
| DocumentCurrency | DocumentCurrency | 1 | |
| DocumentDate | DocumentDate | 1 | |
| DocumentItemText | DocumentItemText | 1 | |
| DocumentReferenceID | DocumentReferenceID | 1 | |
| OriginalReferenceDocument | OriginalReferenceDocument | 1 | |
| PL_SAFTAddlClassification | PL_SAFTAddlClassification | 1 | |
| PL_SAFTBaseAmountBoxMultiple | PL_SAFTBaseAmountBoxMultiple | 1 | |
| PL_SAFTDocumentType | PL_SAFTDocumentType | 1 | |
| PL_SAFTInvcExclRsnFromTotals | PL_SAFTInvcExclRsnFromTotals | 1 | |
| PL_SAFTTaxAmountBox | PL_SAFTTaxAmountBox | 1 | |
| PL_SAFTTaxItemHasMarginAmount | PL_SAFTTaxItemHasMarginAmount | 1 | |
| ReferenceDocumentType | ReferenceDocumentType | 1 | |
| Supplier | Supplier | 1 | |
| TaxAmountInCoCodeCrcy | TaxAmountInCoCodeCrcy | 1 | |
| TaxAmountInCountryCrcy | TaxAmountInCountryCrcy | 1 | |
| TaxBaseAmountInCoCodeCrcy | TaxBaseAmountInCoCodeCrcy | 1 | |
| TaxBaseAmountInCountryCrcy | TaxBaseAmountInCountryCrcy | 1 | |
| TaxCalculationProcedure | TaxCalculationProcedure | 1 | |
| TaxReportingDate | TaxReportingDate | 1 | |
| TaxReturnCountry | TaxReturnCountry | 1 |
@AbapCatalog.sqlViewName: 'PPLSAFTTAXITMAGG'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #COMPOSITE
@VDM.private: true
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #P
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_PL_SAFTTaxItemAgg
as select from P_PL_SAFTTaxItemBasicAgg as a
left outer to one join P_PL_SAFTDocumentItemText as t on t.CompanyCode = a.CompanyCode
and t.AccountingDocument = a.AccountingDocument
and t.FiscalYear = a.FiscalYear
association [0..1] to I_Country as _Country on $projection.BusinessPartnerCountry = _Country.Country
{
key a.TaxType,
key a.CompanyCode,
key a.AccountingDocument,
key a.FiscalYear,
a.PL_SAFTTaxAmountBox,
a.PL_SAFTBaseAmountBoxMultiple,
a.PL_SAFTDocumentType,
a.PL_SAFTTaxItemHasMarginAmount,
a.PL_SAFTAddlClassification,
a.PL_SAFTInvcExclRsnFromTotals,
a.TaxReportingDate,
a.TaxReturnCountry,
a.TaxCalculationProcedure,
a.Customer,
a.Supplier,
a.ReferenceDocumentType,
a.OriginalReferenceDocument,
t.DocumentItemText,
a.BusinessPartnerCountry,
a.VATRegistration,
a.BusinessPartnerName,
a.CustomerSupplierAddress,
a.DocumentReferenceID,
a.DocumentDate,
@Semantics.currencyCode: true
a.CompanyCodeCurrency,
@Semantics.amount.currencyCode: 'CompanyCodeCurrency'
sum(a.TaxAmountInCoCodeCrcy) as TaxAmountInCoCodeCrcy,
@Semantics.amount.currencyCode: 'CompanyCodeCurrency'
sum(a.TaxBaseAmountInCoCodeCrcy) as TaxBaseAmountInCoCodeCrcy,
@Semantics.currencyCode:true
a.DocumentCurrency,
@Semantics.amount.currencyCode: 'DocumentCurrency'
sum(a.TaxBaseAmountInCountryCrcy) as TaxBaseAmountInCountryCrcy,
@Semantics.amount.currencyCode : 'DocumentCurrency'
sum(a.TaxAmountInCountryCrcy) as TaxAmountInCountryCrcy,
a.BillingDocument,
substring(a.VATRegistration,1,2) as VATCountry,
a._AccountingDocument,
_Country
}
group by
a.TaxType,
a.CompanyCode,
a.AccountingDocument,
a.FiscalYear,
a.PL_SAFTTaxAmountBox,
a.PL_SAFTBaseAmountBoxMultiple,
a.TaxReportingDate,
a.TaxReturnCountry,
a.TaxCalculationProcedure,
a.Customer,
a.Supplier,
a.ReferenceDocumentType,
a.OriginalReferenceDocument,
t.DocumentItemText,
a.BusinessPartnerCountry,
a.VATRegistration,
a.BusinessPartnerName,
a.CustomerSupplierAddress,
a.DocumentReferenceID,
a.DocumentDate,
a.CompanyCodeCurrency,
a.DocumentCurrency,
a.PL_SAFTDocumentType,
a.PL_SAFTTaxItemHasMarginAmount,
a.PL_SAFTAddlClassification,
a.PL_SAFTInvcExclRsnFromTotals,
a.BillingDocument