P_CostRevenueReassignment
Cost Revenue Reassignment - private view
P_CostRevenueReassignment is a Composite CDS View that provides data about "Cost Revenue Reassignment - private view" in SAP S/4HANA. It reads from 1 data source (I_AccountAssignmentType) and exposes 26 fields with key fields FiscalYear, ReferenceDocument, ControllingArea, LedgerGLLineItem. Part of development package ODATA_REASSIGN_COSTS_REVENUES.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_AccountAssignmentType | _AccountAssignmentType | inner |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PCOSREVREASSGMT | 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 (26)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | FiscalYear | FiscalYear | ||
| KEY | ReferenceDocument | ReferenceDocument | ||
| KEY | ControllingArea | ControllingArea | ||
| KEY | LedgerGLLineItem | LedgerGLLineItem | ||
| CompanyCode | _Header | CompanyCode | ||
| CompanyCodeName | ||||
| SenderCompanyCode | ||||
| AccountingDocument | _Header | 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 | ||||
| ControllingBusTransacType | ControllingBusTransacType | |||
| IsSettled | _Header | IsSettled | ||
| _ReferenceDocumentType | _ReferenceDocumentType |
@AbapCatalog.sqlViewName: 'PCOSREVREASSGMT'
@AbapCatalog.preserveKey:true
@AbapCatalog.compiler.compareFilter:true
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.private: true
//@EndUserText.label: 'Cost Revenue Reassignment - private view'
define view P_CostRevenueReassignment
as select distinct from I_GLAccountLineItemRawData as _Header
inner join I_AccountAssignmentType as _AccountAssignmentType
on _AccountAssignmentType.AccountAssignmentType = _Header.AccountAssignmentType
{
key FiscalYear,
key ReferenceDocument,
key ControllingArea,
key LedgerGLLineItem,
_Header.CompanyCode,
_Header._CompanyCode.CompanyCodeName as CompanyCodeName,
cast(_Header.PartnerCompanyCode as sendercompanycode) as SenderCompanyCode,
_Header.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,
cast(
case _Header.IsReversal
when '' then ''
else _Header.ReversalReferenceDocument
end as reversedreferencedocument preserving type ) as ReversedReferenceDocument,
cast(
case IsReversal
when '' then '1'
else '2'
end as fco_posting_type) as AllocationPostingType,
@Semantics.currencyCode:true
GlobalCurrency,
@Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
cast(AmountInGlobalCurrency as fis_ksl) as AmountInGlobalCurrency,
ControllingBusTransacType,
_Header.IsSettled,
_ReferenceDocumentType
}
where
(
( ControllingBusTransacType = 'KAMV' and BusinessTransactionCategory = 'KAMV' )
or ( ControllingBusTransacType = 'RKU1' and BusinessTransactionCategory = 'RKU1' )
or ( ControllingBusTransacType = 'RKU2' and BusinessTransactionCategory = 'RKU2' )
)
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 = '' )
and _Header.IsSettlement = ''
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