I_ServiceCostRate_2
Service Cost Rate
I_ServiceCostRate_2 (Basic)
Package: Explore, extend and adapt the SAP S/4HANA Cloud Private Edition with built-in and side-by-side extension capabilities.
Accounting Cost Rate · Accounting and Financial Close
I_ServiceCostRate_2 is a Basic CDS View (Fact) that provides data about "Service Cost Rate" in SAP S/4HANA. It reads from 1 data source (P_AccountingCostRate) and exposes 42 fields with key field AccountingCostRateUUID. It has 16 associations to related views.
SAP Help Documentation
| Category | CDS Views for Overhead Accounting |
|---|---|
| Data Category | Fact |
Purpose
This CDS view serves as an interface view for CDS consumption views C_ServiceCostRate_2 , and C_ServiceCostRateTimeline , which are used in the app Manage Cost Rates - Services . This CDS view provides data about cost rates assigned to a particular activity type, service cost level, work item or an employee who provides the service and so on. These data are consumed via related application or API. This CDS view provides the prerequisites for answering the following business questions: Which cost rates are associated with which activity type/service cost level/work item/employee? Which currencies are used in the applied cost rates? Is the cost rate valid? Is the cost rate an intercompany cost rate? Who is the sender and the receiver company (company code) for a given cost rate? To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views .
Prerequisites
Authorizations Users who want to use this CDS view must have one of the following business catalogs assigned: SAP_FIN_BC_OH_MD_CCA_PC
Structure
Object Types This view relates to the following SAP object type: AccountingCostRate Further Important Fields Important fields in this view include the following: Field Name Description CompanyCode Indicates the company which is providing the service. ReceivingCompanyCode In an intercompany scenario, this is the company for which the service is provided. IsIntercompanyRate Indicates whether the cost rate is used in an intercompany scenario. CostCenter The cost center which is providing the service. ActivityType The type of activity performed at the cost center, such as machine time or consulting. ServiceCostLevel An attribute in the employee master data. The service cost level defines the position grade level of the employee (such as trainee, team lead, or senior project manager), which determines the applicable cost rate for services provided by that employee. PersonnelNumber Personnel number of the employee who provides the service. WBSElementExternalID Work breakdown structure element (WBS element) WorkItem You can define cost rates for specific work items, which allows you to have different rates for different activities performed by the employee, such as project management, training, or demonstrations. WBSElementInternalID The work breakdown structure element in the project. WBSElementExternalID The work breakdown structure element in the project. Currency The currency in which the rate is entered. CostRateVarblAmount Amount for the cost rate.
This CDS view serves as an interface view for CDS consumption views C_ServiceCostRate_2 , and C_ServiceCostRateTimeline , which are used in the app Manage Cost Rates - Services . This CDS view provides data about cost rates assigned to a particular activity type, service cost level, work item or an employee who provides the service and so on. These data are consumed via related application or API. This CDS view provides the prerequisites for answering the following business questions: Which cost rates are associated with which activity type/service cost level/work item/employee? Which currencies are used in the applied cost rates? Is the cost rate valid? Is the cost rate an intercompany cost rate? Who is the sender and the receiver company (company code) for a given cost rate? To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views .
Prerequisites
Authorizations Users who want to use this CDS view must have one of the following business catalogs assigned: SAP_FIN_BC_OH_MD_CCA_PC
Structure
Object Types This view relates to the following SAP object type: AccountingCostRate Further Important Fields Important fields in this view include the following: Field Name Description CompanyCode Indicates the company which is providing the service. ReceivingCompanyCode In an intercompany scenario, this is the company for which the service is provided. IsIntercompanyRate Indicates whether the cost rate is used in an intercompany scenario. CostCenter The cost center which is providing the service. ActivityType The type of activity performed at the cost center, such as machine time or consulting. ServiceCostLevel An attribute in the employee master data. The service cost level defines the position grade level of the employee (such as trainee, team lead, or senior project manager), which determines the applicable cost rate for services provided by that employee. PersonnelNumber Personnel number of the employee who provides the service. WBSElementExternalID Work breakdown structure element (WBS element) WorkItem You can define cost rates for specific work items, which allows you to have different rates for different activities performed by the employee, such as project management, training, or demonstrations. WBSElementInternalID The work breakdown structure element in the project. WBSElementExternalID The work breakdown structure element in the project. Currency The currency in which the rate is entered. CostRateVarblAmount Amount for the cost rate.
SAP API Hub
| State | C1 |
|---|---|
| Line of Business | Accounting and Financial Close |
| Application Component | CO-OM |
| Capabilities | Data Source in SQL Select, Association Target for Defining CDS Entities, Data Source for Defining CDS Entities, Data Source for Data Extraction |
| Package | Accounting and Financial Close for SAP S/4HANA Cloud Private Edition |
Documentation
- Analytics with CDS Views — Build Analytics for S/4HANA Cloud Private Edition ABAP CDS views replicated to SAP Cloud Platform
- CDS Views on SAP Business Accelerator Hub — Explore SAP S/4HANA Cloud Private Edition CDS Views on SAP Business Accelerator Hub
- Create CDS View as API — Create CDS views in SAP S/4HANA Cloud Private Edition and consume them as APIs
- Custom CDS Views — Access data using a Custom Core Data Service view (Custom CDS view)
- Key User Extensibility Tools — The Key User Extensibility Tools of S/4HANA
- SAP Extensibility Explorer for SAP S/4HANA Cloud Private Edition — Explore SAP S/4HANA Cloud Private Edition Extensibility options by leveraging the sample scenarios from SAP
- SAP S/4HANA Extensibility — SAP S/4HANA Extensibility Tutorial
- VDM View Types — The Virtual Data Model in SAP S/4HANA Cloud Private Edition
- View Browser — Search, browse and tag CDS Views
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_AccountingCostRate | _Rate | from |
Associations (16)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_CompanyCode | _CompanyCode | $projection.CompanyCode = _CompanyCode.CompanyCode |
| [0..1] | I_CompanyCode | _ReceivingCompanyCode | $projection.ReceivingCompanyCode = _ReceivingCompanyCode.CompanyCode |
| [0..1] | I_Currency | _Currency | $projection.Currency = _Currency.Currency |
| [0..*] | I_CostCenter | _CostCenter | $projection.ControllingArea = _CostCenter.ControllingArea and $projection.CostCenter = _CostCenter.CostCenter |
| [0..1] | I_CostCenter | _CurrentCostCenter | $projection.ControllingArea = _CurrentCostCenter.ControllingArea and $projection.CostCenter = _CurrentCostCenter.CostCenter and _CurrentCostCenter.ValidityStartDate <= $session.system_date and _CurrentCostCenter.ValidityEndDate >= $session.system_date |
| [0..*] | I_CostCenterActivityType | _CostCtrActivityType | $projection.ControllingArea = _CostCtrActivityType.ControllingArea and $projection.ActivityType = _CostCtrActivityType.CostCtrActivityType |
| [0..1] | I_CostCenterActivityType | _CurrentCostCtrActyType | $projection.ControllingArea = _CurrentCostCtrActyType.ControllingArea and $projection.ActivityType = _CurrentCostCtrActyType.CostCtrActivityType and _CurrentCostCtrActyType.ValidityStartDate <= $session.system_date and _CurrentCostCtrActyType.ValidityEndDate >= $session.system_date |
| [0..1] | I_WorkItem | _WorkItem | $projection.WorkItem = _WorkItem.WorkItem |
| [0..*] | I_ServiceCostLevel | _ServiceCostLevel | $projection.ServiceCostLevel = _ServiceCostLevel.ServiceCostLevel |
| [0..1] | I_ServiceCostLevel | _CurrentServiceCostLevel | $projection.ServiceCostLevel = _CurrentServiceCostLevel.ServiceCostLevel and _CurrentServiceCostLevel.ValidityStartDate <= $session.system_date and _CurrentServiceCostLevel.ValidityEndDate >= $session.system_date |
| [0..1] | I_Employment | _Employment | $projection.PersonnelNumber = _Employment.EmploymentInternalID and _Employment.StartDate <= $session.system_date and _Employment.EndDate >= $session.system_date |
| [1] | I_PersonWorkAgreement_1 | _PersonWorkAgreement | $projection.PersonnelNumber = _PersonWorkAgreement.PersonWorkAgreement |
| [0..1] | I_WBSElement | _WBSElement | $projection.WBSElementExternalID = _WBSElement.WBSElement |
| [0..1] | I_WBSElementByInternalKey | _WBSElementInternalID | $projection.WBSElementInternalID = _WBSElementInternalID.WBSElementInternalID |
| [0..1] | I_UnitOfMeasure | _UnitOfMeasure | $projection.CostCtrActivityTypeQtyUnit = _UnitOfMeasure.UnitOfMeasure |
| [1..1] | E_AccountingCostRate | _Extension | $projection.AccountingCostRateUUID = _Extension.AccountingCostRateUUID |
Annotations (13)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #MANDATORY | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| EndUserText.label | Service Cost Rate | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| VDM.viewType | #BASIC | view | |
| Analytics.dataCategory | #FACT | view | |
| Analytics.dataExtraction.enabled | true | view | |
| Analytics.dataExtraction.delta.changeDataCapture.automatic | true | view | |
| ObjectModel.modelingPattern | #ANALYTICAL_FACT | view | |
| ObjectModel.sapObjectNodeType.name | AccountingCostRate | view |
Fields (42)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | AccountingCostRateUUID | AccountingCostRateUUID | Cost Rate UUID | |
| Ledger | P_AccountingCostRate | Ledger | Ledger in General Ledger Accounting | |
| CurrencyRole | CurrencyRole | Currency and Valuation Type | ||
| CompanyCode | CompanyCode | Receiver Company Code | ||
| ControllingArea | ControllingArea | Controlling Area | ||
| CostCenter | CostCenter | Cost Center | ||
| ActivityType | ActivityType | Activity Type | ||
| IsIntercompanyRate | IsIntercompanyRate | Intercompany Cost Rate Indicator | ||
| ReceivingCompanyCode | ReceivingCompanyCode | Receiving Company Code | ||
| ServiceCostLevel | ServiceCostLevel | Service Cost Level | ||
| PersonnelNumber | PersonnelNumber | Personnel Number | ||
| WBSElementInternalID | WBSElementInternalID_2 | WBS Element | ||
| WBSElementExternalID | WBSElementExternalID_2 | Work Breakdown Structure Element (WBS Element) Edited | ||
| WorkItem | WorkItem | Work Item ID | ||
| TimeSheetOvertimeCategory | TimeSheetOvertimeCategory | Overtime Category | ||
| ValidityStartFiscalYear | ValidityStartFiscalYear | From Fiscal Year | ||
| ValidityStartFiscalPeriod | ValidityStartFiscalPeriod | From Period | ||
| ValidityStartFiscalYearPeriod | Fiscal Year + Fiscal Period | |||
| ValidityStartDate | ValidityStartDate | Validity Start Date | ||
| ValidityEndFiscalYear | ValidityEndFiscalYear | To Fiscal Year | ||
| ValidityEndFiscalPeriod | ValidityEndFiscalPeriod | To Period | ||
| ValidityEndFiscalYearPeriod | Fiscal Year + Fiscal Period | |||
| ValidityEndDate | ValidityEndDate | Validity End Date | ||
| CostCtrActivityTypeQtyUnit | CostCtrActivityTypeQtyUnit | Activity Unit | ||
| Currency | Currency | Valuation Crcy | ||
| CostRateVarblAmount | Variable Rate | |||
| CostRateScaleFactor | CostRateScaleFactor | Per | ||
| _CompanyCode | _CompanyCode | |||
| _ReceivingCompanyCode | _ReceivingCompanyCode | |||
| _CostCenter | _CostCenter | |||
| _CurrentCostCenter | _CurrentCostCenter | |||
| _CostCtrActivityType | _CostCtrActivityType | |||
| _CurrentCostCtrActyType | _CurrentCostCtrActyType | |||
| _ServiceCostLevel | _ServiceCostLevel | |||
| _CurrentServiceCostLevel | _CurrentServiceCostLevel | |||
| _Employment | _Employment | |||
| _PersonWorkAgreement | _PersonWorkAgreement | |||
| _WorkItem | _WorkItem | |||
| _WBSElement | _WBSElement | |||
| _WBSElementInternalID | _WBSElementInternalID | |||
| _Currency | _Currency | |||
| _UnitOfMeasure | _UnitOfMeasure |
Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.
-- Derived SQL interpretation of CDS view I_ServiceCostRate_2.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
CREATE VIEW I_ServiceCostRate_2 AS
SELECT
AccountingCostRateUUID,
_Rate.Ledger AS Ledger,
CurrencyRole,
CompanyCode,
ControllingArea,
CostCenter,
ActivityType,
IsIntercompanyRate,
ReceivingCompanyCode,
ServiceCostLevel,
PersonnelNumber,
WBSElementInternalID_2 AS WBSElementInternalID,
WBSElementExternalID_2 AS WBSElementExternalID,
WorkItem,
TimeSheetOvertimeCategory,
ValidityStartFiscalYear,
ValidityStartFiscalPeriod,
cast((concat( ValidityStartFiscalYear, ValidityStartFiscalPeriod )) as fins_fyearperiod) AS ValidityStartFiscalYearPeriod,
ValidityStartDate,
ValidityEndFiscalYear,
ValidityEndFiscalPeriod,
cast((concat( ValidityEndFiscalYear, ValidityEndFiscalPeriod )) as fins_fyearperiod) AS ValidityEndFiscalYearPeriod,
ValidityEndDate,
CostCtrActivityTypeQtyUnit,
Currency,
cast(CostRateTotalAmount - CostRateFixedAmount as fco_rate_varbl_amount) AS CostRateVarblAmount,
CostRateScaleFactor
FROM P_AccountingCostRate AS _Rate
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode -- association [0..1]
LEFT OUTER JOIN I_CompanyCode AS _ReceivingCompanyCode ON ReceivingCompanyCode = _ReceivingCompanyCode.CompanyCode -- association [0..1]
LEFT OUTER JOIN I_Currency AS _Currency ON Currency = _Currency.Currency -- association [0..1]
LEFT OUTER JOIN I_CostCenter AS _CostCenter ON ControllingArea = _CostCenter.ControllingArea AND CostCenter = _CostCenter.CostCenter -- association [0..*]
LEFT OUTER JOIN I_CostCenter AS _CurrentCostCenter ON ControllingArea = _CurrentCostCenter.ControllingArea AND CostCenter = _CurrentCostCenter.CostCenter AND _CurrentCostCenter.ValidityStartDate <= $session.system_date AND _CurrentCostCenter.ValidityEndDate >= $session.system_date -- association [0..1]
LEFT OUTER JOIN I_CostCenterActivityType AS _CostCtrActivityType ON ControllingArea = _CostCtrActivityType.ControllingArea AND ActivityType = _CostCtrActivityType.CostCtrActivityType -- association [0..*]
LEFT OUTER JOIN I_CostCenterActivityType AS _CurrentCostCtrActyType ON ControllingArea = _CurrentCostCtrActyType.ControllingArea AND ActivityType = _CurrentCostCtrActyType.CostCtrActivityType AND _CurrentCostCtrActyType.ValidityStartDate <= $session.system_date AND _CurrentCostCtrActyType.ValidityEndDate >= $session.system_date -- association [0..1]
LEFT OUTER JOIN I_WorkItem AS _WorkItem ON WorkItem = _WorkItem.WorkItem -- association [0..1]
LEFT OUTER JOIN I_ServiceCostLevel AS _ServiceCostLevel ON ServiceCostLevel = _ServiceCostLevel.ServiceCostLevel -- association [0..*]
LEFT OUTER JOIN I_ServiceCostLevel AS _CurrentServiceCostLevel ON ServiceCostLevel = _CurrentServiceCostLevel.ServiceCostLevel AND _CurrentServiceCostLevel.ValidityStartDate <= $session.system_date AND _CurrentServiceCostLevel.ValidityEndDate >= $session.system_date -- association [0..1]
LEFT OUTER JOIN I_Employment AS _Employment ON PersonnelNumber = _Employment.EmploymentInternalID AND _Employment.StartDate <= $session.system_date AND _Employment.EndDate >= $session.system_date -- association [0..1]
LEFT OUTER JOIN I_PersonWorkAgreement_1 AS _PersonWorkAgreement ON PersonnelNumber = _PersonWorkAgreement.PersonWorkAgreement -- association [1]
LEFT OUTER JOIN I_WBSElement AS _WBSElement ON WBSElementExternalID = _WBSElement.WBSElement -- association [0..1]
LEFT OUTER JOIN I_WBSElementByInternalKey AS _WBSElementInternalID ON WBSElementInternalID = _WBSElementInternalID.WBSElementInternalID -- association [0..1]
LEFT OUTER JOIN I_UnitOfMeasure AS _UnitOfMeasure ON CostCtrActivityTypeQtyUnit = _UnitOfMeasure.UnitOfMeasure -- association [0..1]
LEFT OUTER JOIN E_AccountingCostRate AS _Extension ON AccountingCostRateUUID = _Extension.AccountingCostRateUUID -- association [1..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- 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
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA