C_ID_StRpVATInb
Tax Items for ID VAT IN Statutory Report
C_ID_StRpVATInb is a Consumption CDS View that provides data about "Tax Items for ID VAT IN Statutory Report" in SAP S/4HANA. It reads from 2 data sources (I_AcctDocCustomer, I_AccountingDocument) and exposes 23 fields with key fields CompanyCode, FiscalYear, AccountingDocument, TaxBoxStrucValidityStartDate, TaxBoxStructureType. It has 1 association to related views.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_AcctDocCustomer | _AccDocCust | inner |
| I_AccountingDocument | I_AccountingDocument | from |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_Supplier | _Supplier | $projection.Supplier = _Supplier.Supplier |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | CIDSRVATIN | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_INCLUDED | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| EndUserText.label | Tax Items for ID VAT IN Statutory Report | view |
Fields (23)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | I_AccountingDocument | CompanyCode | |
| KEY | FiscalYear | I_AccountingDocument | FiscalYear | |
| KEY | AccountingDocument | I_AccountingDocument | AccountingDocument | |
| KEY | TaxBoxStrucValidityStartDate | _TaxItem | TaxBoxStrucValidityStartDate | |
| KEY | TaxBoxStructureType | _TaxItem | TaxBoxStructureType | |
| TransactionCode | TransactionCode | |||
| AccountingDocumentType | I_AccountingDocument | AccountingDocumentType | ||
| BusinessPlace | I_AcctDocCustomer | BusinessPlace | ||
| AccountingDocumentHeaderText | I_AccountingDocument | AccountingDocumentHeaderText | ||
| DocumentReferenceID | ||||
| FiscalPeriod | ||||
| BillingDate | I_AccountingDocument | DocumentDate | ||
| DocumentDate | ||||
| PostingDate | I_AccountingDocument | PostingDate | ||
| Currency | Currency | |||
| InvoiceDocumentNumber | ||||
| Supplier | I_AcctDocCustomer | Supplier | ||
| TaxNumber1 | ||||
| SupplierName | ||||
| AddressLine1 | ||||
| TaxBaseAmountInCoCodeCrcy | ||||
| TaxAmount | ||||
| LuxuryTaxAmt |
@AbapCatalog.sqlViewName: 'CIDSRVATIN'
@VDM.viewType: #CONSUMPTION
@AbapCatalog.compiler.compareFilter: true
@AccessControl.personalData.blocking: #BLOCKED_DATA_INCLUDED
@AccessControl.authorizationCheck: #CHECK
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.dataClass: #MIXED
@EndUserText.label: 'Tax Items for ID VAT IN Statutory Report'
define view C_ID_StRpVATInb
as select from I_AccountingDocument
// association [0..1] to I_ReceivablesPayablesItem as _items on $projection.CompanyCode = _items.CompanyCode
// and $projection.FiscalYear = _items.FiscalYear
// and $projection.AccountingDocument = _items.AccountingDocument
// and _items.Creditor != ''
inner join I_AcctDocCustomer as _AccDocCust on I_AccountingDocument.CompanyCode = _AccDocCust.CompanyCode
and I_AccountingDocument.FiscalYear = _AccDocCust.FiscalYear
and I_AccountingDocument.AccountingDocument = _AccDocCust.AccountingDocument
and _AccDocCust.Supplier != ''
left outer to one join I_ID_StRpTaxItemGrp as _TaxItem on I_AccountingDocument.CompanyCode = _TaxItem.CompanyCode
and I_AccountingDocument.FiscalYear = _TaxItem.FiscalYear
and I_AccountingDocument.AccountingDocument = _TaxItem.AccountingDocument
left outer to one join I_StRpTaxItemBoxCube as _taxbox on I_AccountingDocument.CompanyCode = _taxbox.CompanyCode
and I_AccountingDocument.FiscalYear = _taxbox.FiscalYear
and I_AccountingDocument.AccountingDocument = _taxbox.AccountingDocument
and _TaxItem.TaxBoxStrucValidityStartDate = _taxbox.ValidFrom
and _TaxItem.TaxBoxStructureType = _taxbox.TaxBoxStructureType
and (
_taxbox.TaxBox = 'VAT_IN_NVV'
or _taxbox.TaxBox = 'VAT_IN_WAPU'
or _taxbox.TaxBox = 'VAT_IN_NVV2'
or _taxbox.TaxBox = 'VAT_IN_TAX'
)
association [0..1] to I_Supplier as _Supplier on $projection.Supplier = _Supplier.Supplier
{
key I_AccountingDocument.CompanyCode,
key I_AccountingDocument.FiscalYear,
key I_AccountingDocument.AccountingDocument,
key _TaxItem.TaxBoxStrucValidityStartDate as TaxBoxStrucValidityStartDate,
key _TaxItem.TaxBoxStructureType,
TransactionCode,
I_AccountingDocument.AccountingDocumentType,
_AccDocCust.BusinessPlace as BusinessPlace,
I_AccountingDocument.AccountingDocumentHeaderText,
substring(I_AccountingDocument.DocumentReferenceID, 4, 16) as DocumentReferenceID,
ltrim( I_AccountingDocument.FiscalPeriod, '0') as FiscalPeriod,
I_AccountingDocument.DocumentDate as BillingDate,
concat(substring(I_AccountingDocument.DocumentDate, 7, 2),concat('/', concat(substring(I_AccountingDocument.DocumentDate, 5, 2),concat('/', substring(I_AccountingDocument.DocumentDate, 1, 4))))) as DocumentDate,
I_AccountingDocument.PostingDate,
cast(case dats_is_valid(I_AccountingDocument.TaxReportingDate)
when 1 then
I_AccountingDocument.TaxReportingDate
else
I_AccountingDocument.PostingDate
end as glo_reporting_date ) as ReportingDate,
@Semantics.currencyCode: true
Currency,
substring(OriginalReferenceDocument, 1, 10) as InvoiceDocumentNumber,
_AccDocCust.Supplier,
replace(replace(_Supplier.TaxNumber1, '.', '' ),'-','') as TaxNumber1,
replace(_Supplier.SupplierName, ',', ' ' ) as SupplierName,
replace(concat_with_space( concat_with_space( concat_with_space( concat_with_space(_Supplier._AddressRepresentation.HouseNumber,_Supplier.CityName, 1), _Supplier._AddressRepresentation.Region, 1), _Supplier._AddressRepresentation.PostalCode, 1), _Supplier.Country,1), ',', ' ' ) as AddressLine1,
@Semantics.amount.currencyCode: 'Currency'
abs(_TaxItem.TaxBaseAmountInCoCodeCrcy) as TaxBaseAmountInCoCodeCrcy,
@Semantics.amount.currencyCode: 'Currency'
abs(_TaxItem.TotalTaxAmount) as TaxAmount,
@Semantics.amount.currencyCode: 'Currency'
abs(_TaxItem.LuxuryTaxRate) as LuxuryTaxAmt,
case _taxbox.TaxBox
when 'VAT_IN_TAX' then 1
when 'VAT_IN_NVV' then 0
when 'VAT_IN_NVV2' then 0
when 'VAT_IN_WAPU' then 0
else 1
end as TaxIsNotDeductible
}
where
not(
I_AccountingDocument.IsReversal = 'X'
or I_AccountingDocument.IsReversed = 'X'
or I_AccountingDocument.ReferenceDocumentType = 'VBRK'
or I_AccountingDocument.ReferenceDocumentType = 'MKPF'
)
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ACCOUNTINGDOCUMENT",
"I_ACCTDOCCUSTOMER",
"I_ADDRESS_2",
"I_ID_STRPTAXITEMGRP",
"I_STRPTAXITEMBOXCUBE",
"I_SUPPLIER"
],
"ASSOCIATED":
[
"I_SUPPLIER"
],
"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