C_ID_StRpVATImportCube

DDL: C_ID_STRPVATIMPORTCUBE SQL: CIDSTRVATIMPCUBE Type: view CONSUMPTION Package: GLO_FIN_IS_VAT_ID

Cube View for ID Imports VAT Report

C_ID_StRpVATImportCube is a Consumption CDS View (Cube) that provides data about "Cube View for ID Imports VAT Report" in SAP S/4HANA. It reads from 2 data sources (I_AcctDocCustomer, I_AccountingDocument) and exposes 26 fields with key fields CompanyCode, AccountingDocument, FiscalYear, TaxBoxStrucValidityStartDate, UnifiedTaxBoxStructureType. It has 2 associations to related views. Part of development package GLO_FIN_IS_VAT_ID.

Data Sources (2)

SourceAliasJoin Type
I_AcctDocCustomer _AccDocSuppl inner
I_AccountingDocument I_AccountingDocument from

Parameters (7)

NameTypeDefault
P_CompanyCode fis_bukrs
P_FiscalYear gjahr
P_StatryRptgEntity srf_reporting_entity
P_StatryRptCategory srf_rep_cat_id
P_StatryRptRunID srf_report_run_id
P_ReportingCountry land1
P_TaxBoxConfiguration figen_tdt_taxbox_config

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_Supplier _Supplier $projection.Supplier = _Supplier.Supplier
[0..1] I_Customer _Customer $projection.Customer = _Customer.Customer

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName CIDSTRVATIMPCUBE view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
Analytics.dataCategory #CUBE view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.allowExtensions true view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XXL view
VDM.viewType #CONSUMPTION view
EndUserText.label Cube View for ID Imports VAT Report view

Fields (26)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_AccountingDocument CompanyCode Receiver Company Code
KEY AccountingDocument I_AccountingDocument AccountingDocument Journal Entry
KEY FiscalYear I_AccountingDocument FiscalYear G/L Fiscal Year
KEY TaxBoxStrucValidityStartDate _TaxItem TaxBoxStrucValidityStartDate
KEY UnifiedTaxBoxStructureType _TaxItem UnifiedTaxBoxStructureType
TaxBoxStructureType
FiscalPeriod I_AccountingDocument FiscalPeriod Tax period
PostingDate I_AccountingDocument PostingDate Posting Date for GR
TaxCode _TaxItem TaxCode Tax Code
TaxRateValidityStartDate _TaxItem TaxRateValidityStartDate Tax Rate Validity Start Date
TaxBoxStrucValidityEndDate _TaxItem TaxBoxStrucValidityEndDate
TaxRate
BusinessPlace I_AcctDocCustomer BusinessPlace Business place
SupplierendasCustomerSupplierAccount
Customer I_AcctDocCustomer Customer Sold-to Party
Supplier I_AcctDocCustomer Supplier Supplier
CompanyCodeCurrency I_AccountingDocument CompanyCodeCurrency Local Currency
AccountingDocumentHeaderText I_AccountingDocument AccountingDocumentHeaderText Doc.Header Text
Reference1InDocumentHeader I_AccountingDocument Reference1InDocumentHeader Reference 1
Reference2InDocumentHeader I_AccountingDocument Reference2InDocumentHeader Reference 2
OriginalReferenceDocument I_AccountingDocument OriginalReferenceDocument Reference Key
TotalTaxAmountendasTaxAmount
TaxAmountInCoCodeCrcyendasLuxuryTaxAmt
BPSupplierNameasSupplierName
Country1asSupplierAddress
endendasTaxNumber1

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view C_ID_StRpVATImportCube.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: CIDSTRVATIMPCUBE
-- Parameters: P_CompanyCode : fis_bukrs, P_FiscalYear : gjahr, P_StatryRptgEntity : srf_reporting_entity, P_StatryRptCategory : srf_rep_cat_id, P_StatryRptRunID : srf_report_run_id, P_ReportingCountry : land1, P_TaxBoxConfiguration : figen_tdt_taxbox_config

CREATE VIEW C_ID_StRpVATImportCube AS
SELECT
  I_AccountingDocument.CompanyCode AS CompanyCode,
  I_AccountingDocument.AccountingDocument AS AccountingDocument,
  I_AccountingDocument.FiscalYear AS FiscalYear,
  _TaxItem.TaxBoxStrucValidityStartDate AS TaxBoxStrucValidityStartDate,
  _TaxItem.UnifiedTaxBoxStructureType AS UnifiedTaxBoxStructureType,
  cast('' as fot_atr_tax_box_struct_type ) AS TaxBoxStructureType,
  I_AccountingDocument.FiscalPeriod AS FiscalPeriod,
  I_AccountingDocument.PostingDate AS PostingDate,
  _TaxItem.TaxCode AS TaxCode,
  _TaxItem.TaxRateValidityStartDate AS TaxRateValidityStartDate,
  _TaxItem.TaxBoxStrucValidityEndDate AS TaxBoxStrucValidityEndDate,
  _TaxItem._StRpBPTaxItem.TaxRate AS TaxRate,
  _AccDocSuppl.BusinessPlace AS BusinessPlace,
  case when _AccDocSuppl.Customer != '' then _AccDocSuppl.Customer else _AccDocSuppl.Supplier end as CustomerSupplierAccount AS SupplierendasCustomerSupplierAccount,
  _AccDocSuppl.Customer AS Customer,
  _AccDocSuppl.Supplier AS Supplier,
  I_AccountingDocument.CompanyCodeCurrency AS CompanyCodeCurrency,
  I_AccountingDocument.AccountingDocumentHeaderText AS AccountingDocumentHeaderText,
  I_AccountingDocument.Reference1InDocumentHeader AS Reference1InDocumentHeader,
  I_AccountingDocument.Reference2InDocumentHeader AS Reference2InDocumentHeader,
  I_AccountingDocument.OriginalReferenceDocument AS OriginalReferenceDocument,
  case when _AccDocSuppl.IsNegativePosting = 'X' then -(_TaxItem.TotalTaxAmount) else _TaxItem.TotalTaxAmount end as TaxAmount AS TotalTaxAmountendasTaxAmount,
  case when _AccDocSuppl.IsNegativePosting = 'X' then -(_TaxItem.TaxAmountInCoCodeCrcy) else _TaxItem.TaxAmountInCoCodeCrcy end as LuxuryTaxAmt AS TaxAmountInCoCodeCrcyendasLuxuryTaxAmt,
  replace(coalesce(concat(concat(concat( _TaxItem._OneTimeAccountBP.BusinessPartnerName1, _TaxItem._OneTimeAccountBP.BusinessPartnerName2), _TaxItem._OneTimeAccountBP.BusinessPartnerName3), _TaxItem._OneTimeAccountBP.BusinessPartnerName4), coalesce(_Customer.BPCustomerName, _Supplier.BPSupplierName)), ',', ' ' ) as SupplierName AS BPSupplierNameasSupplierName,
  coalesce(_TaxItem.AddressLine2, coalesce(concat_with_space(concat_with_space(concat_with_space(concat_with_space(concat_with_space(concat( concat(_Customer._AddressDefaultRepresentation.StreetPrefixName1, ','), _Customer._AddressDefaultRepresentation.StreetPrefixName2), concat_with_space(_Customer._AddressDefaultRepresentation.StreetName, _Customer._AddressDefaultRepresentation.HouseNumber, 1), 1), concat(concat(_Customer._AddressDefaultRepresentation.StreetSuffixName1, ','), _Customer._AddressDefaultRepresentation.StreetSuffixName2), 1), concat(concat(_Customer._AddressDefaultRepresentation.VillageName, ','), _Customer._AddressDefaultRepresentation.DistrictName), 1), concat(concat(_Customer._AddressDefaultRepresentation.CityName, ','), _Customer._AddressDefaultRepresentation.PostalCode), 1), _Customer._AddressDefaultRepresentation.Country, 1), concat_with_space(concat_with_space(concat_with_space(concat_with_space(concat_with_space(concat( concat(_Supplier._AddressDefaultRepresentation.StreetPrefixName1, ','), _Supplier._AddressDefaultRepresentation.StreetPrefixName2), concat_with_space(_Supplier._AddressDefaultRepresentation.StreetName, _Supplier._AddressDefaultRepresentation.HouseNumber, 1), 1), concat(concat(_Supplier._AddressDefaultRepresentation.StreetSuffixName1, ','), _Supplier._AddressDefaultRepresentation.StreetSuffixName2), 1), concat(concat(_Supplier._AddressDefaultRepresentation.VillageName, ','), _Supplier._AddressDefaultRepresentation.DistrictName), 1), concat(concat(_Supplier._AddressDefaultRepresentation.CityName, ','), _Supplier._AddressDefaultRepresentation.PostalCode), 1), _Supplier._AddressDefaultRepresentation.Country, 1)) ) as SupplierAddress AS Country1asSupplierAddress,
  case when _TaxItem._OneTimeAccountBP.TaxID1!='' then replace(replace( _TaxItem._OneTimeAccountBP.TaxID1, '.', '' ),'-','') else case when _AccDocSuppl.Customer != '' then replace(replace(_Customer.TaxNumber1, '.', '' ),'-','') else replace(replace(_Supplier.TaxNumber1, '.', '' ),'-','') end end as TaxNumber1 AS endendasTaxNumber1
FROM I_AccountingDocument
INNER JOIN I_AcctDocCustomer AS _AccDocSuppl ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_Supplier AS _Supplier ON Supplier = _Supplier.Supplier  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _Customer ON Customer = _Customer.Customer  -- association [0..1]
;