P_StRpAdvncRetForSlsAndPurTx

DDL: P_STRPADVNCRETFORSLSANDPURTX SQL: PSRADVRTSLSPURTX Type: view COMPOSITE

P_StRpAdvncRetForSlsAndPurTx is a Composite CDS View in SAP S/4HANA. It reads from 6 data sources and exposes 96 fields with key fields CompanyCode, AccountingDocument, FiscalYear, TaxItem, TaxCode. It has 1 association to related views.

Data Sources (6)

SourceAliasJoin Type
P_RndRulesForCoCodeAndCrcy _CCCurrency left_outer
P_RndRulesForCoCodeAndCrcy _DocCurrency left_outer
I_StRpTaxItemBoxCube I_StRpTaxItemBoxCube from
P_CndnTypeTaxClassification P_CndnTypeTaxClassification left_outer
P_RefundRelatedTaxCode P_RefundRelatedTaxCode left_outer
P_T007B_GLO P_T007B_GLO inner

Associations (1)

CardinalityTargetAliasCondition
[1..*] P_BaseAmtForNegativeCharge _NegCharge $projection.CompanyCode = _NegCharge.CompanyCode and $projection.AccountingDocument = _NegCharge.AccountingDocument and $projection.FiscalYear = _NegCharge.FiscalYear

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PSRADVRTSLSPURTX view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #P view
ObjectModel.usageType.dataClass #MIXED view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
VDM.private true view
AccessControl.blocking #BLOCKED_DATA_INCLUDED view

Fields (96)

KeyFieldSource TableSource FieldDescription
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 TaxItem Tax Item
KEY TaxCode I_StRpTaxItemBoxCube TaxCode Tax Code
KEY TransactionTypeDetermination TransactionTypeDetermination Transaction Key
KEY TaxBox TaxBox Tax.Bs.Gp.No.
KEY TaxDeclnAmountType TaxDeclnAmountType
KEY TaxItemGroupingVersion TaxItemGroupingVersion Tax Grping Ver.
KEY ValidFrom ValidFrom Vers.Valid From
KEY TaxBoxStructureType TaxBoxStructureType
DebitCreditCode DebitCreditCode Single-Character Flag
TaxCalculationProcedure I_StRpTaxItemBoxCube TaxCalculationProcedure Tax Procedure
TaxRate TaxRate Tax Rate
GLAccount GLAccount General Ledger
TaxItemGroup TaxItemGroup Tax doc. item number
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
ConditionRecord P_CndnTypeTaxClassification ConditionRecord Cond.Record No.
CalculatedTxAmtInCoCodeCrcy TaxAmountInCoCodeCrcy Tax Amount in Company Code Currency
CalculatedTaxAmountInTransCrcy TaxAmount Tax Amt in Rptg Crcy
TaxReturnCountryendasCountry
EUTaxClassification I_StRpTaxItemBoxCube EUTaxClassification
DocumentReferenceID DocumentReferenceID Reference
Ledger Ledger Ledger
LedgerGroup LedgerGroup Ledger Group
PostingDate PostingDate Posting Date for GR
DocumentDate DocumentDate Journal Entry Date
TaxReportingDate TaxReportingDate Tax Reporting Date
ReportingDate ReportingDate
FiscalPeriod FiscalPeriod Tax period
ExchangeRate ExchangeRate Exchange rate
IsReversal IsReversal Reversal doc.
IsReversed IsReversed Reversed?
AccountingDocumentHeaderText AccountingDocumentHeaderText Doc.Header Text
CompanyCodeCountry CompanyCodeCountry Reporting Ctry/Reg.
ReportingCountry ReportingCountry
TaxReturnCountry I_StRpTaxItemBoxCube TaxReturnCountry Reporting C/R
CompanyCodeCurrency CompanyCodeCurrency Local Currency
CountryCurrency CountryCurrency Currency
DocumentCurrency DocumentCurrency Document Currency
ReportingCurrency ReportingCurrency Currency
AdditionalCurrency1 AdditionalCurrency1 Local curr. 2
AdditionalCurrency2 AdditionalCurrency2 Local curr. 3
TaxBaseAmountInRptgCrcy TaxBaseAmountInRptgCrcy Base Amount
TaxAmountInRptgCrcy TaxAmountInRptgCrcy Tax Rept. Crcy
TaxAmountInCoCodeCrcy TaxAmountInCoCodeCrcy Tax Amount in Company Code Currency
TaxBaseAmountInCoCodeCrcy TaxBaseAmountInCoCodeCrcy TxBaseAmt CoCodeCrcy
TaxAmount TaxAmount Tax Amt in Rptg Crcy
TaxBaseAmountInCountryCrcy TaxBaseAmountInCountryCrcy Base Amount
TaxAmountInCountryCrcy TaxAmountInCountryCrcy Tax Rept. Crcy
TaxBaseAmountInTransCrcy TaxBaseAmountInTransCrcy Value-Added Tax
TaxBaseAmtInAdditionalCrcy1 TaxBaseAmtInAdditionalCrcy1 LC 2 Base
TaxBaseAmtInAdditionalCrcy2 TaxBaseAmtInAdditionalCrcy2 LC 3 Base
TaxAmountInAdditionalCurrency1 TaxAmountInAdditionalCurrency1 LC 2 Tax
TaxAmountInAdditionalCurrency2 TaxAmountInAdditionalCurrency2 LC 3 Tax
OriginalReferenceDocument _AccountingDocument OriginalReferenceDocument Reference Key
FinancialAccountType _DebtorCreditorRblsPyblsItem FinancialAccountType Fin. Account Type
Customer
TaxType I_StRpTaxItemBoxCube TaxType Tax Type
TargetTaxCode I_StRpTaxItemBoxCube TargetTaxCode
TaxNumber1 TaxNumber1 VAT Reg. No.
TaxNumber2 TaxNumber2 Tax Number 2
TaxNumber3 TaxNumber3
BusinessPartner BusinessPartner Issuing Authority
BusinessPartnerName BusinessPartnerName Extracted Customer Name
CustomerSupplierAddress CustomerSupplierAddress
TaxBoxStructure TaxBoxStructure
TaxBoxStructureName TaxBoxStructureName
TaxBoxName TaxBoxName
TaxBoxCondition TaxBoxCondition
TaxGroup TaxGroup Tax Group
SupplierAccountGroup SupplierAccountGroup Account group
TaxBoxAggregationOperation TaxBoxAggregationOperation
TaxGroupOperation TaxGroupOperation
TaxCountry I_StRpTaxItemBoxCube TaxCountry Tax Ctry/Reg.
TaxIsNotDeductible TaxIsNotDeductible Non-Deductible
_ReportingCurrency _ReportingCurrency
_AccountingDocument _AccountingDocument
_GLAccount _GLAccount
_TaxJurisdiction _TaxJurisdiction
_DebtorCreditorRblsPyblsItem _DebtorCreditorRblsPyblsItem
_ReceivablesPayablesItem _ReceivablesPayablesItem
_TaxReceivablesPayablesItem _TaxReceivablesPayablesItem
_TaxTypeText _TaxTypeText
_TaxCodeText _TaxCodeText
_ReportedItemsLog _ReportedItemsLog
_NegCharge _NegCharge
StatryRptgEntity _ReportedItemsLog StatryRptgEntity Reporting Entity
StatryRptCategory _ReportedItemsLog StatryRptCategory Report ID
StatryRptRunID _ReportedItemsLog StatryRptRunID Report Run ID

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_StRpAdvncRetForSlsAndPurTx.
-- 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: PSRADVRTSLSPURTX

CREATE VIEW P_StRpAdvncRetForSlsAndPurTx AS
SELECT
  I_StRpTaxItemBoxCube.CompanyCode AS CompanyCode,
  I_StRpTaxItemBoxCube.AccountingDocument AS AccountingDocument,
  I_StRpTaxItemBoxCube.FiscalYear AS FiscalYear,
  TaxItem,
  I_StRpTaxItemBoxCube.TaxCode AS TaxCode,
  TransactionTypeDetermination,
  TaxBox,
  TaxDeclnAmountType,
  TaxItemGroupingVersion,
  ValidFrom,
  TaxBoxStructureType,
  DebitCreditCode,
  I_StRpTaxItemBoxCube.TaxCalculationProcedure AS TaxCalculationProcedure,
  TaxRate,
  GLAccount,
  TaxItemGroup,
  BusinessPlace,
  TaxJurisdiction,
  LowestLevelTaxJurisdiction,
  AccountingDocumentType,
  ReferenceDocumentType,
  ReverseDocument,
  ReverseDocumentFiscalYear,
  P_CndnTypeTaxClassification.ConditionRecord AS ConditionRecord,
  TaxAmountInCoCodeCrcy AS CalculatedTxAmtInCoCodeCrcy,
  TaxAmount AS CalculatedTaxAmountInTransCrcy,
  case when I_StRpTaxItemBoxCube.TaxReturnCountry is null or I_StRpTaxItemBoxCube.TaxReturnCountry = ' ' then CompanyCodeCountry else I_StRpTaxItemBoxCube.TaxReturnCountry end as Country AS TaxReturnCountryendasCountry,
  I_StRpTaxItemBoxCube.EUTaxClassification AS EUTaxClassification,
  DocumentReferenceID,
  Ledger,
  LedgerGroup,
  PostingDate,
  DocumentDate,
  TaxReportingDate,
  ReportingDate,
  FiscalPeriod,
  ExchangeRate,
  IsReversal,
  IsReversed,
  AccountingDocumentHeaderText,
  CompanyCodeCountry,
  ReportingCountry,
  I_StRpTaxItemBoxCube.TaxReturnCountry AS TaxReturnCountry,
  CompanyCodeCurrency,
  CountryCurrency,
  DocumentCurrency,
  ReportingCurrency,
  AdditionalCurrency1,
  AdditionalCurrency2,
  TaxBaseAmountInRptgCrcy,
  TaxAmountInRptgCrcy,
  TaxAmountInCoCodeCrcy,
  TaxBaseAmountInCoCodeCrcy,
  TaxAmount,
  TaxBaseAmountInCountryCrcy,
  TaxAmountInCountryCrcy,
  TaxBaseAmountInTransCrcy,
  TaxBaseAmtInAdditionalCrcy1,
  TaxBaseAmtInAdditionalCrcy2,
  TaxAmountInAdditionalCurrency1,
  TaxAmountInAdditionalCurrency2,
  _AccountingDocument.OriginalReferenceDocument AS OriginalReferenceDocument,
  _DebtorCreditorRblsPyblsItem.FinancialAccountType AS FinancialAccountType,
  _DebtorCreditorRblsPyblsItem._Customer.Customer AS Customer,
  I_StRpTaxItemBoxCube.TaxType AS TaxType,
  I_StRpTaxItemBoxCube.TargetTaxCode AS TargetTaxCode,
  TaxNumber1,
  TaxNumber2,
  TaxNumber3,
  BusinessPartner,
  BusinessPartnerName,
  CustomerSupplierAddress,
  TaxBoxStructure,
  TaxBoxStructureName,
  TaxBoxName,
  TaxBoxCondition,
  TaxGroup,
  SupplierAccountGroup,
  TaxBoxAggregationOperation,
  TaxGroupOperation,
  I_StRpTaxItemBoxCube.TaxCountry AS TaxCountry,
  TaxIsNotDeductible,
  _ReportedItemsLog.StatryRptgEntity AS StatryRptgEntity,
  _ReportedItemsLog.StatryRptCategory AS StatryRptCategory,
  _ReportedItemsLog.StatryRptRunID AS StatryRptRunID
FROM I_StRpTaxItemBoxCube
INNER JOIN P_T007B_GLO ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_RndRulesForCoCodeAndCrcy AS _CCCurrency ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_RndRulesForCoCodeAndCrcy AS _DocCurrency ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_RefundRelatedTaxCode ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_CndnTypeTaxClassification ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_BaseAmtForNegativeCharge AS _NegCharge ON CompanyCode = _NegCharge.CompanyCode AND AccountingDocument = _NegCharge.AccountingDocument AND FiscalYear = _NegCharge.FiscalYear  -- association [1..*]
;