I_PT_SAFTSettlementTax

DDL: I_PT_SAFTSETTLEMENTTAX Type: view_entity COMPOSITE

Taxes from Settlement Document

I_PT_SAFTSettlementTax is a Composite CDS View that provides data about "Taxes from Settlement Document" in SAP S/4HANA. It reads from 4 data sources (I_SAFTSettlementManagementItem, I_PT_SAFTBillgMasterDataTax, I_PT_SettlmtDocsDgtlSgntr, I_SetlMgmtDocItmCustPrcgElmnt) and exposes 15 fields with key fields SettlmtMgmtDoc, SettlmtMgmtDocItem.

Data Sources (4)

SourceAliasJoin Type
I_SAFTSettlementManagementItem Doc inner
I_PT_SAFTBillgMasterDataTax SAFTTax inner
I_PT_SettlmtDocsDgtlSgntr SettlmtDigitalSignature inner
I_SetlMgmtDocItmCustPrcgElmnt Tax from

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
EndUserText.label Taxes from Settlement Document view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view

Fields (15)

KeyFieldSource TableSource FieldDescription
KEY SettlmtMgmtDoc I_SAFTSettlementManagementItem SettlmtMgmtDoc Document Number
KEY SettlmtMgmtDocItem I_SAFTSettlementManagementItem SettlmtMgmtDocItem Item
SuplrSettlmtCompanyCode I_SAFTSettlementManagementItem SuplrSettlmtCompanyCode Suppl. Company Code
InvoiceDate
CompanyCode
TaxCode
CompanyCodeCurrency
PT_SAFTTaxType I_PT_SAFTBillgMasterDataTax PT_SAFTTaxType Tax Type
CountryRegion I_PT_SAFTBillgMasterDataTax CountryRegion Country / Region
PT_SAFTTaxCode I_PT_SAFTBillgMasterDataTax PT_SAFTTaxCode Tax Code
TaxCodeDescription I_PT_SAFTBillgMasterDataTax TaxCodeDescription
EndDate I_PT_SAFTBillgMasterDataTax EndDate Term to
ExemptionReason I_PT_SAFTBillgMasterDataTax ExemptionReason Exempt. Reason
ExemptionReasonText I_PT_SAFTBillgMasterDataTax ExemptionReasonText
dec52else0endasTaxRate

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 I_PT_SAFTSettlementTax.
-- 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.

CREATE VIEW I_PT_SAFTSettlementTax AS
SELECT
  Doc.SettlmtMgmtDoc AS SettlmtMgmtDoc,
  Doc.SettlmtMgmtDocItem AS SettlmtMgmtDocItem,
  Doc.SuplrSettlmtCompanyCode AS SuplrSettlmtCompanyCode,
  Doc._SettlmtMgmtDoc.PostingDate AS InvoiceDate,
  Doc._SettlmtMgmtDoc.SuplrSettlmtCompanyCode AS CompanyCode,
  coalesce(Tax.TaxCode, '') AS TaxCode,
  Doc._SuplrSettlmtCompanyCode.Currency AS CompanyCodeCurrency,
  SAFTTax.PT_SAFTTaxType AS PT_SAFTTaxType,
  SAFTTax.CountryRegion AS CountryRegion,
  SAFTTax.PT_SAFTTaxCode AS PT_SAFTTaxCode,
  SAFTTax.TaxCodeDescription AS TaxCodeDescription,
  SAFTTax.EndDate AS EndDate,
  SAFTTax.ExemptionReason AS ExemptionReason,
  SAFTTax.ExemptionReasonText AS ExemptionReasonText,
  case when SAFTTax.PT_SAFTTaxType = 'IVA' and Tax.ConditionRateValue is not initial then cast(Tax.ConditionRateValue as abap.dec(5,2)) else 0 end as TaxRate AS dec52else0endasTaxRate
FROM I_SetlMgmtDocItmCustPrcgElmnt AS Tax
INNER JOIN I_SAFTSettlementManagementItem AS Doc ON /* join condition not captured in parsed metadata */
INNER JOIN I_PT_SettlmtDocsDgtlSgntr AS SettlmtDigitalSignature ON /* join condition not captured in parsed metadata */
INNER JOIN I_PT_SAFTBillgMasterDataTax AS SAFTTax ON /* join condition not captured in parsed metadata */
;