C_PT_SAFTSelfBillgInvoiceHdrC
SAF-T PT Self-Billing InvoiceHeader Cube
C_PT_SAFTSelfBillgInvoiceHdrC is a Consumption CDS View (Cube) that provides data about "SAF-T PT Self-Billing InvoiceHeader Cube" in SAP S/4HANA. It reads from 1 data source (I_PT_SAFTSelfBillgInvoiceHdr) and exposes 28 fields with key fields CompanyCode, DocumentTransaction. It has 1 association to related views. Part of development package GLO_FIN_IS_SAFT_PT.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_PT_SAFTSelfBillgInvoiceHdr | InvoiceHeader | from |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_PaymentTermsConditions | _PaymentTermsConditions | $projection.PaymentTerms = _PaymentTermsConditions.PaymentTerms and $projection.PaymentTermsValidityMonthDay = _PaymentTermsConditions.PaymentTermsValidityMonthDay |
Annotations (12)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | CPTSAFTSBINVHDRC | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| AccessControl.authorizationCheck | #MANDATORY | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_INCLUDED | view | |
| Analytics.dataCategory | #CUBE | view | |
| Metadata.allowExtensions | true | view | |
| EndUserText.label | SAF-T PT Self-Billing InvoiceHeader Cube | view |
Fields (28)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | I_PT_SAFTSelfBillgInvoiceHdr | CompanyCode | Receiver Company Code |
| KEY | DocumentTransaction | I_PT_SAFTSelfBillgInvoiceHdr | DocumentTransaction | Transaction ID |
| PortugueseInvoiceNumber | I_PT_SAFTSelfBillgInvoiceHdr | PortugueseInvoiceNumber | ||
| Supplier | I_PT_SAFTSelfBillgInvoiceHdr | Supplier | Supplier | |
| PostingDate | I_PT_SAFTSelfBillgInvoiceHdr | PostingDate | Posting Date for GR | |
| PTDgtlSgntrSystemDateTimeText | PTDgtlSgntrSystemDateTimeText | Sys. Date-Time | ||
| PortugueseDgtlSgntrSystDteTime | PortugueseDgtlSgntrSystDteTime | |||
| LastChangedByUser | LastChangedByUser | User Name | ||
| PortugueseDigitalSignature | PortugueseDigitalSignature | Digital Signature | ||
| PortugueseDgtlSgntrKeyVersion | PortugueseDgtlSgntrKeyVersion | Key Version | ||
| FiscalPeriod | FiscalPeriod | Tax period | ||
| PortugueseInvoiceDate | PortugueseInvoiceDate | Date | ||
| PortugueseInvoiceType | PortugueseInvoiceType | |||
| PortugueseCustomerWithVersion | PortugueseCustomerWithVersion | |||
| PlantCustomer | PlantCustomer | |||
| InvoiceReference | InvoiceReference | Invoice Reference | ||
| CompanyCodeCurrency | CompanyCodeCurrency | Local Currency | ||
| TaxAmountInCoCodeCrcy | TaxAmountInCoCodeCrcy | Tax Amount in Company Code Currency | ||
| NetAmountInCoCodeCurrency | NetAmountInCoCodeCurrency | |||
| TotalGrossAmountInCoCodeCrcy | TotalGrossAmountInCoCodeCrcy | Amount in LC | ||
| DocumentCurrency | DocumentCurrency | Document Currency | ||
| InvoiceAmountInFrgnCurrency | InvoiceAmountInFrgnCurrency | Invc. Amt Frgn Crcy | ||
| curr132endasInvoiceGrossAmount | ||||
| ExchangeRate | ExchangeRate | Exchange rate | ||
| PaymentTerms | PaymentTerms | Pyt Terms | ||
| PT_SeriesDocumentNumber | PT_SeriesDocumentNumber | ATCUD Code | ||
| PaymentTermsValidityMonthDay | _PaymentTermsConditions | PaymentTermsValidityMonthDay | Day Limit | |
| _Customer | I_PT_SAFTSelfBillgInvoiceHdr | _Customer |
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 C_PT_SAFTSelfBillgInvoiceHdrC.
-- 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: CPTSAFTSBINVHDRC
CREATE VIEW C_PT_SAFTSelfBillgInvoiceHdrC AS
SELECT
InvoiceHeader.CompanyCode AS CompanyCode,
InvoiceHeader.DocumentTransaction AS DocumentTransaction,
InvoiceHeader.PortugueseInvoiceNumber AS PortugueseInvoiceNumber,
InvoiceHeader.Supplier AS Supplier,
InvoiceHeader.PostingDate AS PostingDate,
PTDgtlSgntrSystemDateTimeText,
PortugueseDgtlSgntrSystDteTime,
LastChangedByUser,
PortugueseDigitalSignature,
PortugueseDgtlSgntrKeyVersion,
FiscalPeriod,
PortugueseInvoiceDate,
PortugueseInvoiceType,
PortugueseCustomerWithVersion,
PlantCustomer,
InvoiceReference,
CompanyCodeCurrency,
TaxAmountInCoCodeCrcy,
NetAmountInCoCodeCurrency,
TotalGrossAmountInCoCodeCrcy,
DocumentCurrency,
InvoiceAmountInFrgnCurrency,
case when DocumentCurrency is not initial then InvoiceHeader.InvoiceGrossAmount else cast(0 as abap.curr(13,2)) end as InvoiceGrossAmount AS curr132endasInvoiceGrossAmount,
ExchangeRate,
PaymentTerms,
PT_SeriesDocumentNumber,
_PaymentTermsConditions.PaymentTermsValidityMonthDay AS PaymentTermsValidityMonthDay,
InvoiceHeader._Customer AS _Customer
FROM I_PT_SAFTSelfBillgInvoiceHdr AS InvoiceHeader
LEFT OUTER JOIN I_PaymentTermsConditions AS _PaymentTermsConditions ON PaymentTerms = _PaymentTermsConditions.PaymentTerms AND PaymentTermsValidityMonthDay = _PaymentTermsConditions.PaymentTermsValidityMonthDay -- association [0..1]
;
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