C_StRpVATReturnDocLineItem
Union of FI, MM & SD Section
C_StRpVATReturnDocLineItem is a Consumption CDS View that provides data about "Union of FI, MM & SD Section" in SAP S/4HANA. It reads from 3 data sources (C_AccountingVATReturnDocItem, C_BillingVATReturnDocItem, C_SupplierInvcVATReturnDocItem) and exposes 216 fields with key fields StatryRptgEntity, StatryRptCategory, StatryRptRunID, CompanyCode, FiscalYear.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| C_AccountingVATReturnDocItem | C_AccountingVATReturnDocItem | from |
| C_BillingVATReturnDocItem | C_BillingVATReturnDocItem | union_all |
| C_SupplierInvcVATReturnDocItem | C_SupplierInvcVATReturnDocItem | union_all |
Parameters (3)
| Name | Type | Default |
|---|---|---|
| P_StatryRptgEntity | srf_reporting_entity | |
| P_StatryRptCategory | srf_rep_cat_id | |
| P_StatryRptRunID | srf_report_run_id |
Annotations (13)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.lifecycle.status | #DEPRECATED | view | |
| VDM.lifecycle.successor | <P_EG_StRpTaxLineItem> | view | |
| AbapCatalog.sqlViewName | CSRVATRETDOCITM | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | 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 | Union of FI, MM & SD Section | view |
Fields (216)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | StatryRptgEntity | StatryRptgEntity | Reporting Entity | |
| KEY | StatryRptCategory | StatryRptCategory | Report ID | |
| KEY | StatryRptRunID | StatryRptRunID | Report Run ID | |
| KEY | CompanyCode | CompanyCode | Receiver Company Code | |
| KEY | FiscalYear | FiscalYear | G/L Fiscal Year | |
| KEY | AccountingDocument | AccountingDocument | Journal Entry | |
| KEY | AccountingDocumentItem | AccountingDocumentItem | Posting View Item | |
| KEY | DocumentItemNumber | DocumentItemNumber | Item | |
| SupplierInvoice | ||||
| SupplierInvoiceItem | ||||
| BillingDocument | SD Document | |||
| BillingDocumentItem | Item | |||
| TaxCode | TaxCode | Tax Code | ||
| TaxItemGroup | TaxItemGroup | Tax doc. item number | ||
| AccountingDocumentType | AccountingDocumentType | Journal Entry Type | ||
| AccountingDocumentItemType | AccountingDocumentItemType | Line Item ID | ||
| ReferenceDocumentType | ReferenceDocumentType | Reference Document Type | ||
| TransactionTypeDetermination | TransactionTypeDetermination | Transaction Key | ||
| PostingKey | PostingKey | Posting Key | ||
| DebitCreditCode | DebitCreditCode | Single-Character Flag | ||
| GLAccount | GLAccount | General Ledger | ||
| FinancialAccountType | FinancialAccountType | Fin. Account Type | ||
| AccountType | AccountType | Accounting Type(dtl) | ||
| FiscalPeriod | FiscalPeriod | Tax period | ||
| ReportingDate | ReportingDate | |||
| PostingDate | PostingDate | Posting Date for GR | ||
| DocumentDate | DocumentDate | Journal Entry Date | ||
| DocumentCurrency | DocumentCurrency | Document Currency | ||
| CompanyCodeCurrency | CompanyCodeCurrency | Local Currency | ||
| ReportingCurrency | ReportingCurrency | Currency | ||
| DebitCreditCodeIsChanged | DebitCreditCodeIsChanged | |||
| CountryCurrency | CountryCurrency | Currency | ||
| AdditionalCurrency1 | AdditionalCurrency1 | Local curr. 2 | ||
| AdditionalCurrency2 | AdditionalCurrency2 | Local curr. 3 | ||
| Material | Material | Vehicle Model | ||
| DocumentItemText | DocumentItemText | Text | ||
| QuantityInActlPostg | QuantityInActlPostg | |||
| QuantityUnit | QuantityUnit | Unit of measure | ||
| TaxRate | TaxRate | Tax Rate | ||
| OriginalReferenceDocument | OriginalReferenceDocument | Reference Key | ||
| BusinessArea | BusinessArea | Business Area | ||
| Supplier | Supplier | Supplier | ||
| Customer | Customer | Sold-to Party | ||
| SupplierAccountGroup | SupplierAccountGroup | Account group | ||
| ReportingCountry | ReportingCountry | |||
| CompanyCodeCountry | CompanyCodeCountry | Reporting Ctry/Reg. | ||
| TaxNumber1 | TaxNumber1 | VAT Reg. No. | ||
| TaxNumber2 | TaxNumber2 | Tax Number 2 | ||
| TaxNumber3 | TaxNumber3 | |||
| BusinessPartnerName | BusinessPartnerName | Extracted Customer Name | ||
| CustomerSupplierAddress | CustomerSupplierAddress | |||
| ReverseDocument | ReverseDocument | Reversed With | ||
| ReverseDocumentFiscalYear | ReverseDocumentFiscalYear | Year | ||
| InvoiceReference | InvoiceReference | Invoice Reference | ||
| InvoiceReferenceFiscalYear | InvoiceReferenceFiscalYear | Invoice Reference Fiscal Year | ||
| ReferenceDocumentNumber | ReferenceDocumentNumber | |||
| ReferenceDocumentFiscalYear | ReferenceDocumentFiscalYear | Year Cur.Period | ||
| DistributedTaxAmountInCCrcy | DistributedTaxAmountInCCrcy | |||
| DistrdTaxBaseAmountInCCrcy | DistrdTaxBaseAmountInCCrcy | |||
| DistributedTaxAmountInTC | DistributedTaxAmountInTC | |||
| DistrdTaxBaseAmountInTransCrcy | DistrdTaxBaseAmountInTransCrcy | |||
| DistributedTaxAmtInCountryCrcy | DistributedTaxAmtInCountryCrcy | |||
| DistrdTaxBaseAmountInCntryCrcy | DistrdTaxBaseAmountInCntryCrcy | |||
| DistrdTaxAmountInAddlCrcy1 | DistrdTaxAmountInAddlCrcy1 | |||
| DistrdTaxBaseAmountInAddlCrcy1 | DistrdTaxBaseAmountInAddlCrcy1 | |||
| DistrdTaxAmountInAddlCrcy2 | DistrdTaxAmountInAddlCrcy2 | |||
| DistrdTaxBaseAmountInAddlCrcy2 | DistrdTaxBaseAmountInAddlCrcy2 | |||
| CashDiscountAmount | CD Amount | |||
| TaxCalculationProcedure | TaxCalculationProcedure | Tax Procedure | ||
| TaxRateValidityStartDate | TaxRateValidityStartDate | Tax Rate Validity Start Date | ||
| P_StatryRptgEntity | ||||
| P_StatryRptCategory | ||||
| P_StatryRptRunIDkeyStatryRptgEntity | ||||
| KEY | StatryRptCategory | StatryRptCategory | Report ID | |
| KEY | StatryRptRunID | StatryRptRunID | Report Run ID | |
| KEY | CompanyCode | CompanyCode | Receiver Company Code | |
| KEY | FiscalYear | FiscalYear | G/L Fiscal Year | |
| KEY | AccountingDocument | AccountingDocument | Journal Entry | |
| KEY | AccountingDocumentItem | AccountingDocumentItem | Posting View Item | |
| KEY | DocumentItemNumber | DocumentItemNumber | Item | |
| SupplierInvoice | SupplierInvoice | |||
| SupplierInvoiceItem | SupplierInvoiceItem | |||
| BillingDocument | SD Document | |||
| BillingDocumentItem | Item | |||
| TaxCode | TaxCode | Tax Code | ||
| TaxItemGroup | Tax doc. item number | |||
| AccountingDocumentType | AccountingDocumentType | Journal Entry Type | ||
| AccountingDocumentItemType | AccountingDocumentItemType | Line Item ID | ||
| ReferenceDocumentType | ReferenceDocumentType | Reference Document Type | ||
| TransactionTypeDetermination | TransactionTypeDetermination | Transaction Key | ||
| PostingKey | Posting Key | |||
| DebitCreditCode | DebitCreditCode | Single-Character Flag | ||
| GLAccount | GLAccount | General Ledger | ||
| FinancialAccountType | FinancialAccountType | Fin. Account Type | ||
| AccountType | AccountType | Accounting Type(dtl) | ||
| FiscalPeriod | FiscalPeriod | Tax period | ||
| ReportingDate | ReportingDate | |||
| PostingDate | PostingDate | Posting Date for GR | ||
| DocumentDate | DocumentDate | Journal Entry Date | ||
| DocumentCurrency | DocumentCurrency | Document Currency | ||
| CompanyCodeCurrency | CompanyCodeCurrency | Local Currency | ||
| ReportingCurrency | ReportingCurrency | Currency | ||
| DebitCreditCodeIsChanged | DebitCreditCodeIsChanged | |||
| CountryCurrency | CountryCurrency | Currency | ||
| AdditionalCurrency1 | AdditionalCurrency1 | Local curr. 2 | ||
| AdditionalCurrency2 | AdditionalCurrency2 | Local curr. 3 | ||
| Material | Material | Vehicle Model | ||
| DocumentItemText | Text | |||
| QuantityInActlPostg | QuantityInActlPostg | |||
| QuantityUnit | QuantityUnit | Unit of measure | ||
| TaxRate | TaxRate | Tax Rate | ||
| OriginalReferenceDocument | OriginalReferenceDocument | Reference Key | ||
| BusinessArea | BusinessArea | Business Area | ||
| Supplier | Supplier | Supplier | ||
| Customer | Customer | Sold-to Party | ||
| SupplierAccountGroup | SupplierAccountGroup | Account group | ||
| ReportingCountry | ReportingCountry | |||
| CompanyCodeCountry | CompanyCodeCountry | Reporting Ctry/Reg. | ||
| TaxNumber1 | TaxNumber1 | VAT Reg. No. | ||
| TaxNumber2 | TaxNumber2 | Tax Number 2 | ||
| TaxNumber3 | TaxNumber3 | |||
| BusinessPartnerName | BusinessPartnerName | Extracted Customer Name | ||
| CustomerSupplierAddress | CustomerSupplierAddress | |||
| ReverseDocument | ReverseDocument | Reversed With | ||
| ReverseDocumentFiscalYear | ReverseDocumentFiscalYear | Year | ||
| InvoiceReference | InvoiceReference | Invoice Reference | ||
| InvoiceReferenceFiscalYear | InvoiceReferenceFiscalYear | Invoice Reference Fiscal Year | ||
| ReferenceDocumentNumber | ReferenceDocumentNumber | |||
| ReferenceDocumentFiscalYear | ReferenceDocumentFiscalYear | Year Cur.Period | ||
| DistributedTaxAmountInCCrcy | DistributedTaxAmountInCCrcy | |||
| DistrdTaxBaseAmountInCCrcy | DistrdTaxBaseAmountInCCrcy | |||
| DistributedTaxAmountInTC | DistributedTaxAmountInTC | |||
| DistrdTaxBaseAmountInTransCrcy | DistrdTaxBaseAmountInTransCrcy | |||
| DistributedTaxAmtInCountryCrcy | DistributedTaxAmtInCountryCrcy | |||
| DistrdTaxBaseAmountInCntryCrcy | DistrdTaxBaseAmountInCntryCrcy | |||
| DistrdTaxAmountInAddlCrcy1 | DistrdTaxAmountInAddlCrcy1 | |||
| DistrdTaxBaseAmountInAddlCrcy1 | DistrdTaxBaseAmountInAddlCrcy1 | |||
| DistrdTaxAmountInAddlCrcy2 | DistrdTaxAmountInAddlCrcy2 | |||
| DistrdTaxBaseAmountInAddlCrcy2 | DistrdTaxBaseAmountInAddlCrcy2 | |||
| CashDiscountAmount | CD Amount | |||
| TaxCalculationProcedure | TaxCalculationProcedure | Tax Procedure | ||
| TaxRateValidityStartDate | TaxRateValidityStartDate | Tax Rate Validity Start Date | ||
| P_StatryRptgEntity | ||||
| P_StatryRptCategory | ||||
| P_StatryRptRunIDkeyStatryRptgEntity | ||||
| KEY | StatryRptCategory | StatryRptCategory | Report ID | |
| KEY | StatryRptRunID | StatryRptRunID | Report Run ID | |
| KEY | CompanyCode | CompanyCode | Receiver Company Code | |
| KEY | FiscalYear | FiscalYear | G/L Fiscal Year | |
| KEY | AccountingDocument | AccountingDocument | Journal Entry | |
| KEY | AccountingDocumentItem | AccountingDocumentItem | Posting View Item | |
| KEY | DocumentItemNumber | DocumentItemNumber | Item | |
| SupplierInvoice | ||||
| SupplierInvoiceItem | ||||
| BillingDocument | BillingDocument | SD Document | ||
| BillingDocumentItem | BillingDocumentItem | Item | ||
| TaxCode | TaxCode | Tax Code | ||
| TaxItemGroup | Tax doc. item number | |||
| AccountingDocumentType | AccountingDocumentType | Journal Entry Type | ||
| AccountingDocumentItemType | AccountingDocumentItemType | Line Item ID | ||
| ReferenceDocumentType | ReferenceDocumentType | Reference Document Type | ||
| TransactionTypeDetermination | TransactionTypeDetermination | Transaction Key | ||
| PostingKey | Posting Key | |||
| DebitCreditCode | DebitCreditCode | Single-Character Flag | ||
| GLAccount | GLAccount | General Ledger | ||
| FinancialAccountType | FinancialAccountType | Fin. Account Type | ||
| AccountType | AccountType | Accounting Type(dtl) | ||
| FiscalPeriod | FiscalPeriod | Tax period | ||
| ReportingDate | ReportingDate | |||
| PostingDate | PostingDate | Posting Date for GR | ||
| DocumentDate | DocumentDate | Journal Entry Date | ||
| DocumentCurrency | DocumentCurrency | Document Currency | ||
| CompanyCodeCurrency | CompanyCodeCurrency | Local Currency | ||
| ReportingCurrency | ReportingCurrency | Currency | ||
| DebitCreditCodeIsChanged | DebitCreditCodeIsChanged | |||
| CountryCurrency | CountryCurrency | Currency | ||
| AdditionalCurrency1 | AdditionalCurrency1 | Local curr. 2 | ||
| AdditionalCurrency2 | AdditionalCurrency2 | Local curr. 3 | ||
| Material | Material | Vehicle Model | ||
| DocumentItemText | Text | |||
| QuantityInActlPostg | QuantityInActlPostg | |||
| QuantityUnit | QuantityUnit | Unit of measure | ||
| TaxRate | TaxRate | Tax Rate | ||
| OriginalReferenceDocument | OriginalReferenceDocument | Reference Key | ||
| BusinessArea | BusinessArea | Business Area | ||
| Supplier | Supplier | Supplier | ||
| Customer | Customer | Sold-to Party | ||
| SupplierAccountGroup | SupplierAccountGroup | Account group | ||
| ReportingCountry | ReportingCountry | |||
| CompanyCodeCountry | CompanyCodeCountry | Reporting Ctry/Reg. | ||
| TaxNumber1 | TaxNumber1 | VAT Reg. No. | ||
| TaxNumber2 | TaxNumber2 | Tax Number 2 | ||
| TaxNumber3 | TaxNumber3 | |||
| BusinessPartnerName | BusinessPartnerName | Extracted Customer Name | ||
| CustomerSupplierAddress | CustomerSupplierAddress | |||
| ReverseDocument | ReverseDocument | Reversed With | ||
| ReverseDocumentFiscalYear | ReverseDocumentFiscalYear | Year | ||
| InvoiceReference | InvoiceReference | Invoice Reference | ||
| InvoiceReferenceFiscalYear | InvoiceReferenceFiscalYear | Invoice Reference Fiscal Year | ||
| ReferenceDocumentNumber | ReferenceDocumentNumber | |||
| ReferenceDocumentFiscalYear | ReferenceDocumentFiscalYear | Year Cur.Period | ||
| DistributedTaxAmountInCCrcy | DistributedTaxAmountInCCrcy | |||
| DistrdTaxBaseAmountInCCrcy | DistrdTaxBaseAmountInCCrcy | |||
| DistributedTaxAmountInTC | DistributedTaxAmountInTC | |||
| DistrdTaxBaseAmountInTransCrcy | DistrdTaxBaseAmountInTransCrcy | |||
| DistributedTaxAmtInCountryCrcy | DistributedTaxAmtInCountryCrcy | |||
| DistrdTaxBaseAmountInCntryCrcy | DistrdTaxBaseAmountInCntryCrcy | |||
| DistrdTaxAmountInAddlCrcy1 | DistrdTaxAmountInAddlCrcy1 | |||
| DistrdTaxBaseAmountInAddlCrcy1 | DistrdTaxBaseAmountInAddlCrcy1 | |||
| DistrdTaxAmountInAddlCrcy2 | DistrdTaxAmountInAddlCrcy2 | |||
| DistrdTaxBaseAmountInAddlCrcy2 | DistrdTaxBaseAmountInAddlCrcy2 | |||
| CashDiscountBaseAmount | Cash Dscnt Base Amt | |||
| CashDiscountAmount | CashDiscountAmount | CD Amount | ||
| TaxCalculationProcedure | TaxCalculationProcedure | Tax Procedure | ||
| TaxRateValidityStartDate | TaxRateValidityStartDate | Tax Rate Validity Start Date | ||
| DocumentReferenceID | DocumentReferenceID | Reference |
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_StRpVATReturnDocLineItem.
-- 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: CSRVATRETDOCITM
-- Parameters: P_StatryRptgEntity : srf_reporting_entity, P_StatryRptCategory : srf_rep_cat_id, P_StatryRptRunID : srf_report_run_id
CREATE VIEW C_StRpVATReturnDocLineItem AS
SELECT
StatryRptgEntity,
StatryRptCategory,
StatryRptRunID,
CompanyCode,
FiscalYear,
AccountingDocument,
AccountingDocumentItem,
DocumentItemNumber,
cast('' as re_belnr) AS SupplierInvoice,
cast('000000' as rblgp) AS SupplierInvoiceItem,
cast('' as re_belnr) AS BillingDocument,
cast('000000' as posnr_vf) AS BillingDocumentItem,
TaxCode,
TaxItemGroup,
AccountingDocumentType,
AccountingDocumentItemType,
ReferenceDocumentType,
TransactionTypeDetermination,
PostingKey,
DebitCreditCode,
GLAccount,
FinancialAccountType,
AccountType,
FiscalPeriod,
ReportingDate,
PostingDate,
DocumentDate,
DocumentCurrency,
CompanyCodeCurrency,
ReportingCurrency,
DebitCreditCodeIsChanged,
CountryCurrency,
AdditionalCurrency1,
AdditionalCurrency2,
Material,
DocumentItemText,
QuantityInActlPostg,
QuantityUnit,
TaxRate,
OriginalReferenceDocument,
BusinessArea,
Supplier,
Customer,
SupplierAccountGroup,
ReportingCountry,
CompanyCodeCountry,
TaxNumber1,
TaxNumber2,
TaxNumber3,
BusinessPartnerName,
CustomerSupplierAddress,
ReverseDocument,
ReverseDocumentFiscalYear,
InvoiceReference,
InvoiceReferenceFiscalYear,
ReferenceDocumentNumber,
ReferenceDocumentFiscalYear,
DistributedTaxAmountInCCrcy,
DistrdTaxBaseAmountInCCrcy,
DistributedTaxAmountInTC,
DistrdTaxBaseAmountInTransCrcy,
DistributedTaxAmtInCountryCrcy,
DistrdTaxBaseAmountInCntryCrcy,
DistrdTaxAmountInAddlCrcy1,
DistrdTaxBaseAmountInAddlCrcy1,
DistrdTaxAmountInAddlCrcy2,
DistrdTaxBaseAmountInAddlCrcy2,
cast( 0 as vfprc_element_value ) AS CashDiscountAmount,
TaxCalculationProcedure,
TaxRateValidityStartDate,
DocumentReferenceID AS P_StatryRptgEntity,
P_StatryRptCategory : $parameters.P_StatryRptCategory AS P_StatryRptCategory,
cast ( CashDiscountBaseAmount as figlo_dbase_ccrcy ) AS CashDiscountBaseAmount,
DocumentReferenceID
FROM C_AccountingVATReturnDocItem
-- UNION ALL with additional select branch(es): C_SupplierInvcVATReturnDocItem, C_BillingVATReturnDocItem
;
Learn More
- S/4HANA CDS View Deprecation: What You Need to Know
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- 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
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA