I_PRATstEntldSecdryCompare

DDL: I_PRATSTENTLDSECDRYCOMPARE SQL: IPRATENSTASPC Type: view COMPOSITE

TV - Entitlement Products Compare

I_PRATstEntldSecdryCompare is a Composite CDS View that provides data about "TV - Entitlement Products Compare" in SAP S/4HANA. It reads from 5 data sources (I_PRATstBslnEntldSecdryProd, I_PRATstEntldSecdryProd, I_PRAMatlMjrProdMappg, I_PRATstContrAllocScen, I_PRATstContrAllocTol) and exposes 21 fields with key fields DeliveryNetwork, Material, Well, WellCompletion, SalesDate.

Data Sources (5)

SourceAliasJoin Type
I_PRATstBslnEntldSecdryProd baseline inner
I_PRATstEntldSecdryProd current inner
I_PRAMatlMjrProdMappg matnr inner
I_PRATstContrAllocScen scen from
I_PRATstContrAllocTol tol inner

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName IPRATENSTASPC view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label TV - Entitlement Products Compare view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.viewType #COMPOSITE view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (21)

KeyFieldSource TableSource FieldDescription
KEY DeliveryNetwork I_PRATstBslnEntldSecdryProd DeliveryNetwork Delivery network ID
KEY Material I_PRATstBslnEntldSecdryProd Material Vehicle Model
KEY Well I_PRATstBslnEntldSecdryProd Well Well
KEY WellCompletion I_PRATstBslnEntldSecdryProd WellCompletion Well Completion
KEY SalesDate I_PRATstBslnEntldSecdryProd SalesDate Sales Date
KEY VolumeType I_PRATstBslnEntldSecdryProd VolumeType Volume Type
KEY PRAOwner I_PRATstBslnEntldSecdryProd PRAOwner Owner Number
KEY OwnerInterestType I_PRATstBslnEntldSecdryProd OwnerInterestType Opart int type
KEY OwnerInterestSequence I_PRATstBslnEntldSecdryProd OwnerInterestSequence Own. ISQ
MajorProduct I_PRAMatlMjrProdMappg MajorProduct Major Product
VolumeUnit I_PRATstEntldSecdryProd VolumeUnit Volume Unit
BaselineEntitledVolume I_PRATstBslnEntldSecdryProd EntitledVolume Entl. Vol.
EntitledVolume I_PRATstEntldSecdryProd EntitledVolume Entl. Vol.
EntitledVolumeDiffVal
EnergyUnit I_PRATstEntldSecdryProd EnergyUnit UoM
BaselineEntitledEnergy I_PRATstBslnEntldSecdryProd EntitledEnergy Energy
EntitledEnergy I_PRATstEntldSecdryProd EntitledEnergy Energy
EntitledEnergyDiffVal
SequenceNumber
EntitledVolumeTolVal I_PRATstContrAllocTol EntitledVolumeTolVal Entl Vol Tol
EntitledEnergyTolVal I_PRATstContrAllocTol EntitledEnergyTolVal Entl Enrgy Tol

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_PRATstEntldSecdryCompare.
-- 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: IPRATENSTASPC

CREATE VIEW I_PRATstEntldSecdryCompare AS
SELECT
  baseline.DeliveryNetwork AS DeliveryNetwork,
  baseline.Material AS Material,
  baseline.Well AS Well,
  baseline.WellCompletion AS WellCompletion,
  baseline.SalesDate AS SalesDate,
  baseline.VolumeType AS VolumeType,
  baseline.PRAOwner AS PRAOwner,
  baseline.OwnerInterestType AS OwnerInterestType,
  baseline.OwnerInterestSequence AS OwnerInterestSequence,
  matnr.MajorProduct AS MajorProduct,
  current.VolumeUnit AS VolumeUnit,
  baseline.EntitledVolume AS BaselineEntitledVolume,
  current.EntitledVolume AS EntitledVolume,
  abs(cast(baseline.EntitledVolume as abap.dec( 13, 3 )) - cast(current.EntitledVolume as abap.dec( 13,3) ) ) AS EntitledVolumeDiffVal,
  current.EnergyUnit AS EnergyUnit,
  baseline.EntitledEnergy AS BaselineEntitledEnergy,
  current.EntitledEnergy AS EntitledEnergy,
  abs(cast(baseline.EntitledEnergy as abap.dec( 13, 3 )) - cast(current.EntitledEnergy as abap.dec( 13,3) ) ) AS EntitledEnergyDiffVal,
  cast( '001' as abap.numc(3) ) AS SequenceNumber,
  tol.EntitledVolumeTolVal AS EntitledVolumeTolVal,
  tol.EntitledEnergyTolVal AS EntitledEnergyTolVal
FROM I_PRATstContrAllocScen AS scen
INNER JOIN I_PRAMatlMjrProdMappg AS matnr ON /* join condition not captured in parsed metadata */
INNER JOIN I_PRATstBslnEntldSecdryProd AS baseline ON /* join condition not captured in parsed metadata */
INNER JOIN I_PRATstEntldSecdryProd AS current ON /* join condition not captured in parsed metadata */
INNER JOIN I_PRATstContrAllocTol AS tol ON /* join condition not captured in parsed metadata */
;