P_CycleSegmentHierSourceParam

DDL: P_CYCLESEGMENTHIERSOURCEPARAM SQL: PALLOCYC2SEGSRC Type: view CONSUMPTION

P_CycleSegmentHierSourceParam is a Consumption CDS View in SAP S/4HANA. It reads from 5 data sources (I_AllocationContextType, I_AllocationContextType, I_AllocationCycle, I_AllocationCycle, I_AllocationSegment) and exposes 50 fields with key fields AllocationCycleHier, AllocationSegmentHier, AllocationSegmentHier.

Data Sources (5)

SourceAliasJoin Type
I_AllocationContextType I_AllocationContextType inner
I_AllocationContextType I_AllocationContextType inner
I_AllocationCycle I_AllocationCycle inner
I_AllocationCycle I_AllocationCycle union
I_AllocationSegment I_AllocationSegment from

Parameters (1)

NameTypeDefault
P_AllocationTagID fco_tag_id

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PALLOCYC2SEGSRC view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
VDM.private true view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.dataClass #MIXED view

Fields (50)

KeyFieldSource TableSource FieldDescription
KEY AllocationCycleHier
KEY AllocationSegmentHier
DrillState
HierarchyLevel
AllocationType Table
AllocationCycle I_AllocationSegment AllocationCycle Cycle
AllocationCycleStartDate I_AllocationSegment AllocationCycleStartDate Valid From
AllocationCycleName I_AllocationCycle AllocationCycleName Allocation Cycle
AllocationActualPlanVariant I_AllocationCycle AllocationActualPlanVariant Actual/Plan
AllocationPostingType Posting Type
Ledger I_AllocationCycle Ledger Ledger
AllocationStatus I_AllocationCycle AllocationStatus Status
LastChangedByUser I_AllocationCycle LastChangedByUser User Name
AllocationCycleEndDate I_AllocationCycle AllocationCycleEndDate Valid To
LastChangeDate I_AllocationCycle LastChangeDate Time Stamp
CreatedByUser I_AllocationCycle CreatedByUser User Name
AllocationCreateDate I_AllocationCycle AllocationCreateDate Entered On
AllocationFrequency I_AllocationCycle AllocationFrequency Frequency ID
CompanyCode
AllocationCycleCategory
AllocationCycleSegment I_AllocationSegment AllocationCycleSegment Segment Number
SegmentName I_AllocationSegment SegmentName Segment Name
CompanyCodeName I_CompanyCode CompanyCodeName Company Name
AllocationCycleNameText
AllocationTagID Assignment AllocationTagID Allocation Tags
KEY AllocationSegmentHier
DrillState
HierarchyLevel
AllocationType I_AllocationCycle AllocationType Table
AllocationCycle I_AllocationCycle AllocationCycle Cycle
AllocationCycleStartDate I_AllocationCycle AllocationCycleStartDate Valid From
AllocationCycleName I_AllocationCycle AllocationCycleName Allocation Cycle
AllocationActualPlanVariant I_AllocationCycle AllocationActualPlanVariant Actual/Plan
AllocationPostingType I_AllocationCycle AllocationPostingType Posting Type
Ledger I_AllocationCycle Ledger Ledger
AllocationStatus I_AllocationCycle AllocationStatus Status
LastChangedByUser I_AllocationCycle LastChangedByUser User Name
AllocationCycleEndDate I_AllocationCycle AllocationCycleEndDate Valid To
LastChangeDate I_AllocationCycle LastChangeDate Time Stamp
CreatedByUser I_AllocationCycle CreatedByUser User Name
AllocationCreateDate I_AllocationCycle AllocationCreateDate Entered On
AllocationFrequency I_AllocationCycle AllocationFrequency Frequency ID
CompanyCode
AllocationCycleCategory
AllocationCycleSegment Segment Number
SegmentName Segment Name
CompanyCodeName I_CompanyCode CompanyCodeName Company Name
AllocationCycleNameText
AllocationTagID Assignment AllocationTagID Allocation Tags
AllocTagAssignmentStatus

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_CycleSegmentHierSourceParam.
-- 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: PALLOCYC2SEGSRC
-- Parameters: P_AllocationTagID : fco_tag_id

CREATE VIEW P_CycleSegmentHierSourceParam AS
SELECT
  concat( I_AllocationSegment.AllocationCycleStartDate, concat(I_AllocationSegment.AllocationCycle, I_AllocationSegment.AllocationType) ) AS AllocationCycleHier,
  concat( I_AllocationSegment.AllocationCycleStartDate, concat(I_AllocationSegment.AllocationCycle, concat(I_AllocationSegment.AllocationType, I_AllocationSegment.AllocationCycleSegment) ) ) AS AllocationSegmentHier,
  cast( 'leaf' as abap.char(10) ) AS DrillState,
  cast( 0001 as abap.int4 ) AS HierarchyLevel,
  cast( I_AllocationSegment.AllocationType as fco_allocation_context ) AS AllocationType,
  I_AllocationSegment.AllocationCycle AS AllocationCycle,
  I_AllocationSegment.AllocationCycleStartDate AS AllocationCycleStartDate,
  I_AllocationCycle.AllocationCycleName AS AllocationCycleName,
  I_AllocationCycle.AllocationActualPlanVariant AS AllocationActualPlanVariant,
  cast( I_AllocationCycle.AllocationPostingType as fco_alloc_posting_type) AS AllocationPostingType,
  I_AllocationCycle.Ledger AS Ledger,
  I_AllocationCycle.AllocationStatus AS AllocationStatus,
  I_AllocationCycle.LastChangedByUser AS LastChangedByUser,
  I_AllocationCycle.AllocationCycleEndDate AS AllocationCycleEndDate,
  I_AllocationCycle.LastChangeDate AS LastChangeDate,
  I_AllocationCycle.CreatedByUser AS CreatedByUser,
  I_AllocationCycle.AllocationCreateDate AS AllocationCreateDate,
  I_AllocationCycle.AllocationFrequency AS AllocationFrequency,
  cast(CompanyCode.AllocationFieldMinimumValue as fis_bukrs) AS CompanyCode,
  cast(PlanCategory.AllocationFieldMinimumValue as fcom_category) AS AllocationCycleCategory,
  I_AllocationSegment.AllocationCycleSegment AS AllocationCycleSegment,
  I_AllocationSegment.SegmentName AS SegmentName,
  I_CompanyCode.CompanyCodeName AS CompanyCodeName,
  I_AllocationCycle._Text.AllocationCycleNameText AS AllocationCycleNameText,
  Assignment.AllocationTagID AS AllocationTagID,
  cast(case when Assignment.AllocationTagID is null then 'U' else 'A' end as fco_alloc_tag_assignment) AS AllocTagAssignmentStatus
FROM I_AllocationSegment
INNER JOIN I_AllocationContextType ON /* join condition not captured in parsed metadata */
INNER JOIN I_AllocationCycle ON /* join condition not captured in parsed metadata */
-- UNION with additional select branch(es): I_AllocationCycle
;