P_RepFinData_RT_Aggr_02
P_RepFinData_RT_Aggr_02 is a Composite CDS View in SAP S/4HANA. It reads from 8 data sources and exposes 65 fields.
Data Sources (8)
| Source | Alias | Join Type |
|---|---|---|
| I_SAPClient | _SAPClient | inner |
| I_CnsldtnVersion | I_CnsldtnVersion | inner |
| I_CompanyCode | I_CompanyCode | inner |
| I_FiscalCalendarDate | I_FiscalCalendarDate | inner |
| P_RepFinData_RT_Aggr_01 | P_RepFinData_RT_Aggr_01 | from |
| t881 | t881 | inner |
| tf165 | tf165 | inner |
| tfin010 | tfin010 | inner |
Parameters (2)
| Name | Type | Default |
|---|---|---|
| P_CreationDateTimeRgFr | timestamp | |
| P_CreationDateTimeRgTo | timestamp |
Annotations (12)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.sqlViewName | PRFDRTAG_02 | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.private | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (65)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| gcurrendasGroupCurrency | ||||
| ConsolidationDimension | tfin010 | dimen | ||
| ConsolidationUnit | tfin010 | bunit | ||
| ReferenceChartOfAccounts | I_CompanyCode | ChartOfAccounts | ||
| ConsolidationVersion | I_CnsldtnVersion | ConsolidationVersion | ||
| FSItemMappingVersion | I_CnsldtnVersion | FSItemMappingVersion | ||
| CnsldtnUnitGroupCrcySource | tf168 | curr_group_send | ||
| ConsolidationLedger | t881 | rldnr | ||
| FiscalPeriod | I_FiscalCalendarDate | FiscalPeriod | ||
| FiscalYear | I_FiscalCalendarDate | FiscalYear | ||
| FiscalYearPeriod | I_FiscalCalendarDate | FiscalYearPeriod | ||
| BalanceTransactionCurrency | Source | BalanceTransactionCurrency | ||
| BaseUnit | Source | BaseUnit | ||
| FinancialTransactionType | Source | FinancialTransactionType | ||
| FunctionalArea | Source | FunctionalArea | ||
| BusinessArea | Source | BusinessArea | ||
| CostCenter | Source | CostCenter | ||
| GLAccount | Source | GLAccount | ||
| ProfitCenter | Source | ProfitCenter | ||
| AmountInTransactionCurrency | AmountInTransactionCurrency | |||
| AmountInLocalCurrency | AmountInLocalCurrency | |||
| AmountInGroupCurrency | AmountInGroupCurrency | |||
| QuantityInBaseUnit | QuantityInBaseUnit | |||
| osl | Source | osl | ||
| vsl | Source | vsl | ||
| bsl | Source | bsl | ||
| csl | Source | csl | ||
| dsl | Source | dsl | ||
| esl | Source | esl | ||
| fsl | Source | fsl | ||
| gsl | Source | gsl | ||
| Segment | Source | Segment | ||
| PartnerCompany | Source | PartnerCompany | ||
| CompanyCode | Source | CompanyCode | ||
| ChartOfAccounts | Source | ChartOfAccounts | ||
| AssignmentReference | Source | AssignmentReference | ||
| ControllingArea | Source | ControllingArea | ||
| PartnerCostCenter | Source | PartnerCostCenter | ||
| PartnerProfitCenter | Source | PartnerProfitCenter | ||
| PartnerFunctionalArea | Source | PartnerFunctionalArea | ||
| PartnerBusinessArea | Source | PartnerBusinessArea | ||
| PartnerSegment | Source | PartnerSegment | ||
| OrderID | Source | OrderID | ||
| Customer | Source | Customer | ||
| Supplier | Source | Supplier | ||
| Material | Source | Material | ||
| MaterialGroup | Source | MaterialGroup | ||
| Plant | Source | Plant | ||
| WBSElementExternalID | Source | WBSElementExternalID | ||
| Project | Source | Project | ||
| BillingDocumentType | Source | BillingDocumentType | ||
| SalesOrganization | Source | SalesOrganization | ||
| DistributionChannel | Source | DistributionChannel | ||
| OrganizationDivision | Source | OrganizationDivision | ||
| SoldProduct | Source | SoldProduct | ||
| SoldProductGroup | Source | SoldProductGroup | ||
| CustomerGroup | Source | CustomerGroup | ||
| CustomerSupplierCountry | Source | CustomerSupplierCountry | ||
| CustomerSupplierIndustry | Source | CustomerSupplierIndustry | ||
| SalesDistrict | Source | SalesDistrict | ||
| BillToParty | Source | BillToParty | ||
| ShipToParty | Source | ShipToParty | ||
| CustomerSupplierCorporateGroup | Source | CustomerSupplierCorporateGroup | ||
| WBSElementInternalID | Source | WBSElementInternalID | ||
| CreationDateTime | Source | CreationDateTime |
@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName: 'PRFDRTAG_02'
@AbapCatalog.compiler.compareFilter: true
@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private:true
@ClientHandling.algorithm: #SESSION_VARIABLE
//@AccessControl.authorizationCheck: #NOT_ALLOWED
@ObjectModel.usageType.serviceQuality: #X
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.sizeCategory: #XL
@AccessControl.personalData.blocking: #NOT_REQUIRED
@Metadata.ignorePropagatedAnnotations: true
// Aggregate over timestamp and posting date
define view P_RepFinData_RT_Aggr_02
with parameters
P_CreationDateTimeRgFr :timestamp,
P_CreationDateTimeRgTo :timestamp
as select from P_RepFinData_RT_Aggr_01
(P_CreationDateTimeRgFr : :P_CreationDateTimeRgFr,
P_CreationDateTimeRgTo : :P_CreationDateTimeRgTo) as Source //acdoca
// Find all relevant dimen, vers, rldnr.
// For one line in acdocp this may result in several lines.
inner join I_CompanyCode on Source.CompanyCode = I_CompanyCode.CompanyCode
inner join tfin010 on tfin010.rcomp = I_CompanyCode.Company
and tfin010.contp = '1'
inner join tf165 on tfin010.dimen = tf165.dimen
and tfin010.bunit = tf165.bunit
and tf165.trans = 'H'
inner join I_SAPClient as _SAPClient on _SAPClient.sapclient = $session.client
// begin of bbrCC1911
// ledger dependent customizing for cons. units is optional,
// cons. units are relevant for all cons. ledgers
inner join t881 on Source.Ledger = t881.orient_ledger
and t881.appl = 'EC'
and t881.subappl = 'CS'
// end of bbrCC1911
left outer to one join tf168 on tfin010.dimen = tf168.dimen
and t881.rldnr = tf168.rldnr //bbrCC1911
and tfin010.bunit = tf168.bunit
inner join I_CnsldtnVersion on tf165.rvers = I_CnsldtnVersion.ConsolidationDataEntryVersion
and I_CnsldtnVersion.CnsldtnIsPlanVersion = ''
inner join I_FiscalCalendarDate on(
tf168.periv = I_FiscalCalendarDate.FiscalYearVariant
and Source.PostingDate = I_FiscalCalendarDate.CalendarDate
and tf168.periv <> ''
and tf168.periv is not null
)
or(
I_CnsldtnVersion.FiscalYearVariant = I_FiscalCalendarDate.FiscalYearVariant
and Source.PostingDate = I_FiscalCalendarDate.CalendarDate
and(
tf168.periv = ''
or tf168.periv is null
)
and I_CnsldtnVersion.FiscalYearVariant <> ''
)
or(
I_FiscalCalendarDate.FiscalYearVariant = 'K4'
and Source.PostingDate = I_FiscalCalendarDate.CalendarDate
and(
tf168.periv = ''
or tf168.periv is null
)
and I_CnsldtnVersion.FiscalYearVariant = ''
)
// end of bbrCC1911
{
// GroupCurrency
case
// ledger currency is irrelevant
when t881.curt2 = '30'
then _SAPClient.GroupCurrency
// ledger currency
else t881.gcurr // use even if initial
end as GroupCurrency,
tfin010.dimen as ConsolidationDimension,
tfin010.bunit as ConsolidationUnit,
I_CompanyCode.ChartOfAccounts as ReferenceChartOfAccounts,
I_CnsldtnVersion.ConsolidationVersion,
I_CnsldtnVersion.FSItemMappingVersion,
tf168.curr_group_send as CnsldtnUnitGroupCrcySource,
t881.rldnr as ConsolidationLedger,
I_FiscalCalendarDate.FiscalPeriod,
I_FiscalCalendarDate.FiscalYear,
I_FiscalCalendarDate.FiscalYearPeriod,
// mandatory standard fields
/*Source.PartnerCompany,*/
Source.BalanceTransactionCurrency,
Source.BaseUnit,
Source.FinancialTransactionType,
Source.FunctionalArea,
Source.BusinessArea,
Source.CostCenter,
Source.GLAccount,
Source.ProfitCenter,
AmountInTransactionCurrency,
AmountInLocalCurrency,
AmountInGroupCurrency,
QuantityInBaseUnit,
Source.osl,
Source.vsl,
Source.bsl,
Source.csl,
Source.dsl,
Source.esl,
Source.fsl,
Source.gsl,
Source.Segment,
// additional fields
Source.PartnerCompany,
Source.CompanyCode,
Source.ChartOfAccounts,
Source.AssignmentReference,
Source.ControllingArea,
Source.PartnerCostCenter,
Source.PartnerProfitCenter,
Source.PartnerFunctionalArea,
Source.PartnerBusinessArea,
Source.PartnerSegment,
Source.OrderID,
Source.Customer,
Source.Supplier,
Source.Material,
Source.MaterialGroup,
Source.Plant,
Source.WBSElementExternalID,
Source.Project,
Source.BillingDocumentType,
Source.SalesOrganization,
Source.DistributionChannel,
Source.OrganizationDivision,
Source.SoldProduct,
Source.SoldProductGroup,
Source.CustomerGroup,
Source.CustomerSupplierCountry,
Source.CustomerSupplierIndustry,
Source.SalesDistrict,
Source.BillToParty,
Source.ShipToParty,
Source.CustomerSupplierCorporateGroup,
Source.WBSElementInternalID,
Source.CreationDateTime
// specific fileds for this cds view
/*Source.Ledger,*/
/*Source.PostingDate,*/
/*Source.FiscalYearPeriod,*/
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CNSLDTNVERSION",
"I_COMPANYCODE",
"I_FISCALCALENDARDATE",
"I_SAPCLIENT",
"P_REPFINDATA_RT_AGGR_01",
"T881",
"TF165",
"TF168",
"TFIN010"
],
"ASSOCIATED":
[],
"BASE":
[],
"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