P_RO_SAFTAnalysisTypeItem
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)
| Source | Alias | Join 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)
| Name | Type | Default |
|---|---|---|
| P_AlternativeGLAccountIsUsed | saft_ro_alt_gl_account_flag | |
| P_FromPostingDate | dats |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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
left outer to one join I_ProfitCenterText as _ProfitCenterText on JournalEntry.ControllingArea = _ProfitCenterText.ControllingArea
and JournalEntry.ProfitCenter = _ProfitCenterText.ProfitCenter
and _ProfitCenterText.Language = '4'
and _ProfitCenterText.ValidityStartDate <= $parameters.P_FromPostingDate
and _ProfitCenterText.ValidityEndDate >= $parameters.P_FromPostingDate
left outer to one join I_ProfitCenterText as _ProfitCenterText2 on JournalEntry.ControllingArea = _ProfitCenterText2.ControllingArea
and JournalEntry.ProfitCenter = _ProfitCenterText2.ProfitCenter
and _ProfitCenterText2.Language = 'E'
and _ProfitCenterText2.ValidityStartDate <= $parameters.P_FromPostingDate
and _ProfitCenterText2.ValidityEndDate >= $parameters.P_FromPostingDate
{
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 coalesce(_ProfitCenterText.ProfitCenterLongName, _ProfitCenterText2.ProfitCenterLongName)
when '' then cast(coalesce(_ProfitCenterText.ProfitCenterName, _ProfitCenterText2.ProfitCenterName) as /ceecv/roanals_type_desc)
else cast(coalesce(_ProfitCenterText.ProfitCenterLongName, _ProfitCenterText2.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
left outer to one join I_CostCenterText as _CostCenterTxt on JournalEntry.ControllingArea = _CostCenterTxt.ControllingArea
and JournalEntry.CostCenter = _CostCenterTxt.CostCenter
and _CostCenterTxt.Language = '4'
and _CostCenterTxt.ValidityEndDate >= $parameters.P_FromPostingDate
left outer to one join I_CostCenterText as _CostCenterTxt2 on JournalEntry.ControllingArea = _CostCenterTxt2.ControllingArea
and JournalEntry.CostCenter = _CostCenterTxt2.CostCenter
and _CostCenterTxt2.Language = 'E'
and _CostCenterTxt2.ValidityStartDate <= $parameters.P_FromPostingDate
and _CostCenterTxt2.ValidityEndDate >= $parameters.P_FromPostingDate
{
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 coalesce(_CostCenterTxt.CostCenterDescription, _CostCenterTxt2.CostCenterDescription)
when '' then cast(coalesce(_CostCenterTxt.CostCenterName, _CostCenterTxt2.CostCenterName) as /ceecv/roanals_type_desc)
else cast(coalesce(_CostCenterTxt.CostCenterDescription, _CostCenterTxt2.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(coalesce(JournalEntry._SegmentText[1: Language = '4'].SegmentName, JournalEntry._SegmentText[1: Language = 'E'].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
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