I_PL_SAFTInvoiceHeader
SAF-T Invoice Header
I_PL_SAFTInvoiceHeader is a Basic CDS View that provides data about "SAF-T Invoice Header" in SAP S/4HANA. It reads from 2 data sources (snd_pl_fa_h, snc_pl_bc) and exposes 51 fields with key fields SAFTExtractionUUID, FiscalYear, AccountingDocument, CompanyCode. It has 4 associations to related views. Part of development package GLO_FIN_IS_SAFT_PL.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| snd_pl_fa_h | saftn_pl_fa_h | from |
| snc_pl_bc | saftn_settings | left_outer |
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_JournalEntryItemOneTimeData | _OneTimeAccount | _OneTimeAccount.CompanyCode = saftn_pl_fa_h.bukrs and _OneTimeAccount.AccountingDocument = saftn_pl_fa_h.belnr and _OneTimeAccount.FiscalYear = saftn_pl_fa_h.gjahr and _OneTimeAccount.AccountingDocumentItem = saftn_pl_fa_h.buzei |
| [0..1] | I_Customer | _Customer | _Customer.Customer = saftn_pl_fa_h.kunnr |
| [0..1] | I_Supplier | _Supplier | _Supplier.Supplier = saftn_pl_fa_h.lifnr |
| [0..1] | I_CompanyCode | _CompanyCode | _CompanyCode.CompanyCode = saftn_pl_fa_h.bukrs |
Annotations (12)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | IPLSAFTINVOICEH | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | SAF-T Invoice Header | view | |
| VDM.viewType | #BASIC | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_INCLUDED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.lifecycle.status | #DEPRECATED | view |
Fields (51)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SAFTExtractionUUID | snd_pl_fa_h | extraction_id | Extraction ID |
| KEY | FiscalYear | snd_pl_fa_h | gjahr | Settlement Year |
| KEY | AccountingDocument | snd_pl_fa_h | belnr | SD Document |
| KEY | CompanyCode | snd_pl_fa_h | bukrs | Value |
| EmailAddress | ||||
| LocalTaxOffice | snc_pl_bc | tax_office | Tax Office Code | |
| District | snc_pl_bc | district | District Court | |
| CompanyRegion | snc_pl_bc | regon | REGON | |
| Municipality | snc_pl_bc | sub_district | Sub District | |
| InvoiceDocumentNumber | snd_pl_fa_h | inv_number | Inv.Number | |
| Customer | snd_pl_fa_h | kunnr | Stock customer | |
| Supplier | snd_pl_fa_h | lifnr | Vendor no. | |
| SourceDocument | snd_pl_fa_h | inv_source | Invoice Source | |
| DocumentDate | snd_pl_fa_h | bldat | Journal Entry Date | |
| PostingDate | snd_pl_fa_h | budat | Posting Date | |
| DeliveryDate | snd_pl_fa_h | delivery_date | Time Stamp | |
| DocumentType | snd_pl_fa_h | inv_type | SAF-T Inv. Type | |
| Currency | snd_pl_fa_h | waers | Transaction Currency | |
| stcegendasVATRegistration | ||||
| CustomerSupplierCountry | ||||
| AccountingDocumentItem | snd_pl_fa_h | buzei | Posting View Item | |
| PL_SAFTNetAmount10 | snd_pl_fa_h | p_13_1 | P_13_1 | |
| PL_SAFTTaxAmount16 | snd_pl_fa_h | p_14_1 | P_14_1 | |
| PL_SAFTNetAmount11 | snd_pl_fa_h | p_13_2 | P_13_2 | |
| PL_SAFTTaxAmount18 | snd_pl_fa_h | p_14_2 | P_14_2 | |
| PL_SAFTNetAmount12 | snd_pl_fa_h | p_13_3 | P_13_3 | |
| PL_SAFTTaxAmount20 | snd_pl_fa_h | p_14_3 | P_14_3 | |
| PL_SAFTNetAmount13 | snd_pl_fa_h | p_13_4 | P_13_4 | |
| PL_SAFTTaxAmount24 | snd_pl_fa_h | p_14_4 | P_14_4 | |
| PL_SAFTNetAmount14 | snd_pl_fa_h | p_13_5 | P_13_4 | |
| PL_SAFTTaxAmount26 | snd_pl_fa_h | p_14_5 | P_14_5 | |
| PL_SAFTNetAmount15 | snd_pl_fa_h | p_13_6 | P_13_6 | |
| PL_SAFTNetAmount17 | snd_pl_fa_h | p_13_7 | P_13_4 | |
| TotalAmountInTransactionCrcy | snd_pl_fa_h | p_15 | P_15 | |
| ReasonCode | ||||
| TaxExmpRsnTxt | snd_pl_fa_h | exempt_reason | Tax Exemp.Reason | |
| ExemptionReasonText | snd_pl_fa_h | exempt_reason | Tax Exemp.Reason | |
| SDDocumentReasonText | snd_pl_fa_h | corr_reason | Reason for C/R | |
| CorrectionInvoice | snd_pl_fa_h | corr_inv_ref | Corr.Inv.Ref | |
| CorrectionInvoiceDate | snd_pl_fa_h | corr_inv_date | Corr.Inv.Date | |
| PL_SAFTHighRateTxAmtInLoclCrcy | snd_pl_fa_h | p_14_1w | P_14_1W | |
| PL_SAFTMdmRateTxAmtInLoclCrcy | snd_pl_fa_h | p_14_2w | P_14_2W | |
| PL_SAFTLowRateTxAmtInLoclCrcy | snd_pl_fa_h | p_14_3w | P_14_3W | |
| PL_SAFTOthRateTxAmtInLoclCrcy | snd_pl_fa_h | p_14_4w | P_14_4W | |
| PL_SAFTDownPaymentPrevInvcsTxt | snd_pl_fa_h | dp_prev_inv | Prev. Invoices DP | |
| SalesDocument | snd_pl_fa_h | dp_src_order_id | DP Sales Document | |
| TotalGrossAmount | snd_pl_fa_h | dp_src_order_amnt | DP Sales Doc. Amount | |
| _CompanyCode | _CompanyCode | |||
| _Customer | _Customer | |||
| _Supplier | _Supplier | |||
| _OneTimeAccount | _OneTimeAccount |
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_PL_SAFTInvoiceHeader.
-- 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: IPLSAFTINVOICEH
CREATE VIEW I_PL_SAFTInvoiceHeader AS
SELECT
saftn_pl_fa_h.extraction_id AS SAFTExtractionUUID,
saftn_pl_fa_h.gjahr AS FiscalYear,
saftn_pl_fa_h.belnr AS AccountingDocument,
saftn_pl_fa_h.bukrs AS CompanyCode,
cast(saftn_settings.file_email as abap.char(241)) AS EmailAddress,
saftn_settings.tax_office AS LocalTaxOffice,
saftn_settings.district AS District,
saftn_settings.regon AS CompanyRegion,
saftn_settings.sub_district AS Municipality,
saftn_pl_fa_h.inv_number AS InvoiceDocumentNumber,
saftn_pl_fa_h.kunnr AS Customer,
saftn_pl_fa_h.lifnr AS Supplier,
saftn_pl_fa_h.inv_source AS SourceDocument,
saftn_pl_fa_h.bldat AS DocumentDate,
saftn_pl_fa_h.budat AS PostingDate,
saftn_pl_fa_h.delivery_date AS DeliveryDate,
saftn_pl_fa_h.inv_type AS DocumentType,
saftn_pl_fa_h.waers AS Currency,
case when saftn_pl_fa_h.stceg is initial then 'Nie dotyczy' else saftn_pl_fa_h.stceg end as VATRegistration AS stcegendasVATRegistration,
'' AS CustomerSupplierCountry,
saftn_pl_fa_h.buzei AS AccountingDocumentItem,
saftn_pl_fa_h.p_13_1 AS PL_SAFTNetAmount10,
saftn_pl_fa_h.p_14_1 AS PL_SAFTTaxAmount16,
saftn_pl_fa_h.p_13_2 AS PL_SAFTNetAmount11,
saftn_pl_fa_h.p_14_2 AS PL_SAFTTaxAmount18,
saftn_pl_fa_h.p_13_3 AS PL_SAFTNetAmount12,
saftn_pl_fa_h.p_14_3 AS PL_SAFTTaxAmount20,
saftn_pl_fa_h.p_13_4 AS PL_SAFTNetAmount13,
saftn_pl_fa_h.p_14_4 AS PL_SAFTTaxAmount24,
saftn_pl_fa_h.p_13_5 AS PL_SAFTNetAmount14,
saftn_pl_fa_h.p_14_5 AS PL_SAFTTaxAmount26,
saftn_pl_fa_h.p_13_6 AS PL_SAFTNetAmount15,
saftn_pl_fa_h.p_13_7 AS PL_SAFTNetAmount17,
saftn_pl_fa_h.p_15 AS TotalAmountInTransactionCrcy,
substring(saftn_pl_fa_h.exempt_reason,1,2) AS ReasonCode,
saftn_pl_fa_h.exempt_reason AS TaxExmpRsnTxt,
saftn_pl_fa_h.exempt_reason AS ExemptionReasonText,
saftn_pl_fa_h.corr_reason AS SDDocumentReasonText,
saftn_pl_fa_h.corr_inv_ref AS CorrectionInvoice,
saftn_pl_fa_h.corr_inv_date AS CorrectionInvoiceDate,
saftn_pl_fa_h.p_14_1w AS PL_SAFTHighRateTxAmtInLoclCrcy,
saftn_pl_fa_h.p_14_2w AS PL_SAFTMdmRateTxAmtInLoclCrcy,
saftn_pl_fa_h.p_14_3w AS PL_SAFTLowRateTxAmtInLoclCrcy,
saftn_pl_fa_h.p_14_4w AS PL_SAFTOthRateTxAmtInLoclCrcy,
saftn_pl_fa_h.dp_prev_inv AS PL_SAFTDownPaymentPrevInvcsTxt,
saftn_pl_fa_h.dp_src_order_id AS SalesDocument,
saftn_pl_fa_h.dp_src_order_amnt AS TotalGrossAmount
FROM snd_pl_fa_h AS saftn_pl_fa_h
LEFT OUTER JOIN snc_pl_bc AS saftn_settings ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_JournalEntryItemOneTimeData AS _OneTimeAccount ON _OneTimeAccount.CompanyCode = saftn_pl_fa_h.bukrs AND _OneTimeAccount.AccountingDocument = saftn_pl_fa_h.belnr AND _OneTimeAccount.FiscalYear = saftn_pl_fa_h.gjahr AND _OneTimeAccount.AccountingDocumentItem = saftn_pl_fa_h.buzei -- association [0..1]
LEFT OUTER JOIN I_Customer AS _Customer ON _Customer.Customer = saftn_pl_fa_h.kunnr -- association [0..1]
LEFT OUTER JOIN I_Supplier AS _Supplier ON _Supplier.Supplier = saftn_pl_fa_h.lifnr -- association [0..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON _CompanyCode.CompanyCode = saftn_pl_fa_h.bukrs -- association [0..1]
;
Learn More
- S/4HANA CDS View Deprecation: What You Need to Know
- 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
- 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