P_PL_ExcessDelayInvcFinalAmt
Calculate invoice final amount
P_PL_ExcessDelayInvcFinalAmt is a Composite CDS View that provides data about "Calculate invoice final amount" in SAP S/4HANA.
Parameters (2)
| Name | Type | Default |
|---|---|---|
| P_KeyDate | dats | |
| P_CustomerSupplier | char1 |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PEDINVFINAMT | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| VDM.private | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.viewType | #COMPOSITE | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | Calculate invoice final amount | view |
Fields (34)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | StatryRptgEntity | ExcessDelayAccountingItem | StatryRptgEntity | Reporting Entity |
| KEY | StatryRptCategory | ExcessDelayAccountingItem | StatryRptCategory | Report ID |
| KEY | StatryRptRunID | ExcessDelayAccountingItem | StatryRptRunID | Report Run ID |
| KEY | CompanyCode | ExcessDelayAccountingItem | CompanyCode | Receiver Company Code |
| KEY | FiscalYear | ExcessDelayAccountingItem | FiscalYear | G/L Fiscal Year |
| KEY | AccountingDocument | ExcessDelayAccountingItem | AccountingDocument | Journal Entry |
| KEY | AccountingDocumentItem | ExcessDelayAccountingItem | AccountingDocumentItem | Posting View Item |
| ClearingJournalEntry | ExcessDelayAccountingItem | ClearingJournalEntry | Clrng doc. | |
| AccountingDocumentType | ExcessDelayAccountingItem | AccountingDocumentType | Journal Entry Type | |
| DebitCreditCode | ExcessDelayAccountingItem | DebitCreditCode | Single-Character Flag | |
| CompanyCodeCurrency | ExcessDelayAccountingItem | CompanyCodeCurrency | Local Currency | |
| Supplier | ExcessDelayAccountingItem | Supplier | Supplier | |
| Customer | ExcessDelayAccountingItem | Customer | Sold-to Party | |
| DocumentDate | ExcessDelayAccountingItem | DocumentDate | Journal Entry Date | |
| PostingDate | ExcessDelayAccountingItem | PostingDate | Posting Date for GR | |
| DueCalculationBaseDate | ExcessDelayAccountingItem | DueCalculationBaseDate | Due Calculation Base Date | |
| NetDueDate | ExcessDelayAccountingItem | NetDueDate | Net Due Date | |
| ClearingDate | ExcessDelayAccountingItem | ClearingDate | Clearing Date | |
| InvoiceReceiptDate | ExcessDelayAccountingItem | InvoiceReceiptDate | Invoice Receipt Date | |
| DocumentReferenceID | ExcessDelayAccountingItem | DocumentReferenceID | Reference | |
| DocumentItemText | ExcessDelayAccountingItem | DocumentItemText | Text | |
| InvoiceReference | ExcessDelayAccountingItem | InvoiceReference | Invoice Reference | |
| InvoiceItemReference | ExcessDelayAccountingItem | InvoiceItemReference | Item | |
| InvoiceReferenceFiscalYear | ExcessDelayAccountingItem | InvoiceReferenceFiscalYear | Invoice Reference Fiscal Year | |
| FollowOnDocumentType | ExcessDelayAccountingItem | FollowOnDocumentType | Follow-On Document Type | |
| PaymentTerms | ExcessDelayAccountingItem | PaymentTerms | Pyt Terms | |
| CashDiscount1Days | ExcessDelayAccountingItem | CashDiscount1Days | Days from Baseline Date for Payment | |
| CashDiscount2Days | ExcessDelayAccountingItem | CashDiscount2Days | Days from Baseline Date for Payment | |
| NetPaymentDays | ExcessDelayAccountingItem | NetPaymentDays | Net Pmt Terms Period | |
| CashDiscount1Percent | ExcessDelayAccountingItem | CashDiscount1Percent | Disc. Percent 1 | |
| CashDiscount2Percent | ExcessDelayAccountingItem | CashDiscount2Percent | Disc. Percent 2 | |
| AssignmentReference | ExcessDelayAccountingItem | AssignmentReference | Assignment Reference | |
| CustomerSupplier | ExcessDelayAccountingItem | CustomerSupplier | ||
| NetDueDateP_KeyDate1endasNumberOfDays |
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 P_PL_ExcessDelayInvcFinalAmt.
-- 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: PEDINVFINAMT
-- Parameters: P_KeyDate : dats, P_CustomerSupplier : char1
CREATE VIEW P_PL_ExcessDelayInvcFinalAmt AS
SELECT
ExcessDelayAccountingItem.StatryRptgEntity AS StatryRptgEntity,
ExcessDelayAccountingItem.StatryRptCategory AS StatryRptCategory,
ExcessDelayAccountingItem.StatryRptRunID AS StatryRptRunID,
ExcessDelayAccountingItem.CompanyCode AS CompanyCode,
ExcessDelayAccountingItem.FiscalYear AS FiscalYear,
ExcessDelayAccountingItem.AccountingDocument AS AccountingDocument,
ExcessDelayAccountingItem.AccountingDocumentItem AS AccountingDocumentItem,
ExcessDelayAccountingItem.ClearingJournalEntry AS ClearingJournalEntry,
ExcessDelayAccountingItem.AccountingDocumentType AS AccountingDocumentType,
ExcessDelayAccountingItem.DebitCreditCode AS DebitCreditCode,
ExcessDelayAccountingItem.CompanyCodeCurrency AS CompanyCodeCurrency,
ExcessDelayAccountingItem.Supplier AS Supplier,
ExcessDelayAccountingItem.Customer AS Customer,
ExcessDelayAccountingItem.DocumentDate AS DocumentDate,
ExcessDelayAccountingItem.PostingDate AS PostingDate,
ExcessDelayAccountingItem.DueCalculationBaseDate AS DueCalculationBaseDate,
ExcessDelayAccountingItem.NetDueDate AS NetDueDate,
ExcessDelayAccountingItem.ClearingDate AS ClearingDate,
ExcessDelayAccountingItem.InvoiceReceiptDate AS InvoiceReceiptDate,
ExcessDelayAccountingItem.DocumentReferenceID AS DocumentReferenceID,
ExcessDelayAccountingItem.DocumentItemText AS DocumentItemText,
ExcessDelayAccountingItem.InvoiceReference AS InvoiceReference,
ExcessDelayAccountingItem.InvoiceItemReference AS InvoiceItemReference,
ExcessDelayAccountingItem.InvoiceReferenceFiscalYear AS InvoiceReferenceFiscalYear,
ExcessDelayAccountingItem.FollowOnDocumentType AS FollowOnDocumentType,
ExcessDelayAccountingItem.PaymentTerms AS PaymentTerms,
ExcessDelayAccountingItem.CashDiscount1Days AS CashDiscount1Days,
ExcessDelayAccountingItem.CashDiscount2Days AS CashDiscount2Days,
ExcessDelayAccountingItem.NetPaymentDays AS NetPaymentDays,
ExcessDelayAccountingItem.CashDiscount1Percent AS CashDiscount1Percent,
ExcessDelayAccountingItem.CashDiscount2Percent AS CashDiscount2Percent,
ExcessDelayAccountingItem.AssignmentReference AS AssignmentReference,
ExcessDelayAccountingItem.CustomerSupplier AS CustomerSupplier,
case when ( ExcessDelayAccountingItem.ClearingJournalEntry is not initial and ExcessDelayAccountingItem.ClearingJournalEntry is not null and ExcessDelayAccountingItem.ClearingJournalEntry <> '' ) and ( ExcessDelayAccountingItem.ClearingDate is not initial and ExcessDelayAccountingItem.ClearingDate is not null and ExcessDelayAccountingItem.ClearingDate <> '00000000' ) then case when ExcessDelayAccountingItem.ClearingDate <= ExcessDelayAccountingItem.NetDueDate then 0 else dats_days_between(ExcessDelayAccountingItem.NetDueDate, ExcessDelayAccountingItem.ClearingDate) end else dats_days_between(ExcessDelayAccountingItem.NetDueDate, :P_KeyDate) + 1 end as NumberOfDays AS NetDueDateP_KeyDate1endasNumberOfDays
;
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