P_CmmdtyHdgSpecMaxVersion

DDL: P_CMMDTYHDGSPECMAXVERSION SQL: PHDGSPCMAXVER Type: view COMPOSITE

Active Version of Exposure ID

P_CmmdtyHdgSpecMaxVersion is a Composite CDS View that provides data about "Active Version of Exposure ID" in SAP S/4HANA. It reads from 1 data source (I_CmmdtyHdgSpecDetails) and exposes 7 fields with key field CompanyCode.

Data Sources (1)

SourceAliasJoin Type
I_CmmdtyHdgSpecDetails _hdgspec from

Parameters (2)

NameTypeDefault
P_CompanyCode bukrs
P_ValidFrom cmm_plan_valid_from

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PHDGSPCMAXVER view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #B view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
EndUserText.label Active Version of Exposure ID view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode I_CmmdtyHdgSpecDetails CompanyCode Receiver Company Code
DerivativeContrSpecification I_CmmdtyHdgSpecDetails DerivativeContrSpecification DCS ID
MarketIdentifierCode I_CmmdtyHdgSpecDetails MarketIdentifierCode MIC
CmmdtyHdgSpecHedgeBook I_CmmdtyHdgSpecDetails CmmdtyHdgSpecHedgeBook Hedge Book
CmmdtyHdgSpecDirection I_CmmdtyHdgSpecDetails CmmdtyHdgSpecDirection Long/Short Position
CmmdtyHdgSpecificationID I_CmmdtyHdgSpecDetails CmmdtyHdgSpecificationID Hedge Spec. ID
CmmdtyHdgSpecificationVersion

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_CmmdtyHdgSpecMaxVersion.
-- 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: PHDGSPCMAXVER
-- Parameters: P_CompanyCode : bukrs, P_ValidFrom : cmm_plan_valid_from

CREATE VIEW P_CmmdtyHdgSpecMaxVersion AS
SELECT
  _hdgspec.CompanyCode AS CompanyCode,
  _hdgspec.DerivativeContrSpecification AS DerivativeContrSpecification,
  _hdgspec.MarketIdentifierCode AS MarketIdentifierCode,
  _hdgspec.CmmdtyHdgSpecHedgeBook AS CmmdtyHdgSpecHedgeBook,
  _hdgspec.CmmdtyHdgSpecDirection AS CmmdtyHdgSpecDirection,
  _hdgspec.CmmdtyHdgSpecificationID AS CmmdtyHdgSpecificationID,
  max(_hdgspec.CmmdtyHdgSpecificationVersion) AS CmmdtyHdgSpecificationVersion
FROM I_CmmdtyHdgSpecDetails AS _hdgspec
;