P_HR_StRpTaxItem

DDL: P_HR_STRPTAXITEM Type: view_entity COMPOSITE

Croatia selection for tax reporting

P_HR_StRpTaxItem is a Composite CDS View that provides data about "Croatia selection for tax reporting" in SAP S/4HANA. It reads from 2 data sources (I_StRpTaxItem, I_TaxCode) and exposes 75 fields with key fields CompanyCode, AccountingDocument, FiscalYear, TaxItem, TaxItemUUID. It has 1 association to related views.

Data Sources (2)

SourceAliasJoin Type
I_StRpTaxItem Item from
I_TaxCode RefTaxCode inner

Parameters (2)

NameTypeDefault
P_FromReportingDate fis_period_date_from
P_ToReportingDate fis_period_date_to

Associations (1)

CardinalityTargetAliasCondition
[0..1] P_HR_DefTaxItem _DefTaxItem Item.CompanyCode = _DefTaxItem.CompanyCode and Item.AccountingDocument = _DefTaxItem.AccountingDocument and Item.FiscalYear = _DefTaxItem.FiscalYear and _DefTaxItem.ClearingAccountingDocument is not initial

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
Metadata.ignorePropagatedAnnotations true view
VDM.private true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
EndUserText.label Croatia selection for tax reporting view

Fields (75)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_StRpTaxItem CompanyCode Receiver Company Code
KEY AccountingDocument I_StRpTaxItem AccountingDocument Journal Entry
KEY FiscalYear I_StRpTaxItem FiscalYear G/L Fiscal Year
KEY TaxItem I_StRpTaxItem TaxItem Tax Item
KEY TaxItemUUID I_StRpTaxItem TaxItemUUID
TaxCode I_StRpTaxItem TaxCode Tax Code
ReportingDateendasReportingDate
TargetTaxCode I_TaxCode TargetTaxCode
ItemTargetTaxCode I_StRpTaxItem TargetTaxCode
ItemReportingDate I_StRpTaxItem ReportingDate
TransactionTypeDetermination I_StRpTaxItem TransactionTypeDetermination Transaction Key
DebitCreditCode I_StRpTaxItem DebitCreditCode Single-Character Flag
DebitCreditCodeIsChanged I_StRpTaxItem DebitCreditCodeIsChanged
TaxRate I_StRpTaxItem TaxRate Tax Rate
TaxRateValidityStartDate I_StRpTaxItem TaxRateValidityStartDate Tax Rate Validity Start Date
GLAccount I_StRpTaxItem GLAccount General Ledger
TaxItemGroup I_StRpTaxItem TaxItemGroup Tax doc. item number
BusinessPlace I_StRpTaxItem BusinessPlace Business place
TaxJurisdiction I_StRpTaxItem TaxJurisdiction Tax Jurisdiction
LowestLevelTaxJurisdiction I_StRpTaxItem LowestLevelTaxJurisdiction Jurisdict. Code
AccountingDocumentType I_StRpTaxItem AccountingDocumentType Journal Entry Type
ReferenceDocumentType I_StRpTaxItem ReferenceDocumentType Reference Document Type
AlternativeReferenceDocument I_StRpTaxItem AlternativeReferenceDocument Alternative Reference Document
ReverseDocument I_StRpTaxItem ReverseDocument Reversed With
ReverseDocumentFiscalYear I_StRpTaxItem ReverseDocumentFiscalYear Year
DocumentReferenceID I_StRpTaxItem DocumentReferenceID Reference
ConditionType I_StRpTaxItem ConditionType Condition type
Ledger I_StRpTaxItem Ledger Ledger
LedgerGroup I_StRpTaxItem LedgerGroup Ledger Group
PostingDate I_StRpTaxItem PostingDate Posting Date for GR
DocumentDate I_StRpTaxItem DocumentDate Journal Entry Date
TaxReportingDate I_StRpTaxItem TaxReportingDate Tax Reporting Date
TaxReportingDocumentDate I_StRpTaxItem TaxReportingDocumentDate
TaxFulfillmentDate I_StRpTaxItem TaxFulfillmentDate Tax Settlement Date
FiscalPeriod I_StRpTaxItem FiscalPeriod Tax period
ExchangeRate I_StRpTaxItem ExchangeRate Exchange rate
IsReversal I_StRpTaxItem IsReversal Reversal doc.
IsReversed I_StRpTaxItem IsReversed Reversed?
AccountingDocumentHeaderText I_StRpTaxItem AccountingDocumentHeaderText Doc.Header Text
CompanyCodeCountry I_StRpTaxItem CompanyCodeCountry Reporting Ctry/Reg.
ReportingCountry I_StRpTaxItem ReportingCountry
TaxReturnCountry I_StRpTaxItem TaxReturnCountry Reporting C/R
CompanyCodeCurrency I_StRpTaxItem CompanyCodeCurrency Local Currency
CountryCurrency I_StRpTaxItem CountryCurrency Currency
DocumentCurrency I_StRpTaxItem DocumentCurrency Document Currency
ClearingAccountingDocument I_StRpTaxItem ClearingAccountingDocument Clearing Journal Entry
TaxType I_StRpTaxItem TaxType Tax Type
TaxCalculationProcedure I_StRpTaxItem TaxCalculationProcedure Tax Procedure
EUTaxClassification I_StRpTaxItem EUTaxClassification EU Code/Code
TaxCodeReturnCountry I_StRpTaxItem TaxCodeReturnCountry Reporting C/R
TaxNumber1 I_StRpTaxItem TaxNumber1 VAT Reg. No.
TaxNumber2 I_StRpTaxItem TaxNumber2 Tax Number 2
TaxNumber3 I_StRpTaxItem TaxNumber3
TaxNumber4 I_StRpTaxItem TaxNumber4
BusinessPartner I_StRpTaxItem BusinessPartner Issuing Authority
BusinessPartnerCountry I_StRpTaxItem BusinessPartnerCountry BP Ctry/Reg.
BusinessPartnerName I_StRpTaxItem BusinessPartnerName Extracted Customer Name
CustomerSupplierAddress I_StRpTaxItem CustomerSupplierAddress
CustomerSupplierVATRegn I_StRpTaxItem CustomerSupplierVATRegn
TaxIsNotDeductible I_StRpTaxItem TaxIsNotDeductible Non-Deductible
Supplier I_StRpTaxItem Supplier Supplier
Customer I_StRpTaxItem Customer Sold-to Party
InterestDocFinAccountType I_StRpTaxItem InterestDocFinAccountType Fin. Account Type
IsNegativePosting I_StRpTaxItem IsNegativePosting Negative Posting
SupplierAccountGroup I_StRpTaxItem SupplierAccountGroup Account group
OriginalReferenceDocument I_StRpTaxItem OriginalReferenceDocument Reference Key
SenderLogicalSystem I_StRpTaxItem SenderLogicalSystem Sender Logical System
CAReconciliationKey I_StRpTaxItem CAReconciliationKey Reconcil. Key
MiniOneStopShopTxRptgCntry I_StRpTaxItem MiniOneStopShopTxRptgCntry OSS C/R
SenderCompanyCode I_StRpTaxItem SenderCompanyCode Sender Company Code
SenderAccountingDocument I_StRpTaxItem SenderAccountingDocument Sender Journal Entry
SenderFiscalYear I_StRpTaxItem SenderFiscalYear Sender FiscalYr
TaxCountry I_StRpTaxItem TaxCountry Tax Ctry/Reg.
AccountingDocumentCategory I_StRpTaxItem AccountingDocumentCategory Journal Entry Category
TaxDataSource I_StRpTaxItem TaxDataSource

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_HR_StRpTaxItem.
-- 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.
-- Parameters: P_FromReportingDate : fis_period_date_from, P_ToReportingDate : fis_period_date_to

CREATE VIEW P_HR_StRpTaxItem AS
SELECT
  Item.CompanyCode AS CompanyCode,
  Item.AccountingDocument AS AccountingDocument,
  Item.FiscalYear AS FiscalYear,
  Item.TaxItem AS TaxItem,
  Item.TaxItemUUID AS TaxItemUUID,
  Item.TaxCode AS TaxCode,
  case when RefTaxCode.TargetTaxCode = '' then Item.ReportingDate when RefTaxCode.TargetTaxCode <> '' and _DefTaxItem.PostingDate is not initial and _DefTaxItem.PostingDate is not null then case when $parameters.P_FromReportingDate >= _DefTaxItem.PostingDate and $parameters.P_ToReportingDate <= _DefTaxItem.PostingDate then '00000000' else Item.ReportingDate end when RefTaxCode.TargetTaxCode <> '' and (_DefTaxItem.PostingDate is initial or _DefTaxItem.PostingDate is null ) then Item.ReportingDate end as ReportingDate AS ReportingDateendasReportingDate,
  RefTaxCode.TargetTaxCode AS TargetTaxCode,
  Item.TargetTaxCode AS ItemTargetTaxCode,
  Item.ReportingDate AS ItemReportingDate,
  Item.TransactionTypeDetermination AS TransactionTypeDetermination,
  Item.DebitCreditCode AS DebitCreditCode,
  Item.DebitCreditCodeIsChanged AS DebitCreditCodeIsChanged,
  Item.TaxRate AS TaxRate,
  Item.TaxRateValidityStartDate AS TaxRateValidityStartDate,
  Item.GLAccount AS GLAccount,
  Item.TaxItemGroup AS TaxItemGroup,
  Item.BusinessPlace AS BusinessPlace,
  Item.TaxJurisdiction AS TaxJurisdiction,
  Item.LowestLevelTaxJurisdiction AS LowestLevelTaxJurisdiction,
  Item.AccountingDocumentType AS AccountingDocumentType,
  Item.ReferenceDocumentType AS ReferenceDocumentType,
  Item.AlternativeReferenceDocument AS AlternativeReferenceDocument,
  Item.ReverseDocument AS ReverseDocument,
  Item.ReverseDocumentFiscalYear AS ReverseDocumentFiscalYear,
  Item.DocumentReferenceID AS DocumentReferenceID,
  Item.ConditionType AS ConditionType,
  Item.Ledger AS Ledger,
  Item.LedgerGroup AS LedgerGroup,
  Item.PostingDate AS PostingDate,
  Item.DocumentDate AS DocumentDate,
  Item.TaxReportingDate AS TaxReportingDate,
  Item.TaxReportingDocumentDate AS TaxReportingDocumentDate,
  Item.TaxFulfillmentDate AS TaxFulfillmentDate,
  Item.FiscalPeriod AS FiscalPeriod,
  Item.ExchangeRate AS ExchangeRate,
  Item.IsReversal AS IsReversal,
  Item.IsReversed AS IsReversed,
  Item.AccountingDocumentHeaderText AS AccountingDocumentHeaderText,
  Item.CompanyCodeCountry AS CompanyCodeCountry,
  Item.ReportingCountry AS ReportingCountry,
  Item.TaxReturnCountry AS TaxReturnCountry,
  Item.CompanyCodeCurrency AS CompanyCodeCurrency,
  Item.CountryCurrency AS CountryCurrency,
  Item.DocumentCurrency AS DocumentCurrency,
  Item.ClearingAccountingDocument AS ClearingAccountingDocument,
  Item.TaxType AS TaxType,
  Item.TaxCalculationProcedure AS TaxCalculationProcedure,
  Item.EUTaxClassification AS EUTaxClassification,
  Item.TaxCodeReturnCountry AS TaxCodeReturnCountry,
  Item.TaxNumber1 AS TaxNumber1,
  Item.TaxNumber2 AS TaxNumber2,
  Item.TaxNumber3 AS TaxNumber3,
  Item.TaxNumber4 AS TaxNumber4,
  Item.BusinessPartner AS BusinessPartner,
  Item.BusinessPartnerCountry AS BusinessPartnerCountry,
  Item.BusinessPartnerName AS BusinessPartnerName,
  Item.CustomerSupplierAddress AS CustomerSupplierAddress,
  Item.CustomerSupplierVATRegn AS CustomerSupplierVATRegn,
  Item.TaxIsNotDeductible AS TaxIsNotDeductible,
  Item.Supplier AS Supplier,
  Item.Customer AS Customer,
  Item.InterestDocFinAccountType AS InterestDocFinAccountType,
  Item.IsNegativePosting AS IsNegativePosting,
  Item.SupplierAccountGroup AS SupplierAccountGroup,
  Item.OriginalReferenceDocument AS OriginalReferenceDocument,
  Item.SenderLogicalSystem AS SenderLogicalSystem,
  Item.CAReconciliationKey AS CAReconciliationKey,
  Item.MiniOneStopShopTxRptgCntry AS MiniOneStopShopTxRptgCntry,
  Item.SenderCompanyCode AS SenderCompanyCode,
  Item.SenderAccountingDocument AS SenderAccountingDocument,
  Item.SenderFiscalYear AS SenderFiscalYear,
  Item.TaxCountry AS TaxCountry,
  Item.AccountingDocumentCategory AS AccountingDocumentCategory,
  Item.TaxDataSource AS TaxDataSource
FROM I_StRpTaxItem AS Item
INNER JOIN I_TaxCode AS RefTaxCode ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_HR_DefTaxItem AS _DefTaxItem ON Item.CompanyCode = _DefTaxItem.CompanyCode AND Item.AccountingDocument = _DefTaxItem.AccountingDocument AND Item.FiscalYear = _DefTaxItem.FiscalYear AND _DefTaxItem.ClearingAccountingDocument is not initial  -- association [0..1]
;