C_APCshDiscUtilznOvw

DDL: C_APCSHDISCUTILZNOVW SQL: CAPCSHDISUTIOV Type: view CONSUMPTION

Cash Discount Utilization for AP OVP

C_APCshDiscUtilznOvw is a Consumption CDS View that provides data about "Cash Discount Utilization for AP OVP" in SAP S/4HANA. It reads from 1 data source (I_APCshDiscUtilization) and exposes 24 fields with key fields Supplier, PaymentTerms, TransactionCurrency, YearMonth. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_APCshDiscUtilization I_APCshDiscUtilization from

Parameters (6)

NameTypeDefault
P_DisplayCurrency vdm_v_display_currency
P_Language sylangu
P_KeyDate sydate
P_StartDate sydate
P_CurrentYearMonth vdm_yearmonth
P_LastMonthStartDateYearMonth vdm_yearmonth

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_SupplierCompany _SupplierCompany U.CompanyCode = _SupplierCompany.CompanyCode and U.Supplier = _SupplierCompany.Supplier

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName CAPCSHDISUTIOV view
EndUserText.label Cash Discount Utilization for AP OVP view
Metadata.ignorePropogatedAnnotations true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.compiler.compareFilter true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #CONSUMPTION view

Fields (24)

KeyFieldSource TableSource FieldDescription
lookupEntityP_APCalendarLast6Mnths
resultElementKeyDate
resultElementFirstDayOfLastHalfYearDate
resultElementCurrentYearMonth
resultElementLastMonthStartDateYearMonth
P_KeyDate
P_StartDate
CompanyCode
KEY Supplier U Supplier Supplier
KEY PaymentTerms U PaymentTerms Pyt Terms
KEY TransactionCurrency U TransactionCurrency Transaction Currency
KEY YearMonth
SupplierCountry U Country Venue: Ctry/Reg
SupplierBasicAuthorizationGrp U SupplierBasicAuthorizationGrp AuthorizGroup
SupplierAccountGroup U SupplierAccountGroup Account group
ReconciliationAccount _SupplierCompany ReconciliationAccount Recon. account
AccountingClerk _SupplierCompany AccountingClerk Clerk Abbrev.
DisplayCurrency U DisplayCurrency Display Currency
TakenCshDiscAmtInDspCrcy U TakenCshDiscInDspCrcy_E
OfferedCshDiscAmtInDspCrcy U OfferedCshDiscInDspCrcy_E
LostCshDiscAmtInDspCrcy U LostCshDiscInDspCrcy_E
_Country U _Country
_CustomerPaymentTerms U _CustomerPaymentTerms
_DisplayCurrency U _DisplayCurrency

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 C_APCshDiscUtilznOvw.
-- 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: CAPCSHDISUTIOV
-- Parameters: P_DisplayCurrency : vdm_v_display_currency, P_Language : sylangu, P_KeyDate : sydate, P_StartDate : sydate, P_CurrentYearMonth : vdm_yearmonth, P_LastMonthStartDateYearMonth : vdm_yearmonth

CREATE VIEW C_APCshDiscUtilznOvw AS
SELECT
  lookupEntity : 'P_APCalendarLast6Mnths' AS lookupEntityP_APCalendarLast6Mnths,
  resultElement : 'KeyDate' AS resultElementKeyDate,
  resultElement : 'FirstDayOfLastHalfYearDate' AS resultElementFirstDayOfLastHalfYearDate,
  resultElement : 'CurrentYearMonth' AS resultElementCurrentYearMonth,
  resultElement : 'LastMonthStartDateYearMonth' AS resultElementLastMonthStartDateYearMonth,
  binding : [{ targetParameter : 'P_DisplayCurrency', type : #PARAMETER, value : 'P_DisplayCurrency' AS P_KeyDate,
  P_StartDate : $parameters.P_StartDate AS P_StartDate,
  U.Supplier AS Supplier,
  U.PaymentTerms AS PaymentTerms,
  U.TransactionCurrency AS TransactionCurrency,
  cast(U.YearMonth as fis_yearmonth_c) AS YearMonth,
  U.Country AS SupplierCountry,
  U.SupplierBasicAuthorizationGrp AS SupplierBasicAuthorizationGrp,
  U.SupplierAccountGroup AS SupplierAccountGroup,
  _SupplierCompany.ReconciliationAccount AS ReconciliationAccount,
  _SupplierCompany.AccountingClerk AS AccountingClerk,
  U.DisplayCurrency AS DisplayCurrency,
  U.TakenCshDiscInDspCrcy_E AS TakenCshDiscAmtInDspCrcy,
  U.OfferedCshDiscInDspCrcy_E AS OfferedCshDiscAmtInDspCrcy,
  U.LostCshDiscInDspCrcy_E AS LostCshDiscAmtInDspCrcy,
  U._Country AS _Country,
  U._CustomerPaymentTerms AS _CustomerPaymentTerms,
  U._DisplayCurrency AS _DisplayCurrency
FROM I_APCshDiscUtilization
LEFT OUTER JOIN I_SupplierCompany AS _SupplierCompany ON U.CompanyCode = _SupplierCompany.CompanyCode AND U.Supplier = _SupplierCompany.Supplier  -- association [1..1]
;