I_APPayablesAging

DDL: I_APPAYABLESAGING SQL: IAPAGINGOVW Type: view COMPOSITE Package: ODATA_APOVERVIEWPAGE

Aging of payables in AP

I_APPayablesAging is a Composite CDS View that provides data about "Aging of payables in AP" in SAP S/4HANA. It reads from 1 data source (P_APFlexibleAging1) and exposes 16 fields with key fields CompanyCode, TransactionCurrency, ReconciliationAccount, Supplier, dec70endasNetDueArrearsDays. It has 2 associations to related views. Part of development package ODATA_APOVERVIEWPAGE.

Data Sources (1)

SourceAliasJoin Type
P_APFlexibleAging1 P_APFlexibleAging1 from

Parameters (1)

NameTypeDefault
P_KeyDate sydate

Associations (2)

CardinalityTargetAliasCondition
[1..1] I_Supplier _Supplier AG.Supplier = _Supplier.Supplier
[1..1] I_SupplierCompany _SupplierCompany AG.CompanyCode = _SupplierCompany.CompanyCode and AG.Supplier = _SupplierCompany.Supplier

Annotations (10)

NameValueLevelField
VDM.viewType #COMPOSITE view
AbapCatalog.sqlViewName IAPAGINGOVW view
Metadata.ignorePropagatedAnnotations true view
EndUserText.label Aging of payables in AP view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view

Fields (16)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode Receiver Company Code
KEY TransactionCurrency TransactionCurrency Transaction Currency
KEY ReconciliationAccount ReconciliationAccount Recon. account
KEY Supplier Supplier Supplier
KEY dec70endasNetDueArrearsDays
KEY AccountingDocument AccountingDocument Journal Entry
KEY AccountingDocumentItem AccountingDocumentItem Posting View Item
KEY FiscalYear FiscalYear G/L Fiscal Year
NetDueDate NetDueDate Net Due Date
BusinessArea BusinessArea Business Area
CompanyCodeCurrency CompanyCodeCurrency Local Currency
AmountInCompanyCodeCurrency AmountInCompanyCodeCurrency Local Crcy Amt
SupplierCountry
AccountingClerk _SupplierCompany AccountingClerk Clerk Abbrev.
SupplierBasicAuthorizationGrp _Supplier AuthorizationGroup AuthorizGroup
SupplierFinsAuthorizationGrp _SupplierCompany AuthorizationGroup AuthorizGroup

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_APPayablesAging.
-- 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: IAPAGINGOVW
-- Parameters: P_KeyDate : sydate

CREATE VIEW I_APPayablesAging AS
SELECT
  CompanyCode,
  TransactionCurrency,
  ReconciliationAccount,
  Supplier,
  case when FollowOnDocumentType = '' or FollowOnDocumentType = 'V' or FollowOnDocumentType = 'P' or ( InvoiceReference = '' and InvoiceItemReference = '000' and InvoiceReferenceFiscalYear = '0000' ) or RefInvcDocumentDate is null then cast(DATS_DAYS_BETWEEN(NetDueDate, $parameters.P_KeyDate) as abap.dec(7,0) ) else cast(DATS_DAYS_BETWEEN(RefInvcNetDueDate, $parameters.P_KeyDate) as abap.dec(7,0) ) end as NetDueArrearsDays AS dec70endasNetDueArrearsDays,
  AccountingDocument,
  AccountingDocumentItem,
  FiscalYear,
  NetDueDate,
  BusinessArea,
  CompanyCodeCurrency,
  AmountInCompanyCodeCurrency,
  _Supplier._StandardAddress.Country AS SupplierCountry,
  _SupplierCompany.AccountingClerk AS AccountingClerk,
  _Supplier.AuthorizationGroup AS SupplierBasicAuthorizationGrp,
  _SupplierCompany.AuthorizationGroup AS SupplierFinsAuthorizationGrp
FROM P_APFlexibleAging1
LEFT OUTER JOIN I_Supplier AS _Supplier ON AG.Supplier = _Supplier.Supplier  -- association [1..1]
LEFT OUTER JOIN I_SupplierCompany AS _SupplierCompany ON AG.CompanyCode = _SupplierCompany.CompanyCode AND AG.Supplier = _SupplierCompany.Supplier  -- association [1..1]
;