I_GrantCostAllocSgmt
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)
| Source | Alias | Join Type |
|---|---|---|
| I_AllocationKeyField | I_AllocationKeyField | from |
| I_AllocationKeyField | I_AllocationKeyField | union |
Associations (5)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [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)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA