I_CollsPromiseToPayInvoice

DDL: I_COLLSPROMISETOPAYINVOICE Type: view BASIC Package: ODATA_PROMISE_TO_PAY

Promise To Pay Invoice

I_CollsPromiseToPayInvoice is a Basic CDS View that provides data about "Promise To Pay Invoice" in SAP S/4HANA. It reads from 1 data source (udm_p2p_attr) and exposes 11 fields with key fields PromiseToPayUUID, LinkedInvoiceKey. It has 3 associations to related views. Part of development package ODATA_PROMISE_TO_PAY.

Data Sources (1)

SourceAliasJoin Type
udm_p2p_attr udm_p2p_attr from

Associations (3)

CardinalityTargetAliasCondition
[0..1] I_OperationalAcctgDocItem _CollectionsInvoice $projection.CompanyCode = _CollectionsInvoice.CompanyCode and $projection.AccountingDocument = _CollectionsInvoice.AccountingDocument and $projection.FiscalYear = _CollectionsInvoice.FiscalYear and $projection.AccountingDocumentItem = _CollectionsInvoice.AccountingDocumentItem
[0..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_CollectionsInvoiceMemory _InvoiceMemory $projection.CompanyCode = _InvoiceMemory.CompanyCode and $projection.AccountingDocument = _InvoiceMemory.AccountingDocument and $projection.FiscalYear = _InvoiceMemory.FiscalYear and $projection.AccountingDocumentItem = _InvoiceMemory.AccountingDocumentItem

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName ICOLLSP2PINV view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
EndUserText.label Promise To Pay Invoice view
VDM.viewType #BASIC view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.representativeKey LinkedInvoiceKey view

Fields (11)

KeyFieldSource TableSource FieldDescription
KEY PromiseToPayUUID case_guid UUID
KEY LinkedInvoiceKey fin_invoice_key Key
CompanyCode
AccountingDocument
FiscalYear
AccountingDocumentItem
PromisedAmount fin_promised_amt Promised
Currency fin_p2p_curr Currency
_CollectionsInvoice _CollectionsInvoice
_CompanyCode _CompanyCode
_InvoiceMemory _InvoiceMemory

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_CollsPromiseToPayInvoice.
-- 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_CollsPromiseToPayInvoice AS
SELECT
  case_guid AS PromiseToPayUUID,
  fin_invoice_key AS LinkedInvoiceKey,
  cast( substring( fin_invoice_key, 1, 4) as bukrs ) AS CompanyCode,
  cast( substring( fin_invoice_key, 5, 10) as farp_belnr_d ) AS AccountingDocument,
  cast( substring( fin_invoice_key, 15, 4) as fis_gjahr ) AS FiscalYear,
  cast( substring( fin_invoice_key, 19, 3) as fis_buzei ) AS AccountingDocumentItem,
  fin_promised_amt AS PromisedAmount,
  fin_p2p_curr AS Currency
FROM udm_p2p_attr
LEFT OUTER JOIN I_OperationalAcctgDocItem AS _CollectionsInvoice ON CompanyCode = _CollectionsInvoice.CompanyCode AND AccountingDocument = _CollectionsInvoice.AccountingDocument AND FiscalYear = _CollectionsInvoice.FiscalYear AND AccountingDocumentItem = _CollectionsInvoice.AccountingDocumentItem  -- association [0..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_CollectionsInvoiceMemory AS _InvoiceMemory ON CompanyCode = _InvoiceMemory.CompanyCode AND AccountingDocument = _InvoiceMemory.AccountingDocument AND FiscalYear = _InvoiceMemory.FiscalYear AND AccountingDocumentItem = _InvoiceMemory.AccountingDocumentItem  -- association [0..1]
;