P_MLColl_AcctgDocItemCleared

DDL: P_MLCOLL_ACCTGDOCITEMCLEARED Type: view COMPOSITE Package: UDM_COLL_ML

ML Collections Acctg Doc Items Cleared

P_MLColl_AcctgDocItemCleared is a Composite CDS View that provides data about "ML Collections Acctg Doc Items Cleared" in SAP S/4HANA. It reads from 2 data sources (I_OperationalAcctgDocItem, P_MLColl_DirectPayers5) and exposes 23 fields with key fields AccountingDocument, FiscalYear, AccountingDocumentItem. It has 2 associations to related views. Part of development package UDM_COLL_ML.

Data Sources (2)

SourceAliasJoin Type
I_OperationalAcctgDocItem _AccDoc from
P_MLColl_DirectPayers5 _DirectPayers inner

Parameters (3)

NameTypeDefault
P_ExchangeRateType kurst
P_TargetCurrency vdm_v_target_currency
P_SystemDate sydate

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_CalendarDate _ClearingDate $projection.ClearingDate = _ClearingDate.CalendarDate
[0..1] I_BusinessPartnerCustomer _CustomerToBusinessPartner $projection.Customer = _CustomerToBusinessPartner.Customer

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PMLACCTGDOCICLRD view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (23)

KeyFieldSource TableSource FieldDescription
CompanyCode
KEY AccountingDocument I_OperationalAcctgDocItem AccountingDocument Journal Entry
KEY FiscalYear I_OperationalAcctgDocItem FiscalYear G/L Fiscal Year
KEY AccountingDocumentItem I_OperationalAcctgDocItem AccountingDocumentItem Posting View Item
DebitCreditCode I_OperationalAcctgDocItem DebitCreditCode Single-Character Flag
Customer I_OperationalAcctgDocItem Customer Sold-to Party
BusinessPartner _CustomerToBusinessPartner BusinessPartner Issuing Authority
Country
CustomerAccountGroup
dats12INITIAL14asNextFiscalYear
ClearingDate I_OperationalAcctgDocItem ClearingDate Clearing Date
DueCalculationBaseDate I_OperationalAcctgDocItem DueCalculationBaseDate Due Calculation Base Date
LastDunningDate I_OperationalAcctgDocItem LastDunningDate Last Dunned
DunningLevel I_OperationalAcctgDocItem DunningLevel Dunning Level
NetDueDate I_OperationalAcctgDocItem NetDueDate Net Due Date
AmountInTransactionCurrency I_OperationalAcctgDocItem AmountInTransactionCurrency Pt Crcy Amt
TransactionCurrency I_OperationalAcctgDocItem TransactionCurrency Transaction Currency
PaymentTerms I_OperationalAcctgDocItem PaymentTerms Pyt Terms
ClearingDateasClearingDelayInDays
NumberOfClearingDatePosInMonth
P_SystemDate120INITIALasOverdueDays
TargetCurrency
trueasAmountInTargetCurrency

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_MLColl_AcctgDocItemCleared.
-- 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.
-- Parameters: P_ExchangeRateType : kurst, P_TargetCurrency : vdm_v_target_currency, P_SystemDate : sydate

CREATE VIEW P_MLColl_AcctgDocItemCleared AS
SELECT
  systemField : #SYSTEM_DATE AS CompanyCode,
  _AccDoc.AccountingDocument AS AccountingDocument,
  _AccDoc.FiscalYear AS FiscalYear,
  _AccDoc.AccountingDocumentItem AS AccountingDocumentItem,
  _AccDoc.DebitCreditCode AS DebitCreditCode,
  _AccDoc.Customer AS Customer,
  _CustomerToBusinessPartner.BusinessPartner AS BusinessPartner,
  _AccDoc._Customer.Country AS Country,
  _AccDoc._Customer.CustomerAccountGroup AS CustomerAccountGroup,
  substring( dats_add_months( cast( concat( _AccDoc.FiscalYear, '0101') as abap.dats ), 12, 'INITIAL' ) ,1 ,4 ) as NextFiscalYear AS dats12INITIAL14asNextFiscalYear,
  _AccDoc.ClearingDate AS ClearingDate,
  _AccDoc.DueCalculationBaseDate AS DueCalculationBaseDate,
  _AccDoc.LastDunningDate AS LastDunningDate,
  _AccDoc.DunningLevel AS DunningLevel,
  _AccDoc.NetDueDate AS NetDueDate,
  _AccDoc.AmountInTransactionCurrency AS AmountInTransactionCurrency,
  _AccDoc.TransactionCurrency AS TransactionCurrency,
  _AccDoc.PaymentTerms AS PaymentTerms,
  dats_days_between( _AccDoc.NetDueDate, _AccDoc.ClearingDate ) as ClearingDelayInDays AS ClearingDateasClearingDelayInDays,
  cast( 1 as farr_counter ) AS NumberOfClearingDatePosInMonth,
  dats_days_between( _AccDoc.NetDueDate, dats_add_days( $parameters.P_SystemDate, - 120, 'INITIAL' ) ) as OverdueDays AS P_SystemDate120INITIALasOverdueDays,
  :P_TargetCurrency AS TargetCurrency,
  currency_conversion( amount => _AccDoc.AmountInTransactionCurrency, source_currency => _AccDoc.TransactionCurrency, target_currency => :P_TargetCurrency, exchange_rate_date => _AccDoc.DueCalculationBaseDate, exchange_rate_type => :P_ExchangeRateType, error_handling => 'SET_TO_NULL', decimal_shift => #CDSBoolean.true, round => #CDSBoolean.true ) as AmountInTargetCurrency AS trueasAmountInTargetCurrency
FROM I_OperationalAcctgDocItem AS _AccDoc
INNER JOIN P_MLColl_DirectPayers5 AS _DirectPayers ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_CalendarDate AS _ClearingDate ON ClearingDate = _ClearingDate.CalendarDate  -- association [0..1]
LEFT OUTER JOIN I_BusinessPartnerCustomer AS _CustomerToBusinessPartner ON Customer = _CustomerToBusinessPartner.Customer  -- association [0..1]
;