P_CmmdtyBegPosPnLValue_Prep

DDL: P_CMMDTYBEGPOSPNLVALUE_PREP SQL: PCMMPNLBPPREP Type: view COMPOSITE Package: LOG_CMM_TPL

PnL Beginning Position Preprocessing

P_CmmdtyBegPosPnLValue_Prep is a Composite CDS View that provides data about "PnL Beginning Position Preprocessing" in SAP S/4HANA. It reads from 1 data source (P_CMM_CPE_TERM_VALUE) and exposes 27 fields with key fields mandt, PricingKey, PricingDocumentItem. Part of development package LOG_CMM_TPL.

Data Sources (1)

SourceAliasJoin Type
P_CMM_CPE_TERM_VALUE P_CMM_CPE_TERM_VALUE from

Parameters (4)

NameTypeDefault
P_EvaluationDate cmm_eval_keydate
P_ExchRateEvaluationDate cmm_eval_keydate
P_EndOfDaySnapshotFromDate cmm_dend_cutdate
P_EndOfDaySnapshotToDate cmm_dend_cutdate

Annotations (8)

NameValueLevelField
VDM.private true view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.sqlViewName PCMMPNLBPPREP view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (27)

KeyFieldSource TableSource FieldDescription
KEY mandt mandt Editing Client
KEY PricingKey PricingKey Pricing Key
KEY PricingDocumentItem PricingDocumentItem Item
ConditionTermRateFixation ConditionTermRateFixation
SourceDocumentItem SourceDocumentItem
VersStockRecordUUID VersStockRecordUUID
ConditionTermRateIsFixed ConditionTermRateIsFixed
MTMAdjustmentType MTMAdjustmentType
CommodityUnit CommodityUnit Order Unit
ConditionTermRateQuantityUnit ConditionTermRateQuantityUnit
datsasComparativeEvaluationDate
datsasQuotationPeriodReferenceDate
datsasComparQtanPeriodReferenceDate
datsasEvaluationDate
CmmdtyPriceExpsrMassUnit CmmdtyPriceExpsrMassUnit
CmmdtyPriceExpsrQtyInMassUnit CmmdtyPriceExpsrQtyInMassUnit
CmmdtyPriceExpsrVolumeUnit CmmdtyPriceExpsrVolumeUnit
CmmdtyPriceExpsrQtyInVolUnit CmmdtyPriceExpsrQtyInVolUnit
SourceDocument SourceDocument Document
CompanyCode CompanyCode Receiver Company Code
ProfitCenter ProfitCenter Profit Center
Material Material Vehicle Model
MaterialGroup MaterialGroup Product Group
PhysicalCommodity PhysicalCommodity
Plant Plant Valuation Area
CmmdtyRootDocExternalNumber CmmdtyRootDocExternalNumber
CmmdtyDocumentExternalNumber CmmdtyDocumentExternalNumber

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_CmmdtyBegPosPnLValue_Prep.
-- 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: PCMMPNLBPPREP
-- Parameters: P_EvaluationDate : cmm_eval_keydate, P_ExchRateEvaluationDate : cmm_eval_keydate, P_EndOfDaySnapshotFromDate : cmm_dend_cutdate, P_EndOfDaySnapshotToDate : cmm_dend_cutdate

CREATE VIEW P_CmmdtyBegPosPnLValue_Prep AS
SELECT
  mandt,
  PricingKey,
  PricingDocumentItem,
  ConditionTermRateFixation,
  SourceDocumentItem,
  VersStockRecordUUID,
  ConditionTermRateIsFixed,
  MTMAdjustmentType,
  CommodityUnit,
  ConditionTermRateQuantityUnit,
  cast ( case when (pnldatatype = 'MP0' or pnldatatype = 'CP0') then EndOfDaySnapshotDate else '19000101' end as abap.dats ) as ComparativeEvaluationDate AS datsasComparativeEvaluationDate,
  cast ( case when (pnldatatype = 'MP1' or pnldatatype = 'CP1') then QuotationPeriodReferenceDate else '19000101' end as abap.dats ) as QuotationPeriodReferenceDate AS datsasQuotationPeriodReferenceDate,
  cast ( case when (pnldatatype = 'MP0' or pnldatatype = 'CP0') then QuotationPeriodReferenceDate else '19000101' end as abap.dats ) as ComparQtanPeriodReferenceDate AS datsasComparQtanPeriodReferenceDate,
  cast ( case when (pnldatatype = 'MP1' or pnldatatype = 'CP1') then EndOfDaySnapshotDate else '19000101' end as abap.dats ) as EvaluationDate AS datsasEvaluationDate,
  CmmdtyPriceExpsrMassUnit,
  CmmdtyPriceExpsrQtyInMassUnit,
  CmmdtyPriceExpsrVolumeUnit,
  CmmdtyPriceExpsrQtyInVolUnit,
  SourceDocument,
  CompanyCode,
  ProfitCenter,
  Material,
  MaterialGroup,
  PhysicalCommodity,
  Plant,
  CmmdtyRootDocExternalNumber,
  CmmdtyDocumentExternalNumber
FROM P_CMM_CPE_TERM_VALUE
;