P_RO_SAFTAnalysisTypeItem

DDL: P_RO_SAFTANALYSISTYPEITEM SQL: PROSAFTANLTYPIT Type: view CONSUMPTION

P_RO_SAFTAnalysisTypeItem is a Consumption CDS View in SAP S/4HANA. It reads from 10 data sources and exposes 66 fields with key fields SourceLedger, Ledger, CompanyCode, FiscalYear, AccountingDocument.

Data Sources (10)

SourceAliasJoin Type
I_StRpJournalEntryHeaderLog Log inner
I_StRpJournalEntryHeaderLog Log inner
I_StRpJournalEntryHeaderLog Log inner
I_StRpJournalEntryHeaderLog Log inner
I_StRpJournalEntryHeaderLog Log inner
P_RO_SAFTJournalEntryItemExc P_RO_SAFTJournalEntryItemExc from
P_RO_SAFTJournalEntryItemExc P_RO_SAFTJournalEntryItemExc union_all
P_RO_SAFTJournalEntryItemExc P_RO_SAFTJournalEntryItemExc union_all
P_RO_SAFTJournalEntryItemExc P_RO_SAFTJournalEntryItemExc union_all
P_RO_SAFTJournalEntryItemExc P_RO_SAFTJournalEntryItemExc union_all

Parameters (2)

NameTypeDefault
P_AlternativeGLAccountIsUsed saft_ro_alt_gl_account_flag
P_FromPostingDate dats

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PROSAFTANLTYPIT view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
VDM.viewType #CONSUMPTION view
VDM.private true view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.personalData.blocking #NOT_REQUIRED view
AccessControl.authorizationCheck #NOT_REQUIRED view

Fields (66)

KeyFieldSource TableSource FieldDescription
KEY SourceLedger JournalEntry SourceLedger
KEY Ledger JournalEntry Ledger
KEY CompanyCode JournalEntry CompanyCode
KEY FiscalYear JournalEntry FiscalYear
KEY AccountingDocument JournalEntry AccountingDocument
KEY LedgerGLLineItem JournalEntry LedgerGLLineItem
KEY StatryRptCategory I_StRpJournalEntryHeaderLog StatryRptCategory
KEY StatryRptgEntity I_StRpJournalEntryHeaderLog StatryRptgEntity
KEY StatryRptRunID I_StRpJournalEntryHeaderLog StatryRptRunID
KEY AccountingDocumentType JournalEntry AccountingDocumentType
KEY PostingDate JournalEntry PostingDate
KEY RO_SAFTAnalysisType
RO_SAFTAnalysisEntry
SourceLedger
KEY Ledger JournalEntry Ledger
KEY CompanyCode JournalEntry CompanyCode
KEY FiscalYear JournalEntry FiscalYear
KEY AccountingDocument JournalEntry AccountingDocument
KEY LedgerGLLineItem JournalEntry LedgerGLLineItem
KEY StatryRptCategory I_StRpJournalEntryHeaderLog StatryRptCategory
KEY StatryRptgEntity I_StRpJournalEntryHeaderLog StatryRptgEntity
KEY StatryRptRunID I_StRpJournalEntryHeaderLog StatryRptRunID
KEY AccountingDocumentType JournalEntry AccountingDocumentType
KEY PostingDate JournalEntry PostingDate
KEY RO_SAFTAnalysisType
RO_SAFTAnalysisEntry JournalEntry CostCenter
SourceLedger
KEY Ledger JournalEntry Ledger
KEY CompanyCode JournalEntry CompanyCode
KEY FiscalYear JournalEntry FiscalYear
KEY AccountingDocument JournalEntry AccountingDocument
KEY LedgerGLLineItem JournalEntry LedgerGLLineItem
KEY StatryRptCategory I_StRpJournalEntryHeaderLog StatryRptCategory
KEY StatryRptgEntity I_StRpJournalEntryHeaderLog StatryRptgEntity
KEY StatryRptRunID I_StRpJournalEntryHeaderLog StatryRptRunID
KEY AccountingDocumentType JournalEntry AccountingDocumentType
KEY PostingDate JournalEntry PostingDate
KEY RO_SAFTAnalysisType
RO_SAFTAnalysisEntry JournalEntry Segment
SourceLedger
KEY Ledger JournalEntry Ledger
KEY CompanyCode JournalEntry CompanyCode
KEY FiscalYear JournalEntry FiscalYear
KEY AccountingDocument JournalEntry AccountingDocument
KEY LedgerGLLineItem JournalEntry LedgerGLLineItem
KEY StatryRptCategory I_StRpJournalEntryHeaderLog StatryRptCategory
KEY StatryRptgEntity I_StRpJournalEntryHeaderLog StatryRptgEntity
KEY StatryRptRunID I_StRpJournalEntryHeaderLog StatryRptRunID
KEY AccountingDocumentType JournalEntry AccountingDocumentType
KEY PostingDate JournalEntry PostingDate
KEY RO_SAFTAnalysisType
RO_SAFTAnalysisEntry JournalEntry WBSElement
SourceLedger
KEY Ledger JournalEntry Ledger
KEY CompanyCode JournalEntry CompanyCode
KEY FiscalYear JournalEntry FiscalYear
KEY AccountingDocument JournalEntry AccountingDocument
KEY LedgerGLLineItem JournalEntry LedgerGLLineItem
KEY StatryRptCategory I_StRpJournalEntryHeaderLog StatryRptCategory
KEY StatryRptgEntity I_StRpJournalEntryHeaderLog StatryRptgEntity
KEY StatryRptRunID I_StRpJournalEntryHeaderLog StatryRptRunID
KEY AccountingDocumentType JournalEntry AccountingDocumentType
KEY PostingDate JournalEntry PostingDate
KEY RO_SAFTAnalysisType
RO_SAFTAnalysisEntry JournalEntry OrderID
RO_SAFTAnalysisEntryDesc
@AbapCatalog.sqlViewName: 'PROSAFTANLTYPIT'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@VDM.viewType: #CONSUMPTION
@VDM.private:true
@ObjectModel.usageType.serviceQuality: #X
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.personalData.blocking: #NOT_REQUIRED
@AccessControl.authorizationCheck: #NOT_REQUIRED
define view P_RO_SAFTAnalysisTypeItem
with parameters
    P_AlternativeGLAccountIsUsed : saft_ro_alt_gl_account_flag,
    P_FromPostingDate            : dats
    
  // Profit Centers

  as select from P_RO_SAFTJournalEntryItemExc(P_AlternativeGLAccountIsUsed: $parameters.P_AlternativeGLAccountIsUsed)    as JournalEntry
    inner join   I_StRpJournalEntryHeaderLog as Log on  Log.AccountingDocument = JournalEntry.AccountingDocument
                                              and Log.CompanyCode        = JournalEntry.CompanyCode
                                              and Log.FiscalYear         = JournalEntry.FiscalYear
                                                       
                                              
{
  key JournalEntry.SourceLedger,
  key JournalEntry.Ledger,
  key JournalEntry.CompanyCode,
  key JournalEntry.FiscalYear,
  key JournalEntry.AccountingDocument,
  key JournalEntry.LedgerGLLineItem,
  key Log.StatryRptCategory,
  key Log.StatryRptgEntity,
  key Log.StatryRptRunID,
  key JournalEntry.AccountingDocumentType,
  key JournalEntry.PostingDate,
  key cast('PC' as /ceecv/roanaltype)                          as RO_SAFTAnalysisType,
      cast(JournalEntry.ProfitCenter as /ceecv/ro_analysis_id) as RO_SAFTAnalysisEntry,

      case JournalEntry._ProfitCenterTxt[1: Language = '4' and ValidityStartDate <= $parameters.P_FromPostingDate and ValidityEndDate >= $parameters.P_FromPostingDate].ProfitCenterLongName
        when '' then cast(JournalEntry._ProfitCenterTxt[1: Language = '4' and ValidityStartDate <= $parameters.P_FromPostingDate and ValidityEndDate >= $parameters.P_FromPostingDate].ProfitCenterName as /ceecv/roanals_type_desc)
        else cast(JournalEntry._ProfitCenterTxt[1: Language = '4' and ValidityStartDate <= $parameters.P_FromPostingDate and ValidityEndDate >= $parameters.P_FromPostingDate].ProfitCenterLongName as /ceecv/roanals_type_desc)
      end                                                      as RO_SAFTAnalysisEntryDesc
}
where
  JournalEntry.ProfitCenter is not initial

// Cost Centers

union all select from P_RO_SAFTJournalEntryItemExc(P_AlternativeGLAccountIsUsed: $parameters.P_AlternativeGLAccountIsUsed)    as JournalEntry
    inner join   I_StRpJournalEntryHeaderLog as Log on  Log.AccountingDocument = JournalEntry.AccountingDocument
                                              and Log.CompanyCode        = JournalEntry.CompanyCode
                                              and Log.FiscalYear         = JournalEntry.FiscalYear
{
  key JournalEntry.SourceLedger,
  key JournalEntry.Ledger,
  key JournalEntry.CompanyCode,
  key JournalEntry.FiscalYear,
  key JournalEntry.AccountingDocument,
  key JournalEntry.LedgerGLLineItem,
  key Log.StatryRptCategory,
  key Log.StatryRptgEntity,
  key Log.StatryRptRunID,
  key JournalEntry.AccountingDocumentType,
  key JournalEntry.PostingDate,
  key cast('CC' as /ceecv/roanaltype) as RO_SAFTAnalysisType,
      JournalEntry.CostCenter         as RO_SAFTAnalysisEntry,

      case JournalEntry._CostCenterTxt[1: Language = '4' and ValidityStartDate <= $parameters.P_FromPostingDate and ValidityEndDate >= $parameters.P_FromPostingDate].CostCenterDescription
        when '' then cast(JournalEntry._CostCenterTxt[1: Language = '4' and ValidityStartDate <= $parameters.P_FromPostingDate and ValidityEndDate >= $parameters.P_FromPostingDate].CostCenterName as /ceecv/roanals_type_desc)
        else cast(JournalEntry._CostCenterTxt[1: Language = '4' and ValidityStartDate <= $parameters.P_FromPostingDate and ValidityEndDate >= $parameters.P_FromPostingDate].CostCenterDescription as /ceecv/roanals_type_desc)
      end                             as RO_SAFTAnalysisEntryDesc
}
where
  JournalEntry.CostCenter is not initial

// Segments

union all select from P_RO_SAFTJournalEntryItemExc(P_AlternativeGLAccountIsUsed: $parameters.P_AlternativeGLAccountIsUsed)    as JournalEntry
    inner join   I_StRpJournalEntryHeaderLog as Log on  Log.AccountingDocument = JournalEntry.AccountingDocument
                                              and Log.CompanyCode        = JournalEntry.CompanyCode
                                              and Log.FiscalYear         = JournalEntry.FiscalYear
{
  key JournalEntry.SourceLedger,
  key JournalEntry.Ledger,
  key JournalEntry.CompanyCode,
  key JournalEntry.FiscalYear,
  key JournalEntry.AccountingDocument,
  key JournalEntry.LedgerGLLineItem,
  key Log.StatryRptCategory,
  key Log.StatryRptgEntity,
  key Log.StatryRptRunID,
  key JournalEntry.AccountingDocumentType,
  key JournalEntry.PostingDate,
  key cast('SEG' as /ceecv/roanaltype)                                                           as RO_SAFTAnalysisType,
      JournalEntry.Segment                                                                       as RO_SAFTAnalysisEntry,
      cast(JournalEntry._SegmentText[1: Language = '4'].SegmentName as /ceecv/roanals_type_desc) as RO_SAFTAnalysisEntryDesc
}
where
  JournalEntry.Segment is not initial

// WBS Elements

union all select from P_RO_SAFTJournalEntryItemExc(P_AlternativeGLAccountIsUsed: $parameters.P_AlternativeGLAccountIsUsed)    as JournalEntry
    inner join   I_StRpJournalEntryHeaderLog as Log on  Log.AccountingDocument = JournalEntry.AccountingDocument
                                              and Log.CompanyCode        = JournalEntry.CompanyCode
                                              and Log.FiscalYear         = JournalEntry.FiscalYear
{
  key JournalEntry.SourceLedger,
  key JournalEntry.Ledger,
  key JournalEntry.CompanyCode,
  key JournalEntry.FiscalYear,
  key JournalEntry.AccountingDocument,
  key JournalEntry.LedgerGLLineItem,
  key Log.StatryRptCategory,
  key Log.StatryRptgEntity,
  key Log.StatryRptRunID,
  key JournalEntry.AccountingDocumentType,
  key JournalEntry.PostingDate,
  key cast('WBS' as /ceecv/roanaltype)                                                       as RO_SAFTAnalysisType,
      JournalEntry.WBSElement                                                                as RO_SAFTAnalysisEntry,
      cast(JournalEntry._WBSElementBasicDataText.WBSDescription as /ceecv/roanals_type_desc) as RO_SAFTAnalysisEntryDesc
}
where
  JournalEntry.WBSElement is not initial

// Orders

union all select from P_RO_SAFTJournalEntryItemExc(P_AlternativeGLAccountIsUsed: $parameters.P_AlternativeGLAccountIsUsed)    as JournalEntry
    inner join   I_StRpJournalEntryHeaderLog as Log on  Log.AccountingDocument = JournalEntry.AccountingDocument
                                              and Log.CompanyCode        = JournalEntry.CompanyCode
                                              and Log.FiscalYear         = JournalEntry.FiscalYear
{
  key JournalEntry.SourceLedger,
  key JournalEntry.Ledger,
  key JournalEntry.CompanyCode,
  key JournalEntry.FiscalYear,
  key JournalEntry.AccountingDocument,
  key JournalEntry.LedgerGLLineItem,
  key Log.StatryRptCategory,
  key Log.StatryRptgEntity,
  key Log.StatryRptRunID,
  key JournalEntry.AccountingDocumentType,
  key JournalEntry.PostingDate,
  key cast('ORD' as /ceecv/roanaltype)                                       as RO_SAFTAnalysisType,
      JournalEntry.OrderID                                                   as RO_SAFTAnalysisEntry,
      cast(JournalEntry._Order.OrderDescription as /ceecv/roanals_type_desc) as RO_SAFTAnalysisEntryDesc
}
where
  JournalEntry.OrderID is not initial
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_COSTCENTERTEXT",
"I_ORDER",
"I_PROFITCENTERTEXT",
"I_SEGMENTTEXT",
"I_STRPJOURNALENTRYHEADERLOG",
"I_WBSELEMENTBASICDATA",
"P_RO_SAFTJOURNALENTRYITEMEXC"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/