I_GrantCostAllocSgmt

DDL: I_GRANTCOSTALLOCSGMT Type: view COMPOSITE

Cost Allocation Segment for Grant

I_GrantCostAllocSgmt is a Composite CDS View that provides data about "Cost Allocation Segment for Grant" in SAP S/4HANA. It reads from 2 data sources (I_AllocationKeyField, I_AllocationKeyField) and exposes 67 fields with key fields GrantID, AllocationType, AllocationCycle, ValidityStartDate, AllocationCycleSegment. It has 5 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_AllocationKeyField I_AllocationKeyField from
I_AllocationKeyField I_AllocationKeyField union

Associations (5)

CardinalityTargetAliasCondition
[0..*] I_Grant _Grant _Grant.GrantID = $projection.AllocationFieldMinimumValue or ( _Grant.GrantID between $projection.AllocationFieldMinimumValue and $projection.AllocationFieldMaximumValue )
[0..1] I_AllocationPostingTypeText _AllocationPostingTypeText _AllocationPostingTypeText.AllocationPostingType = $projection.allocationpostingtype and _AllocationPostingTypeText.Language = $session.system_language
[0..1] I_AllocationReceiverRuleText _AllocationReceiverRuleText _AllocationReceiverRuleText.AllocationReceiverRule = $projection.AllocationReceiverRule and _AllocationReceiverRuleText.Language = $session.system_language
[0..1] I_AllocationSenderRuleText _AllocationSenderRuleText _AllocationSenderRuleText.AllocationSenderRule = $projection.AllocationSenderRule and _AllocationSenderRuleText.Language = $session.system_language
[1..*] I_GrantGlobAcctgHier _GrantGAH $projection.AllocationSetId = _GrantGAH.AllocationSetId

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName IWUGRANTCAS view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
EndUserText.label Cost Allocation Segment for Grant view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #COMPOSITE view

Fields (67)

KeyFieldSource TableSource FieldDescription
KEY GrantID _Grant GrantID Sender Grant
KEY AllocationType AllocationType Table
KEY AllocationCycle AllocationCycle Cycle
KEY ValidityStartDate AllocationCycleStartDate Valid From
KEY AllocationCycleSegment AllocationCycleSegment Segment Number
KEY AllocationSetType AllocationSetType Type of Set
KEY AllocDocumentSequenceNumber AllocDocumentSequenceNumber Table position
AllocationCycleName _Cycle AllocationCycleName Allocation Cycle
AllocationCycleNameText
Ledger _Cycle Ledger Ledger
AllocationLastExecutedByUser _Cycle AllocationLastExecutedByUser
LastChangedByUser _Cycle LastChangedByUser User Name
AllocationLastExecutedDate _Cycle AllocationLastExecutedDate
SegmentName _Segment SegmentName Segment Name
SegmentNameText
AllocationSegmentIsLocked
AllocationFieldGroup _Segment AllocationFieldGroup Var. Portion Type
AllocationFieldName AllocationFieldName Field
AllocationSetName AllocationSetName Set Name
AllocationFieldMinimumValue AllocationFieldMinimumValue From Value
AllocationFieldMaximumValue AllocationFieldMaximumValue To Value
AllocationSetId AllocationSetId Group ID
AllocKeyFieldIsInitial AllocKeyFieldIsInitial
AllocKeyFieldIsAllValues AllocKeyFieldIsAllValues
ValidityEndDate _Cycle AllocationCycleEndDate Valid To
AllocationActualPlanVariant _Cycle AllocationActualPlanVariant Actual/Plan
AllocationPostingType _Cycle AllocationPostingType Posting Type
GrantAllocationRole
GrantAllocationGroup
_Cycle _Cycle
_Segment _Segment
_AllocationPostingTypeText _AllocationPostingTypeText
_AllocationReceiverRuleText _AllocationReceiverRuleText
GrantID Sender Grant
KEY AllocationType AllocationType Table
KEY AllocationCycle AllocationCycle Cycle
KEY ValidityStartDate AllocationCycleStartDate Valid From
KEY AllocationCycleSegment AllocationCycleSegment Segment Number
KEY AllocationSetType AllocationSetType Type of Set
KEY AllocDocumentSequenceNumber AllocDocumentSequenceNumber Table position
AllocationCycleName _Cycle AllocationCycleName Allocation Cycle
AllocationCycleNameText
Ledger _Cycle Ledger Ledger
AllocationLastExecutedByUser _Cycle AllocationLastExecutedByUser
LastChangedByUser _Cycle LastChangedByUser User Name
AllocationLastExecutedDate _Cycle AllocationLastExecutedDate
SegmentName _Segment SegmentName Segment Name
SegmentNameText
AllocationSegmentIsLocked
AllocationFieldGroup _Segment AllocationFieldGroup Var. Portion Type
AllocationFieldName AllocationFieldName Field
AllocationSetName AllocationSetName Set Name
AllocationFieldMinimumValue AllocationFieldMinimumValue From Value
AllocationFieldMaximumValue AllocationFieldMaximumValue To Value
AllocationSetId AllocationSetId Group ID
AllocKeyFieldIsInitial AllocKeyFieldIsInitial
AllocKeyFieldIsAllValues AllocKeyFieldIsAllValues
ValidityEndDate _Cycle AllocationCycleEndDate Valid To
AllocationActualPlanVariant _Cycle AllocationActualPlanVariant Actual/Plan
AllocationPostingType _Cycle AllocationPostingType Posting Type
GrantAllocationRole
GrantAllocationGroup
_Cycle _Cycle
_Segment _Segment
_AllocationPostingTypeText _AllocationPostingTypeText
_AllocationReceiverRuleText _AllocationReceiverRuleText
_AllocationSenderRuleText _AllocationSenderRuleText

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_GrantCostAllocSgmt.
-- 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.

CREATE VIEW I_GrantCostAllocSgmt AS
SELECT
  _Grant.GrantID AS GrantID,
  AllocationType,
  AllocationCycle,
  AllocationCycleStartDate AS ValidityStartDate,
  AllocationCycleSegment,
  AllocationSetType,
  AllocDocumentSequenceNumber,
  _Cycle.AllocationCycleName AS AllocationCycleName,
  _Cycle._Text[1: LanguageCode = $session.system_language ].AllocationCycleNameText AS AllocationCycleNameText,
  _Cycle.Ledger AS Ledger,
  _Cycle.AllocationLastExecutedByUser AS AllocationLastExecutedByUser,
  _Cycle.LastChangedByUser AS LastChangedByUser,
  _Cycle.AllocationLastExecutedDate AS AllocationLastExecutedDate,
  _Segment.SegmentName AS SegmentName,
  _Segment._Text[1: LanguageCode = $session.system_language ].AllocationCycleNameText AS SegmentNameText,
  cast (_Segment.AllocationSegmentIsLocked as sgmtislocked preserving type) AS AllocationSegmentIsLocked,
  _Segment.AllocationFieldGroup AS AllocationFieldGroup,
  AllocationFieldName,
  AllocationSetName,
  AllocationFieldMinimumValue,
  AllocationFieldMaximumValue,
  AllocationSetId,
  AllocKeyFieldIsInitial,
  AllocKeyFieldIsAllValues,
  _Cycle.AllocationCycleEndDate AS ValidityEndDate,
  _Cycle.AllocationActualPlanVariant AS AllocationActualPlanVariant,
  _Cycle.AllocationPostingType AS AllocationPostingType,
  cast( '' as psm_s4c_fm_fund_wu_cas_role ) AS GrantAllocationRole,
  cast( '' as psm_s4c_fm_fund_wu_cas_group ) AS GrantAllocationGroup
FROM I_AllocationKeyField
LEFT OUTER JOIN I_Grant AS _Grant ON _Grant.GrantID = AllocationFieldMinimumValue OR ( _Grant.GrantID between AllocationFieldMinimumValue AND AllocationFieldMaximumValue )  -- association [0..*]
LEFT OUTER JOIN I_AllocationPostingTypeText AS _AllocationPostingTypeText ON _AllocationPostingTypeText.AllocationPostingType = allocationpostingtype AND _AllocationPostingTypeText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_AllocationReceiverRuleText AS _AllocationReceiverRuleText ON _AllocationReceiverRuleText.AllocationReceiverRule = AllocationReceiverRule AND _AllocationReceiverRuleText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_AllocationSenderRuleText AS _AllocationSenderRuleText ON _AllocationSenderRuleText.AllocationSenderRule = AllocationSenderRule AND _AllocationSenderRuleText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_GrantGlobAcctgHier AS _GrantGAH ON AllocationSetId = _GrantGAH.AllocationSetId  -- association [1..*]
-- UNION with additional select branch(es): I_AllocationKeyField
;