P_LoanContrWriteoff

DDL: P_LOANCONTRWRITEOFF Type: view COMPOSITE Package: FVVD_VDM

Writeoff data for Loan Contract

P_LoanContrWriteoff is a Composite CDS View that provides data about "Writeoff data for Loan Contract" in SAP S/4HANA. It reads from 2 data sources (I_LoanContrActlDocItmData, P_LoanContrBusOpCalc) and exposes 6 fields with key fields CompanyCode, LoanArchivingCategory, LoanContractID. Part of development package FVVD_VDM.

Data Sources (2)

SourceAliasJoin Type
I_LoanContrActlDocItmData _LoanContrActlDocItm inner
P_LoanContrBusOpCalc _LoanContrBusOpCalc from

Annotations (7)

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

Fields (6)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode P_LoanContrBusOpCalc CompanyCode Receiver Company Code
KEY LoanArchivingCategory P_LoanContrBusOpCalc LoanArchivingCategory
KEY LoanContractID P_LoanContrBusOpCalc LoanContractID
NumberOfWriteoff
WriteoffWeightedAverageRatio
WriteoffWeightedRatio

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_LoanContrWriteoff.
-- 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 P_LoanContrWriteoff AS
SELECT
  _LoanContrBusOpCalc.CompanyCode AS CompanyCode,
  _LoanContrBusOpCalc.LoanArchivingCategory AS LoanArchivingCategory,
  _LoanContrBusOpCalc.LoanContractID AS LoanContractID,
  count(*) AS NumberOfWriteoff,
  avg(_LoanContrBusOpCalc.BusOpWgtdRatio as abap.dec(19 , 6)) AS WriteoffWeightedAverageRatio,
  sum(_LoanContrBusOpCalc.BusOpWgtdRatio) AS WriteoffWeightedRatio
FROM P_LoanContrBusOpCalc AS _LoanContrBusOpCalc
INNER JOIN I_LoanContrActlDocItmData AS _LoanContrActlDocItm ON /* join condition not captured in parsed metadata */
;