R_CostAccountingLineItem
Cost Accounting Line Item
R_CostAccountingLineItem is a Composite CDS View that provides data about "Cost Accounting Line Item" in SAP S/4HANA. It reads from 1 data source (I_GLAccountLineItemRawData) and exposes 126 fields with key fields FiscalYear, ReferenceDocument, ControllingArea, CompanyCode, LedgerGLLineItem.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_GLAccountLineItemRawData | _Item | from |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| EndUserText.label | Cost Accounting Line Item | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.lifecycle.contract.type | #SAP_INTERNAL_API | view |
Fields (126)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | FiscalYear | I_GLAccountLineItemRawData | FiscalYear | |
| KEY | ReferenceDocument | |||
| KEY | ControllingArea | I_GLAccountLineItemRawData | ControllingArea | |
| KEY | CompanyCode | I_GLAccountLineItemRawData | CompanyCode | |
| KEY | LedgerGLLineItem | I_GLAccountLineItemRawData | LedgerGLLineItem | |
| KEY | ReferenceDocumentItem | I_GLAccountLineItemRawData | ReferenceDocumentItem | |
| KEY | ReferenceDocumentType | I_GLAccountLineItemRawData | ReferenceDocumentType | |
| KEY | AccountingDocument | I_GLAccountLineItemRawData | AccountingDocument | |
| KEY | ReferenceDocumentContext | I_GLAccountLineItemRawData | ReferenceDocumentContext | |
| TransactionSubitem | I_GLAccountLineItemRawData | TransactionSubitem | ||
| ControllingDocumentItem | I_GLAccountLineItemRawData | ControllingDocumentItem | ||
| SourceLedger | I_GLAccountLineItemRawData | SourceLedger | ||
| DocumentItemText | I_GLAccountLineItemRawData | DocumentItemText | ||
| FiscalPeriod | I_GLAccountLineItemRawData | FiscalPeriod | ||
| FiscalYearPeriod | I_GLAccountLineItemRawData | FiscalYearPeriod | ||
| PartnerCompanyCode | I_GLAccountLineItemRawData | PartnerCompanyCode | ||
| GLAccount | ||||
| PersonnelNumber | I_GLAccountLineItemRawData | PersonnelNumber | ||
| AccountAssignment | I_GLAccountLineItemRawData | AccountAssignment | ||
| AccountAssignmentType | I_GLAccountLineItemRawData | AccountAssignmentType | ||
| PartnerAccountAssignment | I_GLAccountLineItemRawData | PartnerAccountAssignment | ||
| PartnerAccountAssignmentType | I_GLAccountLineItemRawData | PartnerAccountAssignmentType | ||
| CostCenter | I_GLAccountLineItemRawData | CostCenter | ||
| PartnerCostCenter | I_GLAccountLineItemRawData | PartnerCostCenter | ||
| CostCtrActivityType | I_GLAccountLineItemRawData | CostCtrActivityType | ||
| PartnerCostCtrActivityType | I_GLAccountLineItemRawData | PartnerCostCtrActivityType | ||
| WBSElementInternalID | I_GLAccountLineItemRawData | WBSElementInternalID | ||
| WBSElementExternalID | ||||
| PartnerWBSElementInternalID | I_GLAccountLineItemRawData | PartnerWBSElementInternalID | ||
| PartnerWBSElementExternalID | ||||
| ProjectExternalID | ||||
| ServiceDocumentType | I_GLAccountLineItemRawData | ServiceDocumentType | ||
| ServiceDocument | I_GLAccountLineItemRawData | ServiceDocument | ||
| ServiceDocumentItem | I_GLAccountLineItemRawData | ServiceDocumentItem | ||
| ProjectNetwork | I_GLAccountLineItemRawData | ProjectNetwork | ||
| RelatedNetworkActivity | ||||
| OrderID | I_GLAccountLineItemRawData | OrderID | ||
| OrderOperation | ||||
| CostObject | I_GLAccountLineItemRawData | CostObject | ||
| SalesDocument | I_GLAccountLineItemRawData | SalesDocument | ||
| SalesDocumentItem | I_GLAccountLineItemRawData | SalesDocumentItem | ||
| WorkItem | I_GLAccountLineItemRawData | WorkItem | ||
| BusinessProcess | I_GLAccountLineItemRawData | BusinessProcess | ||
| Product | I_GLAccountLineItemRawData | Product | ||
| Plant | I_GLAccountLineItemRawData | Plant | ||
| JointVentureCostRecoveryCode | I_GLAccountLineItemRawData | JointVentureCostRecoveryCode | ||
| SenderCostRecoveryCode | I_GLAccountLineItemRawData | SenderCostRecoveryCode | ||
| Fund | I_GLAccountLineItemRawData | Fund | ||
| FunctionalArea | I_GLAccountLineItemRawData | FunctionalArea | ||
| GrantID | I_GLAccountLineItemRawData | GrantID | ||
| BudgetPeriod | I_GLAccountLineItemRawData | BudgetPeriod | ||
| PartnerFund | I_GLAccountLineItemRawData | PartnerFund | ||
| PartnerFunctionalArea | I_GLAccountLineItemRawData | PartnerFunctionalArea | ||
| PartnerGrant | I_GLAccountLineItemRawData | PartnerGrant | ||
| PartnerBudgetPeriod | I_GLAccountLineItemRawData | PartnerBudgetPeriod | ||
| FinancialManagementArea | I_GLAccountLineItemRawData | FinancialManagementArea | ||
| BillableControl | I_GLAccountLineItemRawData | BillableControl | ||
| OperatingConcern | I_GLAccountLineItemRawData | OperatingConcern | ||
| SenderRECompanyCode | ||||
| REBusinessEntity | I_GLAccountLineItemRawData | REBusinessEntity | ||
| RealEstateBuilding | I_GLAccountLineItemRawData | RealEstateBuilding | ||
| RealEstateProperty | I_GLAccountLineItemRawData | RealEstateProperty | ||
| RERentalObject | I_GLAccountLineItemRawData | RERentalObject | ||
| RealEstateContract | I_GLAccountLineItemRawData | RealEstateContract | ||
| REServiceChargeKey | I_GLAccountLineItemRawData | REServiceChargeKey | ||
| RESettlementUnitID | I_GLAccountLineItemRawData | RESettlementUnitID | ||
| SettlementReferenceDate | I_GLAccountLineItemRawData | SettlementReferenceDate | ||
| ChartOfAccounts | I_GLAccountLineItemRawData | ChartOfAccounts | ||
| PostingDate | I_GLAccountLineItemRawData | PostingDate | ||
| DocumentDate | I_GLAccountLineItemRawData | DocumentDate | ||
| AccountingDocCreatedByUser | I_GLAccountLineItemRawData | AccountingDocCreatedByUser | ||
| IsReversal | I_GLAccountLineItemRawData | IsReversal | ||
| IsReversed | I_GLAccountLineItemRawData | IsReversed | ||
| ReversalReferenceDocument | I_GLAccountLineItemRawData | ReversalReferenceDocument | ||
| PredecessorReferenceDocument | I_GLAccountLineItemRawData | PredecessorReferenceDocument | ||
| PredecessorReferenceDocItem | I_GLAccountLineItemRawData | PredecessorReferenceDocItem | ||
| ControllingObject | I_GLAccountLineItemRawData | ControllingObject | ||
| ControllingBusTransacType | I_GLAccountLineItemRawData | ControllingBusTransacType | ||
| BusinessTransactionCategory | I_GLAccountLineItemRawData | BusinessTransactionCategory | ||
| OriginCtrlgDebitCreditCode | ||||
| DebitCreditCode | I_GLAccountLineItemRawData | DebitCreditCode | ||
| IsSettled | I_GLAccountLineItemRawData | IsSettled | ||
| IsSettlement | I_GLAccountLineItemRawData | IsSettlement | ||
| ServicesRenderedDate | I_GLAccountLineItemRawData | ServicesRenderedDate | ||
| BaseUnit | I_GLAccountLineItemRawData | BaseUnit | ||
| Quantity | ||||
| TransactionCurrency | I_GLAccountLineItemRawData | TransactionCurrency | ||
| AmountInTransactionCurrency | I_GLAccountLineItemRawData | AmountInTransactionCurrency | ||
| CompanyCodeCurrency | I_GLAccountLineItemRawData | CompanyCodeCurrency | ||
| AmountInCompanyCodeCurrency | I_GLAccountLineItemRawData | AmountInCompanyCodeCurrency | ||
| GlobalCurrency | I_GLAccountLineItemRawData | GlobalCurrency | ||
| AmountInGlobalCurrency | I_GLAccountLineItemRawData | AmountInGlobalCurrency | ||
| FreeDefinedCurrency1 | I_GLAccountLineItemRawData | FreeDefinedCurrency1 | ||
| AmountInFreeDefinedCurrency1 | I_GLAccountLineItemRawData | AmountInFreeDefinedCurrency1 | ||
| FreeDefinedCurrency2 | I_GLAccountLineItemRawData | FreeDefinedCurrency2 | ||
| AmountInFreeDefinedCurrency2 | I_GLAccountLineItemRawData | AmountInFreeDefinedCurrency2 | ||
| FreeDefinedCurrency3 | I_GLAccountLineItemRawData | FreeDefinedCurrency3 | ||
| AmountInFreeDefinedCurrency3 | I_GLAccountLineItemRawData | AmountInFreeDefinedCurrency3 | ||
| FreeDefinedCurrency4 | I_GLAccountLineItemRawData | FreeDefinedCurrency4 | ||
| AmountInFreeDefinedCurrency4 | I_GLAccountLineItemRawData | AmountInFreeDefinedCurrency4 | ||
| FreeDefinedCurrency5 | I_GLAccountLineItemRawData | FreeDefinedCurrency5 | ||
| AmountInFreeDefinedCurrency5 | I_GLAccountLineItemRawData | AmountInFreeDefinedCurrency5 | ||
| FreeDefinedCurrency6 | I_GLAccountLineItemRawData | FreeDefinedCurrency6 | ||
| AmountInFreeDefinedCurrency6 | I_GLAccountLineItemRawData | AmountInFreeDefinedCurrency6 | ||
| FreeDefinedCurrency7 | I_GLAccountLineItemRawData | FreeDefinedCurrency7 | ||
| AmountInFreeDefinedCurrency7 | I_GLAccountLineItemRawData | AmountInFreeDefinedCurrency7 | ||
| FreeDefinedCurrency8 | I_GLAccountLineItemRawData | FreeDefinedCurrency8 | ||
| AmountInFreeDefinedCurrency8 | I_GLAccountLineItemRawData | AmountInFreeDefinedCurrency8 | ||
| FunctionalCurrency | I_GLAccountLineItemRawData | FunctionalCurrency | ||
| AmountInFunctionalCurrency | I_GLAccountLineItemRawData | AmountInFunctionalCurrency | ||
| AccountingDocumentType | I_GLAccountLineItemRawData | AccountingDocumentType | ||
| ProfitCenter | I_GLAccountLineItemRawData | ProfitCenter | ||
| PartnerProfitCenter | I_GLAccountLineItemRawData | PartnerProfitCenter | ||
| _JournalEntry | I_GLAccountLineItemRawData | _JournalEntry | ||
| Customer | I_GLAccountLineItemRawData | Customer | ||
| CustomerGroup | I_GLAccountLineItemRawData | CustomerGroup | ||
| CustomerSupplierIndustry | I_GLAccountLineItemRawData | CustomerSupplierIndustry | ||
| CustomerSupplierCountry | I_GLAccountLineItemRawData | CustomerSupplierCountry | ||
| SalesDistrict | I_GLAccountLineItemRawData | SalesDistrict | ||
| SoldProduct | I_GLAccountLineItemRawData | SoldProduct | ||
| SoldProductGroup | I_GLAccountLineItemRawData | SoldProductGroup | ||
| SalesOrganization | I_GLAccountLineItemRawData | SalesOrganization | ||
| DistributionChannel | I_GLAccountLineItemRawData | DistributionChannel | ||
| OrganizationDivision | I_GLAccountLineItemRawData | OrganizationDivision | ||
| BillToParty | I_GLAccountLineItemRawData | BillToParty | ||
| ShipToParty | I_GLAccountLineItemRawData | ShipToParty |
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl: {
authorizationCheck: #CHECK,
personalData.blocking: #NOT_REQUIRED
}
@EndUserText.label: 'Cost Accounting Line Item'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
serviceQuality: #C,
sizeCategory: #XXL,
dataClass: #MIXED
}
@VDM: {
viewType: #COMPOSITE,
lifecycle.contract.type:#SAP_INTERNAL_API
}
define view entity R_CostAccountingLineItem
as select from I_GLAccountLineItemRawData as _Item
{
key _Item.FiscalYear,
key cast(_Item.ReferenceDocument as referencedocument preserving type) as ReferenceDocument,
key _Item.ControllingArea,
key _Item.CompanyCode,
key _Item.LedgerGLLineItem,
key _Item.ReferenceDocumentItem,
key _Item.ReferenceDocumentType,
key _Item.AccountingDocument,
key _Item.ReferenceDocumentContext,
_Item.TransactionSubitem,
_Item.ControllingDocumentItem,
_Item.SourceLedger,
_Item.DocumentItemText,
_Item.FiscalPeriod,
_Item.FiscalYearPeriod,
_Item.PartnerCompanyCode,
cast(_Item.GLAccount as fco_allocation_account preserving type) as GLAccount,
_Item.PersonnelNumber,
_Item.AccountAssignment,
_Item.AccountAssignmentType,
_Item.PartnerAccountAssignment,
_Item.PartnerAccountAssignmentType,
//Cost Center/Activity Type
_Item.CostCenter,
_Item.PartnerCostCenter,
_Item.CostCtrActivityType,
_Item.PartnerCostCtrActivityType,
//WBS Element
_Item.WBSElementInternalID,
cast(_Item._WBSElementBasicData.WBSElementExternalID as fis_wbsext_no_conv preserving type) as WBSElementExternalID,
_Item.PartnerWBSElementInternalID,
cast(_Item._PartnerWBSElementBasicData.WBSElementExternalID as fis_par_psp_pnr_ext preserving type) as PartnerWBSElementExternalID,
cast(_Item._ProjectBasicData.ProjectExternalID as fis_part_projectext_no_conv) as ProjectExternalID,
_Item.ServiceDocumentType,
_Item.ServiceDocument,
_Item.ServiceDocumentItem,
//Network
_Item.ProjectNetwork,
cast(_Item.RelatedNetworkActivity as fis_npvrg_conv) as RelatedNetworkActivity,
//Activity or Order
_Item.OrderID,
//Order operation
cast(_Item.OrderOperation as vdm_vornr) as OrderOperation,
//Cost object
_Item.CostObject,
//Sales Order
_Item.SalesDocument,
_Item.SalesDocumentItem,
_Item.WorkItem,
_Item.BusinessProcess,
_Item.Product,
_Item.Plant,
//Recovery indicator
_Item.JointVentureCostRecoveryCode,
_Item.SenderCostRecoveryCode,
//Public Sector
_Item.Fund,
_Item.FunctionalArea,
_Item.GrantID,
_Item.BudgetPeriod,
_Item.PartnerFund,
_Item.PartnerFunctionalArea,
_Item.PartnerGrant,
_Item.PartnerBudgetPeriod,
_Item.FinancialManagementArea,
_Item.BillableControl,
cast(
case _Item.AccountAssignmentType
when 'EO' then _Item.AccountAssignment
else ''
end as rkeobjnr) as PartnerProfitabilitySegment,
@Semantics.booleanIndicator
cast(
case _Item.AccountAssignmentType
when 'EO' then 'X'
else ''
end as profitabilitysegmentisassigned preserving type) as ProfitabilitySegmentIsAssigned,
_Item.OperatingConcern,
//RealEstate
cast(_Item.CompanyCode as vvsbukrs preserving type) as SenderRECompanyCode,
_Item.REBusinessEntity,
_Item.RealEstateBuilding,
_Item.RealEstateProperty,
_Item.RERentalObject,
_Item.RealEstateContract,
_Item.REServiceChargeKey,
_Item.RESettlementUnitID,
_Item.SettlementReferenceDate,
_Item.ChartOfAccounts,
_Item.PostingDate,
_Item.DocumentDate,
_Item.AccountingDocCreatedByUser,
_Item.IsReversal,
_Item.IsReversed,
_Item.ReversalReferenceDocument,
_Item.PredecessorReferenceDocument,
_Item.PredecessorReferenceDocItem,
_Item.ControllingObject,
_Item.ControllingBusTransacType,
_Item.BusinessTransactionCategory,
cast(_Item.OriginCtrlgDebitCreditCode as beknz_mask preserving type ) as OriginCtrlgDebitCreditCode,
_Item.DebitCreditCode,
_Item.IsSettled,
_Item.IsSettlement,
_Item.ServicesRenderedDate,
_Item.BaseUnit,
@Semantics: { quantity : {unitOfMeasure: 'BaseUnit'} }
cast(_Item.Quantity as lstxx) as Quantity,
_Item.TransactionCurrency,
@Semantics: { amount : {currencyCode: 'TransactionCurrency'} }
_Item.AmountInTransactionCurrency,
_Item.CompanyCodeCurrency,
@Semantics: { amount : {currencyCode: 'CompanyCodeCurrency'} }
_Item.AmountInCompanyCodeCurrency,
_Item.GlobalCurrency,
@Semantics: { amount : {currencyCode: 'GlobalCurrency'} }
_Item.AmountInGlobalCurrency,
_Item.FreeDefinedCurrency1,
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency1'} }
_Item.AmountInFreeDefinedCurrency1,
_Item.FreeDefinedCurrency2,
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency2'} }
_Item.AmountInFreeDefinedCurrency2,
_Item.FreeDefinedCurrency3,
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency3'} }
_Item.AmountInFreeDefinedCurrency3,
_Item.FreeDefinedCurrency4,
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency4'} }
_Item.AmountInFreeDefinedCurrency4,
_Item.FreeDefinedCurrency5,
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency5'} }
_Item.AmountInFreeDefinedCurrency5,
_Item.FreeDefinedCurrency6,
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency6'} }
_Item.AmountInFreeDefinedCurrency6,
_Item.FreeDefinedCurrency7,
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency7'} }
_Item.AmountInFreeDefinedCurrency7,
_Item.FreeDefinedCurrency8,
@Semantics: { amount : {currencyCode: 'FreeDefinedCurrency8'} }
_Item.AmountInFreeDefinedCurrency8,
_Item.FunctionalCurrency,
@Semantics: { amount : {currencyCode: 'FunctionalCurrency'} }
_Item.AmountInFunctionalCurrency,
_Item.AccountingDocumentType,
_Item.ProfitCenter,
_Item.PartnerProfitCenter,
_Item._JournalEntry,
//Profitability Segment fields
_Item.Customer,
_Item.CustomerGroup,
_Item.CustomerSupplierIndustry,
_Item.CustomerSupplierCountry,
_Item.SalesDistrict,
_Item.SoldProduct,
_Item.SoldProductGroup,
_Item.SalesOrganization,
_Item.DistributionChannel,
_Item.OrganizationDivision,
_Item.BillToParty,
_Item.ShipToParty
}
where
(
( (_Item.ControllingBusTransacType = 'RKU1'
or _Item.ControllingBusTransacType = 'KAMV'
or _Item.ControllingBusTransacType = 'RKU2'
or _Item.ControllingBusTransacType = 'RKU3'
) and _Item.ControllingObject <> ''
)
or
(_Item.ControllingBusTransacType = 'RKL')
or
(
_Item.ControllingBusTransacType = 'COIN'
and
_Item.IsReversal = '' and _Item.IsReversed = ''
and
_Item.ControllingObject <> ''
and
(
_Item.BusinessTransactionCategory <> 'ACAA' and
_Item.BusinessTransactionCategory <> 'ACAC' and
_Item.BusinessTransactionCategory <> 'ACAD' and
_Item.BusinessTransactionCategory <> 'ACEA' and
_Item.BusinessTransactionCategory <> 'ACPA' and
_Item.BusinessTransactionCategory <> 'ACPC' and
_Item.BusinessTransactionCategory <> 'ACPD' and
_Item.BusinessTransactionCategory <> 'EBDP' and
_Item.BusinessTransactionCategory <> 'EBVP' and
_Item.BusinessTransactionCategory <> 'EBWP' and
_Item.BusinessTransactionCategory <> 'TBCS' and
_Item.BusinessTransactionCategory <> 'TBRR' and
_Item.BusinessTransactionCategory <> 'KOAE' and
_Item.BusinessTransactionCategory <> 'RMWF' and
_Item.BusinessTransactionCategory <> 'GLA0'
)
)
)
and _Item._Ledger.IsLeadingLedger = 'X'
and _Item.JournalEntryIsSecondaryEntry = ''
and _Item.LogicalSystem = ''
and _Item.AccountAssignmentType <> ''
and _Item.ReferenceDocument <> ''
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_GLACCOUNTLINEITEMRAWDATA",
"I_LEDGER",
"I_PROJECTBASICDATA",
"I_WBSELEMENTBASICDATA"
],
"ASSOCIATED":
[
"I_JOURNALENTRY"
],
"BASE":
[
"I_GLACCOUNTLINEITEMRAWDATA"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
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