P_MY_StRpTxItmWithOriglDoc
P_MY_StRpTxItmWithOriglDoc is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_StRpTaxReturnBoxCube, P_DEFTAX_ITEM) and exposes 75 fields with key fields CompanyCode, AccountingDocument, FiscalYear, TaxItem, TaxCode.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_StRpTaxReturnBoxCube | I_StRpTaxReturnBoxCube | from |
| P_DEFTAX_ITEM | P_DEFTAX_ITEM | left_outer |
Parameters (3)
| Name | Type | Default |
|---|---|---|
| P_StatryRptgEntity | srf_reporting_entity | |
| P_StatryRptCategory | srf_rep_cat_id | |
| P_StatryRptRunID | srf_report_run_id |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PSRTXITMWORIDOC | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.dataClass | #MIXED | view |
Fields (75)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | I_StRpTaxItemBoxCube | CompanyCode | Receiver Company Code |
| KEY | AccountingDocument | I_StRpTaxItemBoxCube | AccountingDocument | Journal Entry |
| KEY | FiscalYear | I_StRpTaxItemBoxCube | FiscalYear | G/L Fiscal Year |
| KEY | TaxItem | I_StRpTaxItemBoxCube | TaxItem | Tax Item |
| KEY | TaxCode | I_StRpTaxItemBoxCube | TaxCode | Tax Code |
| KEY | TransactionTypeDetermination | I_StRpTaxItemBoxCube | TransactionTypeDetermination | Transaction Key |
| KEY | TaxBox | I_StRpTaxItemBoxCube | TaxBox | Tax.Bs.Gp.No. |
| KEY | TaxDeclnAmountType | I_StRpTaxItemBoxCube | TaxDeclnAmountType | |
| KEY | TaxItemGroupingVersion | I_StRpTaxItemBoxCube | TaxItemGroupingVersion | Tax Grping Ver. |
| KEY | ValidFrom | I_StRpTaxItemBoxCube | ValidFrom | Vers.Valid From |
| KEY | TaxBoxStructureType | I_StRpTaxItemBoxCube | TaxBoxStructureType | |
| KEY | TaxGroup | I_StRpTaxItemBoxCube | TaxGroup | Tax Group |
| KEY | TaxBoxAggregationOperation | TaxBoxAggregationOperation | ||
| KEY | StatryRptgEntity | |||
| KEY | StatryRptCategory | |||
| KEY | StatryRptRunID | |||
| TaxTransferDocument | ||||
| TaxTransferDocumentYear | ||||
| TargetTaxCode | ||||
| GrossAmtInLocalCrcy | P_DEFTAX_ITEM | GrossAmtInLocalCrcy | LC Gross | |
| GrossAmtInNationalCrcy | P_DEFTAX_ITEM | GrossAmtInNationalCrcy | Gross Amount | |
| PartialGrossAmtInLocalCrcy | P_DEFTAX_ITEM | PartialGrossAmtInLocalCrcy | LC Part. Amt | |
| PartialGrossAmtInNationalCrcy | P_DEFTAX_ITEM | PartialGrossAmtInNationalCrcy | NC Part. Amt | |
| PartialTransferRatio | ||||
| TaxRate | TaxRate | Tax Rate | ||
| TaxRateValidityStartDate | TaxRateValidityStartDate | Tax Rate Validity Start Date | ||
| GLAccount | GLAccount | General Ledger | ||
| BusinessPlace | BusinessPlace | Business place | ||
| TaxJurisdiction | TaxJurisdiction | Tax Jurisdiction | ||
| LowestLevelTaxJurisdiction | LowestLevelTaxJurisdiction | Jurisdict. Code | ||
| AccountingDocumentType | AccountingDocumentType | Journal Entry Type | ||
| ReferenceDocumentType | ReferenceDocumentType | Reference Document Type | ||
| ReverseDocument | ReverseDocument | Reversed With | ||
| ReverseDocumentFiscalYear | ReverseDocumentFiscalYear | Year | ||
| DocumentReferenceID | DocumentReferenceID | Reference | ||
| Ledger | Ledger | Ledger | ||
| LedgerGroup | LedgerGroup | Ledger Group | ||
| ReportingDate | ReportingDate | |||
| PostingDate | PostingDate | Posting Date for GR | ||
| DocumentDate | DocumentDate | Journal Entry Date | ||
| TaxReportingDate | TaxReportingDate | Tax Reporting Date | ||
| FiscalPeriod | FiscalPeriod | Tax period | ||
| ExchangeRate | ExchangeRate | Exchange rate | ||
| IsReversal | IsReversal | Reversal doc. | ||
| IsReversed | IsReversed | Reversed? | ||
| AccountingDocumentHeaderText | AccountingDocumentHeaderText | Doc.Header Text | ||
| TaxType | I_StRpTaxItemBoxCube | TaxType | Tax Type | |
| ReportingCountry | ReportingCountry | |||
| CompanyCodeCountry | CompanyCodeCountry | Reporting Ctry/Reg. | ||
| CountryCurrency | CountryCurrency | Currency | ||
| TaxBaseAmountInCountryCrcy | TaxBaseAmountInCountryCrcy | Base Amount | ||
| TaxAmountInCountryCrcy | TaxAmountInCountryCrcy | Tax Rept. Crcy | ||
| ReportingCurrency | I_StRpTaxItemBoxCube | ReportingCurrency | Currency | |
| AmountInReportingCurrency | I_StRpTaxItemBoxCube | AmountInReportingCurrency | ||
| TaxBaseAmountInRptgCrcy | I_StRpTaxItemBoxCube | TaxBaseAmountInRptgCrcy | Base Amount | |
| TaxAmountInRptgCrcy | I_StRpTaxItemBoxCube | TaxAmountInRptgCrcy | Tax Rept. Crcy | |
| DocumentCurrency | I_StRpTaxItemBoxCube | DocumentCurrency | Document Currency | |
| AmountInTransactionCurrency | I_StRpTaxItemBoxCube | AmountInTransactionCurrency | Pt Crcy Amt | |
| TaxBaseAmountInTransCrcy | I_StRpTaxItemBoxCube | TaxBaseAmountInTransCrcy | Value-Added Tax | |
| TaxAmount | I_StRpTaxItemBoxCube | TaxAmount | Tax Amt in Rptg Crcy | |
| CompanyCodeCurrency | CompanyCodeCurrency | Local Currency | ||
| TaxBaseAmountInCoCodeCrcy | I_StRpTaxItemBoxCube | TaxBaseAmountInCoCodeCrcy | TxBaseAmt CoCodeCrcy | |
| TaxAmountInCoCodeCrcy | I_StRpTaxItemBoxCube | TaxAmountInCoCodeCrcy | Tax Amount in Company Code Currency | |
| AdditionalCurrency1 | AdditionalCurrency1 | Local curr. 2 | ||
| AmountInAdditionalCurrency1 | AmountInAdditionalCurrency1 | Amount in Additional Currency 1 | ||
| TaxBaseAmtInAdditionalCrcy1 | TaxBaseAmtInAdditionalCrcy1 | LC 2 Base | ||
| TaxAmountInAdditionalCurrency1 | TaxAmountInAdditionalCurrency1 | LC 2 Tax | ||
| AdditionalCurrency2 | AdditionalCurrency2 | Local curr. 3 | ||
| AmountInAdditionalCurrency2 | AmountInAdditionalCurrency2 | LC2 Amount | ||
| TaxBaseAmtInAdditionalCrcy2 | TaxBaseAmtInAdditionalCrcy2 | LC 3 Base | ||
| TaxAmountInAdditionalCurrency2 | TaxAmountInAdditionalCurrency2 | LC 3 Tax | ||
| _AccountingDocument | _AccountingDocument | |||
| _GLAccount | _GLAccount | |||
| _TaxJurisdiction | _TaxJurisdiction | |||
| _ReportedItemsLog | _ReportedItemsLog |
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 P_MY_StRpTxItmWithOriglDoc.
-- 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: PSRTXITMWORIDOC
-- Parameters: P_StatryRptgEntity : srf_reporting_entity, P_StatryRptCategory : srf_rep_cat_id, P_StatryRptRunID : srf_report_run_id
CREATE VIEW P_MY_StRpTxItmWithOriglDoc AS
SELECT
I_StRpTaxItemBoxCube.CompanyCode AS CompanyCode,
I_StRpTaxItemBoxCube.AccountingDocument AS AccountingDocument,
I_StRpTaxItemBoxCube.FiscalYear AS FiscalYear,
I_StRpTaxItemBoxCube.TaxItem AS TaxItem,
I_StRpTaxItemBoxCube.TaxCode AS TaxCode,
I_StRpTaxItemBoxCube.TransactionTypeDetermination AS TransactionTypeDetermination,
I_StRpTaxItemBoxCube.TaxBox AS TaxBox,
I_StRpTaxItemBoxCube.TaxDeclnAmountType AS TaxDeclnAmountType,
I_StRpTaxItemBoxCube.TaxItemGroupingVersion AS TaxItemGroupingVersion,
I_StRpTaxItemBoxCube.ValidFrom AS ValidFrom,
I_StRpTaxItemBoxCube.TaxBoxStructureType AS TaxBoxStructureType,
I_StRpTaxItemBoxCube.TaxGroup AS TaxGroup,
TaxBoxAggregationOperation,
I_StRpTaxItemBoxCube._ReportedItemsLog.StatryRptgEntity AS StatryRptgEntity,
I_StRpTaxItemBoxCube._ReportedItemsLog.StatryRptCategory AS StatryRptCategory,
I_StRpTaxItemBoxCube._ReportedItemsLog.StatryRptRunID AS StatryRptRunID,
coalesce(P_DEFTAX_ITEM. AccountingDocument, '') AS TaxTransferDocument,
coalesce(P_DEFTAX_ITEM. FiscalYear, '') AS TaxTransferDocumentYear,
coalesce(P_DEFTAX_ITEM.TaxCode, '') AS TargetTaxCode,
P_DEFTAX_ITEM.GrossAmtInLocalCrcy AS GrossAmtInLocalCrcy,
P_DEFTAX_ITEM.GrossAmtInNationalCrcy AS GrossAmtInNationalCrcy,
P_DEFTAX_ITEM.PartialGrossAmtInLocalCrcy AS PartialGrossAmtInLocalCrcy,
P_DEFTAX_ITEM.PartialGrossAmtInNationalCrcy AS PartialGrossAmtInNationalCrcy,
division(P_DEFTAX_ITEM.PartialGrossAmtInLocalCrcy, P_DEFTAX_ITEM.GrossAmtInLocalCrcy, 8 ) * 100 AS PartialTransferRatio,
TaxRate,
TaxRateValidityStartDate,
GLAccount,
BusinessPlace,
TaxJurisdiction,
LowestLevelTaxJurisdiction,
AccountingDocumentType,
ReferenceDocumentType,
ReverseDocument,
ReverseDocumentFiscalYear,
DocumentReferenceID,
Ledger,
LedgerGroup,
ReportingDate,
PostingDate,
DocumentDate,
TaxReportingDate,
FiscalPeriod,
ExchangeRate,
IsReversal,
IsReversed,
AccountingDocumentHeaderText,
I_StRpTaxItemBoxCube.TaxType AS TaxType,
ReportingCountry,
CompanyCodeCountry,
CountryCurrency,
TaxBaseAmountInCountryCrcy,
TaxAmountInCountryCrcy,
I_StRpTaxItemBoxCube.ReportingCurrency AS ReportingCurrency,
I_StRpTaxItemBoxCube.AmountInReportingCurrency AS AmountInReportingCurrency,
I_StRpTaxItemBoxCube.TaxBaseAmountInRptgCrcy AS TaxBaseAmountInRptgCrcy,
I_StRpTaxItemBoxCube.TaxAmountInRptgCrcy AS TaxAmountInRptgCrcy,
I_StRpTaxItemBoxCube.DocumentCurrency AS DocumentCurrency,
I_StRpTaxItemBoxCube.AmountInTransactionCurrency AS AmountInTransactionCurrency,
I_StRpTaxItemBoxCube.TaxBaseAmountInTransCrcy AS TaxBaseAmountInTransCrcy,
I_StRpTaxItemBoxCube.TaxAmount AS TaxAmount,
CompanyCodeCurrency,
I_StRpTaxItemBoxCube.TaxBaseAmountInCoCodeCrcy AS TaxBaseAmountInCoCodeCrcy,
I_StRpTaxItemBoxCube.TaxAmountInCoCodeCrcy AS TaxAmountInCoCodeCrcy,
AdditionalCurrency1,
AmountInAdditionalCurrency1,
TaxBaseAmtInAdditionalCrcy1,
TaxAmountInAdditionalCurrency1,
AdditionalCurrency2,
AmountInAdditionalCurrency2,
TaxBaseAmtInAdditionalCrcy2,
TaxAmountInAdditionalCurrency2
FROM I_StRpTaxReturnBoxCube
LEFT OUTER JOIN P_DEFTAX_ITEM ON /* join condition not captured in parsed metadata */
;
Learn More
- 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
- S/4HANA CDS View Deprecation: What You Need to Know
- 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