P_RepFinData_RT_AggrNRL_01

DDL: P_REPFINDATA_RT_AGGRNRL_01 SQL: PRFDRTAGNRL_01 Type: view COMPOSITE Package: FIN_CS_RELEASE_UNIVERSAL_JRNL

Aggregated select from ACDOCA

P_RepFinData_RT_AggrNRL_01 is a Composite CDS View that provides data about "Aggregated select from ACDOCA" in SAP S/4HANA. It reads from 1 data source (I_JournalEntryItem) and exposes 68 fields. Part of development package FIN_CS_RELEASE_UNIVERSAL_JRNL.

Data Sources (1)

SourceAliasJoin Type
I_JournalEntryItem Source from

Parameters (2)

NameTypeDefault
P_CreationDateTimeRgFr timestamp
P_CreationDateTimeRgTo timestamp

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PRFDRTAGNRL_01 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 (68)

KeyFieldSource TableSource FieldDescription
PartnerCompany I_JournalEntryItem PartnerCompany
BalanceTransactionCurrency I_JournalEntryItem BalanceTransactionCurrency
BaseUnit I_JournalEntryItem BaseUnit
FinancialTransactionType I_JournalEntryItem FinancialTransactionType
FunctionalArea I_JournalEntryItem FunctionalArea
BusinessArea I_JournalEntryItem BusinessArea
CostCenter I_JournalEntryItem CostCenter
GLAccount I_JournalEntryItem GLAccount
ProfitCenter I_JournalEntryItem ProfitCenter
AmountInTransactionCurrency
AmountInLocalCurrency
AmountInGroupCurrency
QuantityInBaseUnit
osl
vsl
bsl
csl
dsl
esl
fsl
gsl
Segment I_JournalEntryItem Segment
CompanyCode I_JournalEntryItem CompanyCode
ChartOfAccounts I_JournalEntryItem ChartOfAccounts
AssignmentReference I_JournalEntryItem AssignmentReference
ControllingArea I_JournalEntryItem ControllingArea
PartnerCostCenter I_JournalEntryItem PartnerCostCenter
PartnerProfitCenter I_JournalEntryItem PartnerProfitCenter
PartnerFunctionalArea I_JournalEntryItem PartnerFunctionalArea
PartnerBusinessArea I_JournalEntryItem PartnerBusinessArea
PartnerSegment I_JournalEntryItem PartnerSegment
OrderID I_JournalEntryItem OrderID
Customer I_JournalEntryItem Customer
Supplier I_JournalEntryItem Supplier
Material I_JournalEntryItem Material
MaterialGroup I_JournalEntryItem MaterialGroup
ProductGroup I_JournalEntryItem ProductGroup
Plant I_JournalEntryItem Plant
WBSElementExternalID I_JournalEntryItem WBSElement
Project I_JournalEntryItem Project
BillingDocumentType I_JournalEntryItem BillingDocumentType
SalesOrganization I_JournalEntryItem SalesOrganization
DistributionChannel I_JournalEntryItem DistributionChannel
OrganizationDivision I_JournalEntryItem OrganizationDivision
SoldProduct I_JournalEntryItem SoldProduct
SoldProductGroup I_JournalEntryItem SoldProductGroup
CustomerGroup I_JournalEntryItem CustomerGroup
CustomerSupplierCountry I_JournalEntryItem CustomerSupplierCountry
CustomerSupplierIndustry I_JournalEntryItem CustomerSupplierIndustry
SalesDistrict I_JournalEntryItem SalesDistrict
BillToParty I_JournalEntryItem BillToParty
ShipToParty I_JournalEntryItem ShipToParty
CustomerSupplierCorporateGroup I_JournalEntryItem CustomerSupplierCorporateGroup
WBSElementInternalID I_JournalEntryItem WBSElementInternalID
CreationDateTime
FinancialServicesProductGroup I_JournalEntryItem FinancialServicesProductGroup
FinancialServicesBranch I_JournalEntryItem FinancialServicesBranch
FinancialDataSource I_JournalEntryItem FinancialDataSource
FinancialManagementArea I_JournalEntryItem FinancialManagementArea
GrantID I_JournalEntryItem GrantID
Fund I_JournalEntryItem Fund
PartnerFund I_JournalEntryItem PartnerFund
CashLedgerAccount I_JournalEntryItem CashLedgerAccount
CashLedgerCompanyCode I_JournalEntryItem CashLedgerCompanyCode
Ledger I_JournalEntryItem Ledger
SourceLedger I_JournalEntryItem SourceLedger
PostingDate I_JournalEntryItem PostingDate
FiscalYearPeriod I_JournalEntryItem FiscalYearPeriod
@AbapCatalog.sqlViewName: 'PRFDRTAGNRL_01'
@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
//@EndUserText.label: 'New Report Logic For P_REPFINDATA_RT_AGGR_01'


define view P_RepFinData_RT_AggrNRL_01
  with parameters
    P_CreationDateTimeRgFr :timestamp,
    P_CreationDateTimeRgTo :timestamp

  as select from I_JournalEntryItem as Source //acdoca


  //  Aggregate over line item fields like username, timestamp, etc.


{

  // mandatory standard fields

  Source.PartnerCompany,
  Source.BalanceTransactionCurrency,
  Source.BaseUnit,
  Source.FinancialTransactionType,
  Source.FunctionalArea,
  Source.BusinessArea,
  Source.CostCenter,
  Source.GLAccount,
  Source.ProfitCenter,
  sum(Source.AmountInBalanceTransacCrcy)                  as AmountInTransactionCurrency,
  sum(Source.AmountInCompanyCodeCurrency)                 as AmountInLocalCurrency,
  sum(Source.AmountInGlobalCurrency)                      as AmountInGroupCurrency,
  cast(sum(Source.Quantity) as quan1_12 preserving type ) as QuantityInBaseUnit,
  sum(Source.AmountInFreeDefinedCurrency1)                as osl,
  sum(Source.AmountInFreeDefinedCurrency2)                as vsl,
  sum(Source.AmountInFreeDefinedCurrency3)                as bsl,
  sum(Source.AmountInFreeDefinedCurrency4)                as csl,
  sum(Source.AmountInFreeDefinedCurrency5)                as dsl,
  sum(Source.AmountInFreeDefinedCurrency6)                as esl,
  sum(Source.AmountInFreeDefinedCurrency7)                as fsl,
  sum(Source.AmountInFreeDefinedCurrency8)                as gsl,
  Source.Segment,

  // additional fields

  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.ProductGroup,
  Source.Plant,
  Source.WBSElement                                       as 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,
  cast(0 as timestamp)                                    as CreationDateTime,

  // financial services (industry specific)

  Source.FinancialServicesProductGroup,
  Source.FinancialServicesBranch,
  Source.FinancialDataSource,

  // public sector (industry specific)

  Source.FinancialManagementArea,
  Source.GrantID,
  Source.Fund,
  Source.PartnerFund,
  Source.CashLedgerAccount,
  Source.CashLedgerCompanyCode,

  // specific fileds for this cds view

  Source.Ledger,
  Source.SourceLedger,
  Source.PostingDate,
  Source.FiscalYearPeriod

}

where
  (
       Source.AccountingDocumentCategory =       ''  //normal documents

    or Source.AccountingDocumentCategory =       'U' //documents without lines in BSEG

    or Source.AccountingDocumentCategory =       'L' //postings not in leading ledger, relevant in case an orientation ledger is used

    or Source.AccountingDocumentCategory =       'P' //predicted documents, posted in a separate extension ledger

    or Source.AccountingDocumentCategory =       'C' //balance Carryforward and Balance Adjustments from Migration

  )

  //  Balance carry forward is done differently in consolidation (e.g. shifted fiscal year)

  //  and must not be taken over from FI

  and  Source.FiscalPeriod               <>      '000'

  // Year End Closing postings are not relevant for consolidation

  and  Source.ReferenceDocumentType      <>      'GLYEC'

  and  Source.CreationDateTime           between :P_CreationDateTimeRgFr and :P_CreationDateTimeRgTo

group by
// mandatory standard fields

  Source.PartnerCompany,
  Source.BalanceTransactionCurrency,
  Source.BaseUnit,
  Source.FinancialTransactionType,
  Source.FunctionalArea,
  Source.BusinessArea,
  Source.CostCenter,
  Source.GLAccount,
  Source.ProfitCenter,
  Source.Segment,

  // additional fields

  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.ProductGroup,
  Source.Plant,
  Source.WBSElement,
  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,

  // financial services (industry specific)

  Source.FinancialServicesProductGroup,
  Source.FinancialServicesBranch,
  Source.FinancialDataSource,

  // public sector (industry specific)

  Source.FinancialManagementArea,
  Source.GrantID,
  Source.Fund,
  Source.PartnerFund,
  Source.CashLedgerAccount,
  Source.CashLedgerCompanyCode,

  // specific fileds for this cds view

  Source.Ledger,
  Source.SourceLedger,
  Source.PostingDate,
  Source.FiscalYearPeriod