P_PayreqnInvoiceRemainAmount

DDL: P_PAYREQNINVOICEREMAINAMOUNT SQL: PINVCREMAINAMT Type: view COMPOSITE Package: GLO_FIN_PAY_REQN_CN

Get invoice remaining amount

P_PayreqnInvoiceRemainAmount is a Composite CDS View that provides data about "Get invoice remaining amount" in SAP S/4HANA. It reads from 1 data source (P_PAYREQNSUPLRCUSTPAIDITEM) and exposes 14 fields with key fields CompanyCode, FiscalYear, AccountingDocument, AccountingDocumentItem. Part of development package GLO_FIN_PAY_REQN_CN.

Data Sources (1)

SourceAliasJoin Type
P_PAYREQNSUPLRCUSTPAIDITEM P_PAYREQNSUPLRCUSTPAIDITEM from

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PINVCREMAINAMT view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
VDM.private true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #M view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (14)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode Receiver Company Code
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY AccountingDocument AccountingDocument Journal Entry
KEY AccountingDocumentItem AccountingDocumentItem Posting View Item
SpecialGLCode SpecialGLCode Special G/L Ind
DebitCreditCode DebitCreditCode Single-Character Flag
AccountingDocumentType AccountingDocumentType Journal Entry Type
PaymentMethod PaymentMethod Pymt Meth.
Supplier Supplier Supplier
ItemType ItemType Object Type
Currency Currency Valuation Crcy
AmountInTransactionCurrency AmountInTransactionCurrency Pt Crcy Amt
PaidAmountInPaytCurrency PaidAmountInPaytCurrency Payment Amount
curr232endasRemainingOpenAmtInDspCrcy

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_PayreqnInvoiceRemainAmount.
-- 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: PINVCREMAINAMT

CREATE VIEW P_PayreqnInvoiceRemainAmount AS
SELECT
  CompanyCode,
  FiscalYear,
  AccountingDocument,
  AccountingDocumentItem,
  SpecialGLCode,
  DebitCreditCode,
  AccountingDocumentType,
  PaymentMethod,
  Supplier,
  ItemType,
  Currency,
  AmountInTransactionCurrency,
  PaidAmountInPaytCurrency,
  case when ( ClearingAccountingDocument <> '' and ClearingIsReversed = '' ) then cast( ('0') as abap.curr( 23,2)) when PaidAmountInPaytCurrency is null then AmountInTransactionCurrency else cast( (AmountInTransactionCurrency + PaidAmountInPaytCurrency) as abap.curr( 23,2)) end as RemainingOpenAmtInDspCrcy AS curr232endasRemainingOpenAmtInDspCrcy
FROM P_PAYREQNSUPLRCUSTPAIDITEM
;