I_APCshDiscUtilization

DDL: I_APCSHDISCUTILIZATION SQL: IFIAPCSHDISUTI Type: view COMPOSITE Package: FINS_FIS_AP_APPS

Account Payable Cash Discount Utilization

I_APCshDiscUtilization is a Composite CDS View (Cube) that provides data about "Account Payable Cash Discount Utilization" in SAP S/4HANA. It reads from 1 data source (P_APCshDiscUtilizationA7) and exposes 22 fields with key fields CompanyCode, Supplier, PaymentTerms, TransactionCurrency, YearMonth. It has 8 associations to related views. Part of development package FINS_FIS_AP_APPS.

Data Sources (1)

SourceAliasJoin Type
P_APCshDiscUtilizationA7 P_APCshDiscUtilizationA7 from

Parameters (3)

NameTypeDefault
P_KeyDate sydate
P_StartDate vdm_v_start_date
P_DisplayCurrency vdm_v_display_currency

Associations (8)

CardinalityTargetAliasCondition
[0..1] I_Supplier _Supplier $projection.Supplier = _Supplier.Supplier
[0..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[1..1] I_CustomerPaymentTerms _CustomerPaymentTerms $projection.PaymentTerms = _CustomerPaymentTerms.CustomerPaymentTerms
[0..1] C_CshDiscFcstPaymentTerms _PaymentTerms $projection.PaymentTerms = _PaymentTerms.PaymentTerms
[0..1] I_SupplierAccountGroup _SupplierAccountGroup $projection.SupplierAccountGroup = _SupplierAccountGroup.SupplierAccountGroup
[0..1] I_Country _Country $projection.Country = _Country.Country
[0..1] I_Region _SupplierRegion $projection.SupplierRegion = _SupplierRegion.Region and $projection.Country = _SupplierRegion.Country
[0..1] I_SupplierCompany _SupplierCompany $projection.Supplier = _SupplierCompany.Supplier and $projection.CompanyCode = _SupplierCompany.CompanyCode

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName IFIAPCSHDISUTI view
EndUserText.label Account Payable Cash Discount Utilization view
VDM.viewType #COMPOSITE view
Analytics.dataCategory #CUBE view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MIXED view
Metadata.ignorePropagatedAnnotations true view
AccessControl.personalData.blocking #REQUIRED view
Metadata.allowExtensions true view

Fields (22)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode Receiver Company Code
KEY Supplier Supplier Supplier
KEY PaymentTerms PaymentTerms Pyt Terms
KEY TransactionCurrency TransactionCurrency Transaction Currency
KEY YearMonth Year Month
SupplierAccountGroup
Country
SupplierRegion
DisplayCurrency DisplayCurrency Display Currency
SupplierBasicAuthorizationGrp _Supplier AuthorizationGroup AuthorizGroup
SupplierFinsAuthorizationGrp _SupplierCompany AuthorizationGroup AuthorizGroup
TakenCshDiscInDspCrcy_E
OfferedCshDiscInDspCrcy_E
LostCshDiscInDspCrcy_E
_DisplayCurrency _DisplayCurrency
_Supplier _Supplier
_SupplierAccountGroup _SupplierAccountGroup
_CompanyCode _CompanyCode
_CustomerPaymentTerms _CustomerPaymentTerms
_PaymentTerms _PaymentTerms
_Country _Country
_SupplierRegion _SupplierRegion

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_APCshDiscUtilization.
-- 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: IFIAPCSHDISUTI
-- Parameters: P_KeyDate : sydate, P_StartDate : vdm_v_start_date, P_DisplayCurrency : vdm_v_display_currency

CREATE VIEW I_APCshDiscUtilization AS
SELECT
  CompanyCode,
  Supplier,
  PaymentTerms,
  TransactionCurrency,
  cast(YearMonth as fis_yearmonth_c) AS YearMonth,
  cast(_Supplier.SupplierAccountGroup as farp_supplier_account_group) AS SupplierAccountGroup,
  cast(_Supplier._StandardAddress.Country as land1_gp) AS Country,
  cast(_Supplier._StandardAddress.Region as farp_supplier_region) AS SupplierRegion,
  DisplayCurrency,
  _Supplier.AuthorizationGroup AS SupplierBasicAuthorizationGrp,
  _SupplierCompany.AuthorizationGroup AS SupplierFinsAuthorizationGrp,
  cast( sum( TakenCshDiscInDspCrcy_E ) as farp_taken_cash_discounts_amt) AS TakenCshDiscInDspCrcy_E,
  cast( sum( OfferedCshDiscInDspCrcy_E ) as farp_offered_cash_discounts) AS OfferedCshDiscInDspCrcy_E,
  cast( sum( LostCshDiscInDspCrcy_E ) as farp_lost_cash_discounts) AS LostCshDiscInDspCrcy_E
FROM P_APCshDiscUtilizationA7
LEFT OUTER JOIN I_Supplier AS _Supplier ON Supplier = _Supplier.Supplier  -- association [0..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_CustomerPaymentTerms AS _CustomerPaymentTerms ON PaymentTerms = _CustomerPaymentTerms.CustomerPaymentTerms  -- association [1..1]
LEFT OUTER JOIN C_CshDiscFcstPaymentTerms AS _PaymentTerms ON PaymentTerms = _PaymentTerms.PaymentTerms  -- association [0..1]
LEFT OUTER JOIN I_SupplierAccountGroup AS _SupplierAccountGroup ON SupplierAccountGroup = _SupplierAccountGroup.SupplierAccountGroup  -- association [0..1]
LEFT OUTER JOIN I_Country AS _Country ON Country = _Country.Country  -- association [0..1]
LEFT OUTER JOIN I_Region AS _SupplierRegion ON SupplierRegion = _SupplierRegion.Region AND Country = _SupplierRegion.Country  -- association [0..1]
LEFT OUTER JOIN I_SupplierCompany AS _SupplierCompany ON Supplier = _SupplierCompany.Supplier AND CompanyCode = _SupplierCompany.CompanyCode  -- association [0..1]
;