P_DirectActivityAllocation
P_DirectActivityAllocation is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_AccountAssignmentType, I_GLAccountLineItemRawData) and exposes 27 fields with key fields FiscalYear, ReferenceDocument, ControllingArea, LedgerGLLineItem.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_AccountAssignmentType | _AAT | inner |
| I_GLAccountLineItemRawData | _Header | from |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PDRCTACTY | view | |
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.private | true | view |
Fields (27)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | FiscalYear | FiscalYear | ||
| KEY | ReferenceDocument | ReferenceDocument | ||
| KEY | ControllingArea | ControllingArea | ||
| KEY | LedgerGLLineItem | LedgerGLLineItem | ||
| CompanyCode | ||||
| SenderCompanyCode | ||||
| AccountingDocument | ||||
| AccountingDocumentHeaderText | ||||
| DocumentDate | DocumentDate | |||
| PostingDate | PostingDate | |||
| FiscalPeriod | ||||
| AccountingDocumentCreationDate | ||||
| AccountingDocCreatedByUser | ||||
| IsReversal | IsReversal | |||
| IsReversed | IsReversed | |||
| ReferenceDocumentType | ReferenceDocumentType | |||
| ReferenceDocumentContext | ReferenceDocumentContext | |||
| ExchangeRateDate | ||||
| PredecessorReferenceDocument | PredecessorReferenceDocument | |||
| ReversalReferenceDocument | ReversalReferenceDocument | |||
| GlobalCurrency | GlobalCurrency | |||
| AmountInGlobalCurrency | AmountInGlobalCurrency | |||
| IsSettlement | IsSettlement | |||
| IsSettled | IsSettled | |||
| ControllingBusTransacType | ControllingBusTransacType | |||
| AccountingDocumentType | I_GLAccountLineItemRawData | AccountingDocumentType | ||
| _ReferenceDocumentType | _ReferenceDocumentType |
@AbapCatalog.sqlViewName: 'PDRCTACTY'
@AbapCatalog.preserveKey:true
@AbapCatalog.compiler.compareFilter:true
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.private: true
//@EndUserText.label: 'Direct Activity Allocation Header - private view'
define view P_DirectActivityAllocation
as select from I_GLAccountLineItemRawData as _Header
inner join I_AccountAssignmentType as _AAT
on _AAT.AccountAssignmentType = _Header.AccountAssignmentType
{
key FiscalYear,
key ReferenceDocument,
key ControllingArea,
key LedgerGLLineItem,
cast(_Header.CompanyCode as fis_bukrs) as CompanyCode,
cast(_Header.PartnerCompanyCode as sendercompanycode) as SenderCompanyCode,
cast(_Header.AccountingDocument as fis_belnr) as AccountingDocument,
_Header._JournalEntry.AccountingDocumentHeaderText,
DocumentDate,
PostingDate,
_Header._JournalEntry.FiscalPeriod,
_Header._JournalEntry.AccountingDocumentCreationDate,
cast(AccountingDocCreatedByUser as fco_cc_createdby) as AccountingDocCreatedByUser,
IsReversal,
IsReversed,
ReferenceDocumentType,
ReferenceDocumentContext,
cast(_Header._JournalEntry.ExchangeRateDate as fin_currconvdat) as ExchangeRateDate,
PredecessorReferenceDocument,
ReversalReferenceDocument,
@Semantics.currencyCode:true
GlobalCurrency,
@DefaultAggregation: #SUM
@Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
AmountInGlobalCurrency,
IsSettlement,
IsSettled,
ControllingBusTransacType,
_Header.AccountingDocumentType,
_ReferenceDocumentType
}
where
( //RKL - Leistungsverrechnung; RKLU - Umbuchung Leist.verr.
ControllingBusTransacType = 'RKL'
and ( BusinessTransactionCategory = 'RKL' or BusinessTransactionCategory = 'RKLU' )
)
and
ReferenceDocumentType = 'COBK'
and
OriginCtrlgDebitCreditCode = 'S'
and
_Ledger.IsLeadingLedger = 'X'
and _Header.LogicalSystem = ''
and _Header._JournalEntry.SenderLogicalSystem = ''
and (_Header.SourceLedger = _Header._JournalEntry.LedgerGroup or _Header._JournalEntry.LedgerGroup = '' )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ACCOUNTASSIGNMENTTYPE",
"I_GLACCOUNTLINEITEMRAWDATA",
"I_JOURNALENTRY",
"I_LEDGER"
],
"ASSOCIATED":
[
"I_REFERENCEDOCUMENTTYPE"
],
"BASE":
[
"I_GLACCOUNTLINEITEMRAWDATA"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- 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