P_RO_SAFTAnalysisTypeItem2

DDL: P_RO_SAFTANALYSISTYPEITEM2 SQL: PROSAFTANLTYPIT2 Type: view CONSUMPTION

P_RO_SAFTAnalysisTypeItem2 is a Consumption CDS View in SAP S/4HANA. It reads from 10 data sources and exposes 56 fields with key fields StatryRptCategory, StatryRptgEntity, StatryRptRunID, CompanyCode, FiscalYear.

Data Sources (10)

SourceAliasJoin Type
I_StRpJournalEntryHeaderLog Log from
I_StRpJournalEntryHeaderLog Log union_all
I_StRpJournalEntryHeaderLog Log union_all
I_StRpJournalEntryHeaderLog Log union_all
I_StRpJournalEntryHeaderLog Log union_all
P_RO_SAFTOplAcctgDocItmExc P_RO_SAFTOplAcctgDocItmExc inner
P_RO_SAFTOplAcctgDocItmExc P_RO_SAFTOplAcctgDocItmExc inner
P_RO_SAFTOplAcctgDocItmExc P_RO_SAFTOplAcctgDocItmExc inner
P_RO_SAFTOplAcctgDocItmExc P_RO_SAFTOplAcctgDocItmExc inner
P_RO_SAFTOplAcctgDocItmExc P_RO_SAFTOplAcctgDocItmExc inner

Parameters (2)

NameTypeDefault
P_AlternativeGLAccountIsUsed saft_ro_alt_gl_account_flag
P_FromPostingDate dats

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PROSAFTANLTYPIT2 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 (56)

KeyFieldSource TableSource FieldDescription
KEY StatryRptCategory I_StRpJournalEntryHeaderLog StatryRptCategory
KEY StatryRptgEntity I_StRpJournalEntryHeaderLog StatryRptgEntity
KEY StatryRptRunID I_StRpJournalEntryHeaderLog StatryRptRunID
KEY CompanyCode I_StRpJournalEntryHeaderLog CompanyCode
KEY FiscalYear I_StRpJournalEntryHeaderLog FiscalYear
KEY AccountingDocument I_StRpJournalEntryHeaderLog AccountingDocument
KEY AccountingDocumentItem DocItem AccountingDocumentItem
KEY AccountingDocumentType DocItem AccountingDocumentType
KEY PostingDate DocItem PostingDate
KEY RO_SAFTAnalysisType
RO_SAFTAnalysisEntry
StatryRptCategory
KEY StatryRptgEntity I_StRpJournalEntryHeaderLog StatryRptgEntity
KEY StatryRptRunID I_StRpJournalEntryHeaderLog StatryRptRunID
KEY CompanyCode I_StRpJournalEntryHeaderLog CompanyCode
KEY FiscalYear I_StRpJournalEntryHeaderLog FiscalYear
KEY AccountingDocument DocItem AccountingDocument
KEY AccountingDocumentItem DocItem AccountingDocumentItem
KEY AccountingDocumentType DocItem AccountingDocumentType
KEY PostingDate DocItem PostingDate
KEY RO_SAFTAnalysisType
RO_SAFTAnalysisEntry DocItem CostCenter
StatryRptCategory
KEY StatryRptgEntity I_StRpJournalEntryHeaderLog StatryRptgEntity
KEY StatryRptRunID I_StRpJournalEntryHeaderLog StatryRptRunID
KEY CompanyCode I_StRpJournalEntryHeaderLog CompanyCode
KEY FiscalYear I_StRpJournalEntryHeaderLog FiscalYear
KEY AccountingDocument DocItem AccountingDocument
KEY AccountingDocumentItem DocItem AccountingDocumentItem
KEY AccountingDocumentType DocItem AccountingDocumentType
KEY PostingDate DocItem PostingDate
KEY RO_SAFTAnalysisType
RO_SAFTAnalysisEntry DocItem Segment
StatryRptCategory
KEY StatryRptgEntity I_StRpJournalEntryHeaderLog StatryRptgEntity
KEY StatryRptRunID I_StRpJournalEntryHeaderLog StatryRptRunID
KEY CompanyCode I_StRpJournalEntryHeaderLog CompanyCode
KEY FiscalYear I_StRpJournalEntryHeaderLog FiscalYear
KEY AccountingDocument DocItem AccountingDocument
KEY AccountingDocumentItem DocItem AccountingDocumentItem
KEY AccountingDocumentType DocItem AccountingDocumentType
KEY PostingDate DocItem PostingDate
KEY RO_SAFTAnalysisType
RO_SAFTAnalysisEntry
StatryRptCategory
KEY StatryRptgEntity I_StRpJournalEntryHeaderLog StatryRptgEntity
KEY StatryRptRunID I_StRpJournalEntryHeaderLog StatryRptRunID
KEY CompanyCode I_StRpJournalEntryHeaderLog CompanyCode
KEY FiscalYear I_StRpJournalEntryHeaderLog FiscalYear
KEY AccountingDocument I_StRpJournalEntryHeaderLog AccountingDocument
KEY AccountingDocumentItem DocItem AccountingDocumentItem
KEY AccountingDocumentType DocItem AccountingDocumentType
KEY PostingDate DocItem PostingDate
KEY RO_SAFTAnalysisType
RO_SAFTAnalysisEntry DocItem OrderID
RO_SAFTAnalysisEntryDesc
@AbapCatalog.sqlViewName: 'PROSAFTANLTYPIT2'
@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

// This view gathers and groups analysis type data for RO SAFT from BSEG item number


define view P_RO_SAFTAnalysisTypeItem2
with parameters
    P_AlternativeGLAccountIsUsed : saft_ro_alt_gl_account_flag,
    P_FromPostingDate            : dats
    
  // Profit Centers

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

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

// Cost Centers

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

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

// Segments

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

// WBS Elements

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

// Orders

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