C_PT_SAFTSelfBillgInvoiceHdrC

DDL: C_PT_SAFTSELFBILLGINVOICEHDRC SQL: CPTSAFTSBINVHDRC Type: view CONSUMPTION Package: GLO_FIN_IS_SAFT_PT

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)

SourceAliasJoin Type
I_PT_SAFTSelfBillgInvoiceHdr InvoiceHeader from

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_PaymentTermsConditions _PaymentTermsConditions $projection.PaymentTerms = _PaymentTermsConditions.PaymentTerms and $projection.PaymentTermsValidityMonthDay = _PaymentTermsConditions.PaymentTermsValidityMonthDay

Annotations (12)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
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]
;