P_CAPaymentLotAnalysis

DDL: P_CAPAYMENTLOTANALYSIS SQL: PCAPAYLOTANLYS Type: view CONSUMPTION

Payment Lot Selection

P_CAPaymentLotAnalysis is a Consumption CDS View that provides data about "Payment Lot Selection" in SAP S/4HANA. It reads from 1 data source (I_CAPaymentLot) and exposes 26 fields with key field CAPaymentLot. It has 9 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_CAPaymentLot I_CAPaymentLot from

Associations (9)

CardinalityTargetAliasCondition
[0..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[1..1] I_CADocumentOriginCode _CADocumentOriginCode $projection.CADocumentOriginCode = _CADocumentOriginCode.CADocumentOriginCode
[1..1] I_CAPaymentLotStatus _PaymentLotStatus $projection.CAPaymentLotStatus = _PaymentLotStatus.CAPaymentLotStatus
[0..1] I_Housebank _HouseBank $projection.CompanyCode = _HouseBank.CompanyCode and $projection.HouseBank = _HouseBank.HouseBank
[0..1] I_HouseBankAccount _HouseBankAccount $projection.CompanyCode = _HouseBankAccount.CompanyCode and $projection.HouseBank = _HouseBankAccount.HouseBank and $projection.HouseBankAccount = _HouseBankAccount.HouseBankAccount
[1..1] I_CACompanyCode _CompanyCodeML $projection.CompanyCode = _CompanyCodeML.CompanyCode
[1..1] P_CAPaymentLotOpenItems _CAPaymentLotOpenItems $projection.CAPaymentLot = _CAPaymentLotOpenItems.CAPaymentLot
[1..1] P_CAPaymentLotAutoCleared _CAPaymentLotAutoCleared $projection.CAPaymentLot = _CAPaymentLotAutoCleared.CAPaymentLot
[1..1] P_CAPaymentLotManualClrPrcntg _CAPaymentLotMnlClrPrcntg $projection.CAPaymentLot = _CAPaymentLotMnlClrPrcntg.CAPaymentLot

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PCAPAYLOTANLYS view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Payment Lot Selection view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
VDM.private true view

Fields (26)

KeyFieldSource TableSource FieldDescription
KEY CAPaymentLot CAPaymentLot Lot
CompanyCode CompanyCode Receiver Company Code
CompanyCodeName _CompanyCode CompanyCodeName Company Name
MchnLrngIsActvForPaytAssgmt _CompanyCodeML MchnLrngIsActvForPaytAssgmt
CADocumentOriginCode CADocumentOriginCode Document Origin
CADocumentOriginCodeName
CAPaymentLotStatus CAPaymentLotStatus Status
CAPaymentLotStatusName
numc1endasCAPaymentLotStatusCriticality
HouseBank HouseBank House Bank
HouseBankName
HouseBankAccount HouseBankAccount House Bank Account
HouseBankAccountDescription
BankStatementShortID BankStatementShortID Statement Short Key
CANumberOfPaymentLotItems CANumberOfPaymentLotItems Line Items per Form
CreationDate CreationDate Time Stamp
TotalDebitAmount TotalDebitAmount Debit total
TotalAmountCurrency TotalAmountCurrency Currency
CANumberOfPaymentLotOpenItems _CAPaymentLotOpenItems CANumberOfPaymentLotOpenItems
CAOpenItemsAmountInTC _CAPaymentLotOpenItems CAOpenItemsAmountInTC
CAAutomlyClearedItemsAmtInTC _CAPaymentLotAutoCleared CAAutomlyClearedItemsAmtInTC
CANrOfPaytLotAutomlyClrdItems _CAPaymentLotAutoCleared CANrOfPaytLotAutomlyClrdItems
OpenItemRateInPercent _CAPaymentLotMnlClrPrcntg OpenItemRateInPercent
_CAPaymentLotOpenItems _CAPaymentLotOpenItems
_CAPaymentLotAutoCleared _CAPaymentLotAutoCleared
_CAPaymentLotMnlClrPrcntg _CAPaymentLotMnlClrPrcntg

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_CAPaymentLotAnalysis.
-- 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: PCAPAYLOTANLYS

CREATE VIEW P_CAPaymentLotAnalysis AS
SELECT
  CAPaymentLot,
  CompanyCode,
  _CompanyCode.CompanyCodeName AS CompanyCodeName,
  _CompanyCodeML.MchnLrngIsActvForPaytAssgmt AS MchnLrngIsActvForPaytAssgmt,
  CADocumentOriginCode,
  _CADocumentOriginCode._Text[1:Language = $session.system_language].CADocumentOriginCodeName AS CADocumentOriginCodeName,
  CAPaymentLotStatus,
  _PaymentLotStatus._Text[1:Language = $session.system_language].CAPaymentLotStatusName AS CAPaymentLotStatusName,
  case CAPaymentLotStatus when '3' then cast('2' as abap.numc(1)) when '4' then cast('2' as abap.numc(1)) when '6' then cast('0' as abap.numc(1)) when '9' then cast('2' as abap.numc(1)) when '5' then cast('3' as abap.numc(1)) else cast('1' as abap.numc(1)) end as CAPaymentLotStatusCriticality AS numc1endasCAPaymentLotStatusCriticality,
  HouseBank,
  _HouseBank._Bank.BankName AS HouseBankName,
  HouseBankAccount,
  _HouseBankAccount._Text[1: Language=$session.system_language].HouseBankAccountDescription AS HouseBankAccountDescription,
  BankStatementShortID,
  CANumberOfPaymentLotItems,
  CreationDate,
  TotalDebitAmount,
  TotalAmountCurrency,
  _CAPaymentLotOpenItems.CANumberOfPaymentLotOpenItems AS CANumberOfPaymentLotOpenItems,
  _CAPaymentLotOpenItems.CAOpenItemsAmountInTC AS CAOpenItemsAmountInTC,
  _CAPaymentLotAutoCleared.CAAutomlyClearedItemsAmtInTC AS CAAutomlyClearedItemsAmtInTC,
  _CAPaymentLotAutoCleared.CANrOfPaytLotAutomlyClrdItems AS CANrOfPaytLotAutomlyClrdItems,
  _CAPaymentLotMnlClrPrcntg.OpenItemRateInPercent AS OpenItemRateInPercent
FROM I_CAPaymentLot
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_CADocumentOriginCode AS _CADocumentOriginCode ON CADocumentOriginCode = _CADocumentOriginCode.CADocumentOriginCode  -- association [1..1]
LEFT OUTER JOIN I_CAPaymentLotStatus AS _PaymentLotStatus ON CAPaymentLotStatus = _PaymentLotStatus.CAPaymentLotStatus  -- association [1..1]
LEFT OUTER JOIN I_Housebank AS _HouseBank ON CompanyCode = _HouseBank.CompanyCode AND HouseBank = _HouseBank.HouseBank  -- association [0..1]
LEFT OUTER JOIN I_HouseBankAccount AS _HouseBankAccount ON CompanyCode = _HouseBankAccount.CompanyCode AND HouseBank = _HouseBankAccount.HouseBank AND HouseBankAccount = _HouseBankAccount.HouseBankAccount  -- association [0..1]
LEFT OUTER JOIN I_CACompanyCode AS _CompanyCodeML ON CompanyCode = _CompanyCodeML.CompanyCode  -- association [1..1]
LEFT OUTER JOIN P_CAPaymentLotOpenItems AS _CAPaymentLotOpenItems ON CAPaymentLot = _CAPaymentLotOpenItems.CAPaymentLot  -- association [1..1]
LEFT OUTER JOIN P_CAPaymentLotAutoCleared AS _CAPaymentLotAutoCleared ON CAPaymentLot = _CAPaymentLotAutoCleared.CAPaymentLot  -- association [1..1]
LEFT OUTER JOIN P_CAPaymentLotManualClrPrcntg AS _CAPaymentLotMnlClrPrcntg ON CAPaymentLot = _CAPaymentLotMnlClrPrcntg.CAPaymentLot  -- association [1..1]
;