Deprecated
This CDS view is deprecated in S/4HANA. Use NoSuccessor instead. View all deprecated CDS views →

C_PT_SAFTSlsInvoiceItmRef

DDL: C_PT_SAFTSLSINVOICEITMREF SQL: CPTSAFTSINVIR Type: view CONSUMPTION Package: ID-FI-SAFT_DEPREC

SAF-T PT Sales Invoice Item References

C_PT_SAFTSlsInvoiceItmRef is a Consumption CDS View that provides data about "SAF-T PT Sales Invoice Item References" in SAP S/4HANA. It reads from 14 data sources and exposes 23 fields with key fields PortugueseInvoiceNumber, DocumentItemNumber, DocumentItemNumber, InvoiceReference, DocumentItemNumber. Part of development package ID-FI-SAFT_DEPREC.

Data Sources (14)

SourceAliasJoin Type
I_PT_SAFTBillingItem a from
I_PT_SAFTBillingItem a union
I_PT_SAFTAcctgDownPaymentItm a union
I_PT_SAFTInvoiceListItem a union
I_SDDocumentMultiLevelProcFlow b inner
I_SDDocumentMultiLevelProcFlow b inner
I_SAFTAccountingItem BaseDocument union
I_PT_SAFTAccountingItem Document inner
I_PT_SAFTBillingHeader Head inner
I_PT_SAFTBillingHeader Head inner
I_PT_AcctgDocDgtlSgntr Reference inner
I_PT_AcctgDocDgtlSgntr Reference inner
I_PT_BillgDocDgtlSgntr ReferenceSignedInvoice left_outer
I_PT_SAFTSettlementMgmtItem SettlmtMgmtItem union

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName CPTSAFTSINVIR view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #X view
AccessControl.personalData.blocking #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label SAF-T PT Sales Invoice Item References view
VDM.lifecycle.status #DEPRECATED view
VDM.lifecycle.successor NoSuccessor view

Fields (23)

KeyFieldSource TableSource FieldDescription
KEY PortugueseInvoiceNumber I_PT_SAFTInvoiceListItem PortugueseInvoiceNumber
KEY DocumentItemNumber
SDDocumentReason I_PT_SAFTInvoiceListItem SDDocumentReason Order Reason
PortugueseInvoiceNumber
KEY DocumentItemNumber
KEY InvoiceReference I_PT_SAFTInvoiceListItem DocumentReferenceID
SDDocumentReason I_PT_SAFTInvoiceListItem SDDocumentReason Order Reason
PortugueseInvoiceNumber
KEY DocumentItemNumber
KEY InvoiceReference I_PT_AcctgDocDgtlSgntr PortugueseInvoiceNumber
SDDocumentReason Order Reason
PortugueseInvoiceNumber
KEY DocumentItemNumber
KEY InvoiceReference I_PT_AcctgDocDgtlSgntr PortugueseInvoiceNumber
SDDocumentReason Order Reason
PortugueseInvoiceNumber
KEY DocumentItemNumber
KEY InvoiceReference I_PT_SAFTSettlementMgmtItem InvoiceReference
SDDocumentReason Order Reason
PortugueseInvoiceNumber
KEY DocumentItemNumber
KEY InvoiceReference I_PT_BillgDocDgtlSgntr PortugueseInvoiceNumber
SDDocumentReason I_PT_SAFTInvoiceListItem SDDocumentReason Order Reason

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_SAFTSlsInvoiceItmRef.
-- 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: CPTSAFTSINVIR

CREATE VIEW C_PT_SAFTSlsInvoiceItmRef AS
SELECT
  a.PortugueseInvoiceNumber AS PortugueseInvoiceNumber,
  cast (a.DocumentItemNumber as abap.char(16)) AS DocumentItemNumber,
  a.SDDocumentReason AS SDDocumentReason,
  a.DocumentReferenceID AS InvoiceReference
FROM I_PT_SAFTBillingItem AS a
INNER JOIN I_PT_SAFTBillingHeader AS Head ON /* join condition not captured in parsed metadata */
INNER JOIN I_SDDocumentMultiLevelProcFlow AS b ON /* join condition not captured in parsed metadata */
INNER JOIN I_PT_AcctgDocDgtlSgntr AS Reference ON /* join condition not captured in parsed metadata */
INNER JOIN I_PT_SAFTAccountingItem AS Document ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_PT_BillgDocDgtlSgntr AS ReferenceSignedInvoice ON /* join condition not captured in parsed metadata */
-- UNION with additional select branch(es): I_PT_SAFTBillingItem, I_SAFTAccountingItem, I_PT_SAFTAcctgDownPaymentItm, I_PT_SAFTSettlementMgmtItem, I_PT_SAFTInvoiceListItem
;