I_PT_SAFTSalesInvcBillingTax
Billing Document Item Tax Information
I_PT_SAFTSalesInvcBillingTax is a Composite CDS View that provides data about "Billing Document Item Tax Information" in SAP S/4HANA. It reads from 5 data sources (I_PT_SAFTBillgSlsInvcHeader, I_PT_SAFTBillingItemTaxCheck, I_BillingDocumentItem, I_PT_SAFTBillgMasterDataTax, I_PT_SAFTTaxNotConfigured) and exposes 10 fields with key fields CompanyCode, PT_SAFTDocumentNumber, PT_SAFTLineNumber.
Data Sources (5)
| Source | Alias | Join Type |
|---|---|---|
| I_PT_SAFTBillgSlsInvcHeader | Head | from |
| I_PT_SAFTBillingItemTaxCheck | ItemTax | inner |
| I_BillingDocumentItem | Line | inner |
| I_PT_SAFTBillgMasterDataTax | TaxInfo | inner |
| I_PT_SAFTTaxNotConfigured | TaxNotConf | inner |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #MANDATORY | view | |
| VDM.viewType | #COMPOSITE | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| EndUserText.label | Billing Document Item Tax Information | view |
Fields (10)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | I_PT_SAFTBillgSlsInvcHeader | CompanyCode | Receiver Company Code |
| KEY | PT_SAFTDocumentNumber | I_PT_SAFTBillgSlsInvcHeader | PT_SAFTDocumentNumber | |
| KEY | PT_SAFTLineNumber | |||
| PortugueseInvoiceDate | I_PT_SAFTBillgSlsInvcHeader | PortugueseInvoiceDate | Date | |
| CompanyCodeCurrency | I_PT_SAFTBillgSlsInvcHeader | CompanyCodeCurrency | Local Currency | |
| TaxCode | ||||
| ConditionRateValue | ||||
| TaxAmountendasTaxAmount | ||||
| TaxReturnCountryendasCountryRegion | ||||
| ExemptionReasonelseendasExemptionReason |
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_SAFTSalesInvcBillingTax.
-- 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_SAFTSalesInvcBillingTax AS
SELECT
Head.CompanyCode AS CompanyCode,
Head.PT_SAFTDocumentNumber AS PT_SAFTDocumentNumber,
cast(concat('', Line.BillingDocumentItem) as saft_pt_doclinenumber) AS PT_SAFTLineNumber,
Head.PortugueseInvoiceDate AS PortugueseInvoiceDate,
Head.CompanyCodeCurrency AS CompanyCodeCurrency,
coalesce(ItemTax.TaxCode,'') AS TaxCode,
coalesce(ItemTax.ConditionRateValue, 0) AS ConditionRateValue,
case when TaxInfo.TaxAmount is not null or TaxInfo.TaxAmount is not initial then TaxInfo.TaxAmount else TaxNotConf.TaxAmount end as TaxAmount AS TaxAmountendasTaxAmount,
case when TaxInfo.CountryRegion is not null or TaxInfo.CountryRegion is not initial then TaxInfo.CountryRegion else TaxNotConf.TaxReturnCountry end as CountryRegion AS TaxReturnCountryendasCountryRegion,
case when TaxInfo.ExemptionReason is not null or TaxInfo.ExemptionReason is not initial then TaxInfo.ExemptionReason when TaxInfo.TaxCode is null then TaxNotConf.ExemptionReason else '' end as ExemptionReason AS ExemptionReasonelseendasExemptionReason
FROM I_PT_SAFTBillgSlsInvcHeader AS Head
INNER JOIN I_BillingDocumentItem AS Line ON /* join condition not captured in parsed metadata */
INNER JOIN I_PT_SAFTBillingItemTaxCheck AS ItemTax ON /* join condition not captured in parsed metadata */
INNER JOIN I_PT_SAFTBillgMasterDataTax AS TaxInfo ON /* join condition not captured in parsed metadata */
INNER JOIN I_PT_SAFTTaxNotConfigured AS TaxNotConf 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