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