I_PT_SAFTBillgInvcListHeader

DDL: I_PT_SAFTBILLGINVCLISTHEADER Type: view_entity COMPOSITE Package: GLO_FIN_IS_SAFT_PT

Sales Invoice List Document Header

I_PT_SAFTBillgInvcListHeader is a Composite CDS View that provides data about "Sales Invoice List Document Header" in SAP S/4HANA. It reads from 2 data sources (I_InvoiceList, I_PT_BillgDocDgtlSgntr) and exposes 42 fields with key field PortugueseInvoiceNumber. It has 2 associations to related views. Part of development package GLO_FIN_IS_SAFT_PT.

Data Sources (2)

SourceAliasJoin Type
I_InvoiceList InvList from
I_PT_BillgDocDgtlSgntr Sig inner

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_InvoiceList _CancelBillingDocument _CancelBillingDocument.CancelledInvoiceList = InvList.InvoiceList
[0..1] I_SAFTBillingPaymentTerms _Settlement $projection.BillingDocument = _Settlement.BillingDocument and $projection.CustomerPaymentTerms = _Settlement.PaymentTerms

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
AccessControl.personalData.blocking #BLOCKED_DATA_INCLUDED view
EndUserText.label Sales Invoice List Document Header view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view

Fields (42)

KeyFieldSource TableSource FieldDescription
KEY PortugueseInvoiceNumber I_PT_BillgDocDgtlSgntr PortugueseInvoiceNumber
BillingDocument I_InvoiceList InvoiceList Invoice List
PortugueseInvoiceDate I_PT_BillgDocDgtlSgntr PortugueseInvoiceDate Date
PT_SeriesDocumentType I_PT_BillgDocDgtlSgntr PT_SeriesDocumentType SAF-T Document Type
char3asDocumentType
BillingDocumentDate I_InvoiceList InvoiceListBillingDate Billing Date
FiscalYear I_InvoiceList FiscalYear G/L Fiscal Year
SDDocumentCategory I_InvoiceList SDDocumentCategory Document Cat.
PT_SeriesDocumentNumber I_PT_BillgDocDgtlSgntr PT_SeriesDocumentNumber ATCUD Code
NumberRangeInterval I_PT_BillgDocDgtlSgntr NumberRangeInterval
PortugueseDigitalSignatureDate I_PT_BillgDocDgtlSgntr PortugueseDigitalSignatureDate
AccountingDocumentType
FiscalPeriod
ReversalReason
PortugueseDigitalSignature I_PT_BillgDocDgtlSgntr PortugueseDigitalSignature Digital Signature
PortugueseDgtlSgntrKeyVersion I_PT_BillgDocDgtlSgntr PortugueseDgtlSgntrKeyVersion Key Version
BillingDocumentIsCancelled I_InvoiceList InvoiceListIsCancelled
CancelledBillingDocument I_InvoiceList CancelledInvoiceList
AccountingTransferStatus I_InvoiceList AccountingTransferStatus
IsReversed
PTDgtlSgntrSystemDateTimeText I_PT_BillgDocDgtlSgntr PTDgtlSgntrSystemDateTimeText Sys. Date-Time
CreationDate I_InvoiceList CreationDate Time Stamp
CreationTime I_InvoiceList CreationTime Time of Change
CreatedByUser I_InvoiceList CreatedByUser User Name
ExchangeRateDate I_InvoiceList ExchangeRateDate Translatn Date
TotalNetAmount I_InvoiceList TotalNetAmount Total Net Amount
TotalTaxAmount I_InvoiceList TotalTaxAmount Tax Amount
TransactionCurrency I_InvoiceList TransactionCurrency Transaction Currency
InvcSmmryItemStatus
CustomerPaymentTerms I_InvoiceList CustomerPaymentTerms Pyt Terms
CompanyCode I_InvoiceList CompanyCode Receiver Company Code
CompanyCodeCurrency
PayerParty I_InvoiceList PayerParty Payer
AccountingDocument I_InvoiceList AccountingDocument Journal Entry
AccountingExchangeRate I_InvoiceList AccountingExchangeRate Exch.Rate Acct.
VATRegistration I_InvoiceList VATRegistration VAT Registration No.
VATRegistrationCountry I_InvoiceList VATRegistrationCountry CtryRgnSlsTxNo.
ReverseDocument
ReverseDocumentFiscalYear
TotalGrossAmount I_PT_BillgDocDgtlSgntr TotalGrossAmount Total Gross Amount
_AccountingDocument I_InvoiceList _AccountingDocument
_CompanyCode I_InvoiceList _CompanyCode

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_SAFTBillgInvcListHeader.
-- 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_SAFTBillgInvcListHeader AS
SELECT
  Sig.PortugueseInvoiceNumber AS PortugueseInvoiceNumber,
  InvList.InvoiceList AS BillingDocument,
  Sig.PortugueseInvoiceDate AS PortugueseInvoiceDate,
  Sig.PT_SeriesDocumentType AS PT_SeriesDocumentType,
  cast(case when InvList.SDDocumentCategory = 'M' or InvList.SDDocumentCategory = 'N' or InvList.SDDocumentCategory = '5' then 'FT' when InvList.SDDocumentCategory = 'S' or InvList.SDDocumentCategory = 'O' or InvList.SDDocumentCategory = '6' or InvList.SDDocumentCategory = '4' then 'NC' when InvList.SDDocumentCategory = 'P' then 'ND' else 'FT' end as abap.char(3)) as DocumentType AS char3asDocumentType,
  InvList.InvoiceListBillingDate AS BillingDocumentDate,
  InvList.FiscalYear AS FiscalYear,
  InvList.SDDocumentCategory AS SDDocumentCategory,
  Sig.PT_SeriesDocumentNumber AS PT_SeriesDocumentNumber,
  Sig.NumberRangeInterval AS NumberRangeInterval,
  Sig.PortugueseDigitalSignatureDate AS PortugueseDigitalSignatureDate,
  InvList._AccountingDocument.AccountingDocumentType AS AccountingDocumentType,
  InvList._AccountingDocument.FiscalPeriod AS FiscalPeriod,
  InvList._AccountingDocument.ReversalReason AS ReversalReason,
  Sig.PortugueseDigitalSignature AS PortugueseDigitalSignature,
  Sig.PortugueseDgtlSgntrKeyVersion AS PortugueseDgtlSgntrKeyVersion,
  InvList.InvoiceListIsCancelled AS BillingDocumentIsCancelled,
  InvList.CancelledInvoiceList AS CancelledBillingDocument,
  InvList.AccountingTransferStatus AS AccountingTransferStatus,
  InvList._AccountingDocument.IsReversed AS IsReversed,
  Sig.PTDgtlSgntrSystemDateTimeText AS PTDgtlSgntrSystemDateTimeText,
  InvList.CreationDate AS CreationDate,
  InvList.CreationTime AS CreationTime,
  InvList.CreatedByUser AS CreatedByUser,
  InvList.ExchangeRateDate AS ExchangeRateDate,
  InvList.TotalNetAmount AS TotalNetAmount,
  InvList.TotalTaxAmount AS TotalTaxAmount,
  InvList.TransactionCurrency AS TransactionCurrency,
  cast(SumInv.InvcSmmryItemStatus as abap.int1(3)) AS InvcSmmryItemStatus,
  InvList.CustomerPaymentTerms AS CustomerPaymentTerms,
  InvList.CompanyCode AS CompanyCode,
  InvList._CompanyCode.Currency AS CompanyCodeCurrency,
  InvList.PayerParty AS PayerParty,
  InvList.AccountingDocument AS AccountingDocument,
  InvList.AccountingExchangeRate AS AccountingExchangeRate,
  InvList.VATRegistration AS VATRegistration,
  InvList.VATRegistrationCountry AS VATRegistrationCountry,
  InvList._AccountingDocument.ReverseDocument AS ReverseDocument,
  InvList._AccountingDocument.ReverseDocumentFiscalYear AS ReverseDocumentFiscalYear,
  Sig.TotalGrossAmount AS TotalGrossAmount,
  InvList._AccountingDocument AS _AccountingDocument,
  InvList._CompanyCode AS _CompanyCode
FROM I_InvoiceList AS InvList
INNER JOIN I_PT_BillgDocDgtlSgntr AS Sig ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_InvoiceList AS _CancelBillingDocument ON _CancelBillingDocument.CancelledInvoiceList = InvList.InvoiceList  -- association [0..1]
LEFT OUTER JOIN I_SAFTBillingPaymentTerms AS _Settlement ON BillingDocument = _Settlement.BillingDocument AND CustomerPaymentTerms = _Settlement.PaymentTerms  -- association [0..1]
;