P_ValuationRunAccountLineItem
Valuation run non-oim items
P_ValuationRunAccountLineItem is a Composite CDS View that provides data about "Valuation run non-oim items" in SAP S/4HANA. It reads from 1 data source (I_GLAccountLineItem) and exposes 133 fields with key fields CompanyCode, FiscalYear, AccountingDocument, LedgerGLLineItem, Ledger. Part of development package FINS_FI_CLS_VAL_COMMON.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_GLAccountLineItem | acdoca | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| p_fiscal_year_period | fiscalyearperiod |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.sqlViewName | PVALRUNITEM | view | |
| AccessControl.authorizationCheck | #NOT_ALLOWED | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view |
Fields (133)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | I_GLAccountLineItem | CompanyCode | |
| KEY | FiscalYear | I_GLAccountLineItem | LedgerFiscalYear | |
| KEY | AccountingDocument | I_GLAccountLineItem | AccountingDocument | |
| KEY | LedgerGLLineItem | I_GLAccountLineItem | LedgerGLLineItem | |
| KEY | Ledger | I_GLAccountLineItem | Ledger | |
| SourceLedger | I_GLAccountLineItem | SourceLedger | ||
| AccountingDocumentItem | I_GLAccountLineItem | AccountingDocumentItem | ||
| DebitCreditCode | ||||
| ClearingAccountingDocument | I_GLAccountLineItem | ClearingAccountingDocument | ||
| ClearingDocFiscalYear | I_GLAccountLineItem | ClearingDocFiscalYear | ||
| ClearingDate | I_GLAccountLineItem | ClearingDate | ||
| NetDueDate | I_GLAccountLineItem | NetDueDate | ||
| ChartOfAccounts | I_GLAccountLineItem | ChartOfAccounts | ||
| GLAccount | I_GLAccountLineItem | GLAccount | ||
| CreationDateTime | I_GLAccountLineItem | CreationDateTime | ||
| SubLedgerAcctLineItemType | I_GLAccountLineItem | SubLedgerAcctLineItemType | ||
| PostingDate | I_GLAccountLineItem | PostingDate | ||
| OriginalPostingDate | I_GLAccountLineItem | PostingDate | ||
| AccountingDocumentCategory | I_GLAccountLineItem | AccountingDocumentCategory | ||
| LedgerFiscalYear | I_GLAccountLineItem | LedgerFiscalYear | ||
| ReferenceDocumentType | I_GLAccountLineItem | ReferenceDocumentType | ||
| FiscalYearPeriod | I_GLAccountLineItem | FiscalYearPeriod | ||
| BusinessTransactionCategory | I_GLAccountLineItem | BusinessTransactionCategory | ||
| IsOpenItemManaged | I_GLAccountLineItem | IsOpenItemManaged | ||
| IsReversal | I_GLAccountLineItem | IsReversal | ||
| IsReversed | I_GLAccountLineItem | IsReversed | ||
| BalanceTransactionCurrency | I_GLAccountLineItem | BalanceTransactionCurrency | ||
| CompanyCodeCurrency | I_GLAccountLineItem | CompanyCodeCurrency | ||
| GlobalCurrency | I_GLAccountLineItem | GlobalCurrency | ||
| FreeDefinedCurrency1 | I_GLAccountLineItem | FreeDefinedCurrency1 | ||
| FreeDefinedCurrency2 | I_GLAccountLineItem | FreeDefinedCurrency2 | ||
| FreeDefinedCurrency3 | I_GLAccountLineItem | FreeDefinedCurrency3 | ||
| FreeDefinedCurrency4 | I_GLAccountLineItem | FreeDefinedCurrency4 | ||
| FreeDefinedCurrency5 | I_GLAccountLineItem | FreeDefinedCurrency5 | ||
| FreeDefinedCurrency6 | I_GLAccountLineItem | FreeDefinedCurrency6 | ||
| FreeDefinedCurrency7 | I_GLAccountLineItem | FreeDefinedCurrency7 | ||
| FreeDefinedCurrency8 | I_GLAccountLineItem | FreeDefinedCurrency8 | ||
| AmountInBalanceTransacCrcy | I_GLAccountLineItem | AmountInBalanceTransacCrcy | ||
| AmountInCompanyCodeCurrency | I_GLAccountLineItem | AmountInCompanyCodeCurrency | ||
| AmountInGlobalCurrency | I_GLAccountLineItem | AmountInGlobalCurrency | ||
| AmountInFreeDefinedCurrency1 | I_GLAccountLineItem | AmountInFreeDefinedCurrency1 | ||
| AmountInFreeDefinedCurrency2 | I_GLAccountLineItem | AmountInFreeDefinedCurrency2 | ||
| AmountInFreeDefinedCurrency3 | I_GLAccountLineItem | AmountInFreeDefinedCurrency3 | ||
| AmountInFreeDefinedCurrency4 | I_GLAccountLineItem | AmountInFreeDefinedCurrency4 | ||
| AmountInFreeDefinedCurrency5 | I_GLAccountLineItem | AmountInFreeDefinedCurrency5 | ||
| AmountInFreeDefinedCurrency6 | I_GLAccountLineItem | AmountInFreeDefinedCurrency6 | ||
| AmountInFreeDefinedCurrency7 | I_GLAccountLineItem | AmountInFreeDefinedCurrency7 | ||
| AmountInFreeDefinedCurrency8 | I_GLAccountLineItem | AmountInFreeDefinedCurrency8 | ||
| ISCLEAREDATKEYDATE | ||||
| GLAccountType | I_GLAccountLineItem | GLAccountType | ||
| FinancialAccountType | I_GLAccountLineItem | FinancialAccountType | ||
| AssignmentReference | I_GLAccountLineItem | AssignmentReference | ||
| GLRecordType | I_GLAccountLineItem | GLRecordType | ||
| FiscalPeriod | I_GLAccountLineItem | FiscalPeriod | ||
| OffsettingAccount | I_GLAccountLineItem | OffsettingAccount | ||
| WBSElement | I_GLAccountLineItem | WBSElement | ||
| TaxCode | I_GLAccountLineItem | TaxCode | ||
| TaxCountry | I_GLAccountLineItem | TaxCountry | ||
| HouseBank | ||||
| HouseBankAccount | ||||
| CostCtrActivityType | I_GLAccountLineItem | CostCtrActivityType | ||
| WBSElementInternalID | I_GLAccountLineItem | WBSElementInternalID | ||
| FinancialTransactionType | I_GLAccountLineItem | FinancialTransactionType | ||
| JointVenture | I_GLAccountLineItem | JointVenture | ||
| JointVentureEquityGroup | I_GLAccountLineItem | JointVentureEquityGroup | ||
| JointVentureEquityType | I_GLAccountLineItem | JointVentureEquityType | ||
| PartnerVenture | I_GLAccountLineItem | PartnerVenture | ||
| JointVenturePartner | I_GLAccountLineItem | JointVenturePartner | ||
| JointVentureCostRecoveryCode | I_GLAccountLineItem | JointVentureCostRecoveryCode | ||
| ProjectNetwork | I_GLAccountLineItem | ProjectNetwork | ||
| RelatedNetworkActivity | I_GLAccountLineItem | RelatedNetworkActivity | ||
| OrderID | I_GLAccountLineItem | OrderID | ||
| BusinessProcess | I_GLAccountLineItem | BusinessProcess | ||
| SalesOrder | I_GLAccountLineItem | SalesDocument | ||
| SalesOrderItem | I_GLAccountLineItem | SalesDocumentItem | ||
| CostObject | I_GLAccountLineItem | CostObject | ||
| CostCenter | I_GLAccountLineItem | CostCenter | ||
| ProfitCenter | I_GLAccountLineItem | ProfitCenter | ||
| FunctionalArea | I_GLAccountLineItem | FunctionalArea | ||
| BusinessArea | I_GLAccountLineItem | BusinessArea | ||
| ControllingArea | I_GLAccountLineItem | ControllingArea | ||
| Segment | I_GLAccountLineItem | Segment | ||
| PartnerCostCenter | I_GLAccountLineItem | PartnerCostCenter | ||
| PartnerProfitCenter | I_GLAccountLineItem | PartnerProfitCenter | ||
| PartnerFunctionalArea | I_GLAccountLineItem | PartnerFunctionalArea | ||
| PartnerBusinessArea | I_GLAccountLineItem | PartnerBusinessArea | ||
| PartnerCompany | I_GLAccountLineItem | PartnerCompany | ||
| PartnerSegment | I_GLAccountLineItem | PartnerSegment | ||
| Supplier | I_GLAccountLineItem | Supplier | ||
| Customer | I_GLAccountLineItem | Customer | ||
| FinancialValuationObjectType | I_GLAccountLineItem | FinancialValuationObjectType | ||
| FinancialValuationObject | I_GLAccountLineItem | FinancialValuationObject | ||
| FinancialValuationSubobject | I_GLAccountLineItem | FinancialValuationSubobject | ||
| REBusinessEntity | I_GLAccountLineItem | REBusinessEntity | ||
| RealEstateBuilding | I_GLAccountLineItem | RealEstateBuilding | ||
| RealEstateProperty | I_GLAccountLineItem | RealEstateProperty | ||
| Fund | I_GLAccountLineItem | Fund | ||
| BudgetPeriod | I_GLAccountLineItem | BudgetPeriod | ||
| GrantID | I_GLAccountLineItem | GrantID | ||
| PubSecBudgetAccount | I_GLAccountLineItem | PubSecBudgetAccount | ||
| CashLedgerAccount | I_GLAccountLineItem | CashLedgerAccount | ||
| SponsoredProgram | I_GLAccountLineItem | SponsoredProgram | ||
| SponsoredClass | I_GLAccountLineItem | SponsoredClass | ||
| Plant | I_GLAccountLineItem | Plant | ||
| Product | I_GLAccountLineItem | Product | ||
| ShipToParty | I_GLAccountLineItem | ShipToParty | ||
| PartnerFund | I_GLAccountLineItem | PartnerFund | ||
| PartnerGrant | I_GLAccountLineItem | PartnerGrant | ||
| CashLedgerCompanyCode | I_GLAccountLineItem | CashLedgerCompanyCode | ||
| FundsCenter | I_GLAccountLineItem | FundsCenter | ||
| PartnerEquityGroup | I_GLAccountLineItem | PartnerEquityGroup | ||
| FundedProgram | I_GLAccountLineItem | FundedProgram | ||
| PartnerBudgetPeriod | I_GLAccountLineItem | PartnerBudgetPeriod | ||
| PubSecBudgetAccountCoCode | I_GLAccountLineItem | PubSecBudgetAccountCoCode | ||
| ServiceDocument | I_GLAccountLineItem | ServiceDocument | ||
| ServiceDocumentItem | I_GLAccountLineItem | ServiceDocumentItem | ||
| ServiceDocumentType | I_GLAccountLineItem | ServiceDocumentType | ||
| GeneralLedgerAgingScope | I_GLAccountLineItem | GeneralLedgerAgingScope | ||
| GeneralLedgerAgingIncrement | I_GLAccountLineItem | GeneralLedgerAgingIncrement | ||
| AccrualObjectType | I_GLAccountLineItem | AccrualObjectType | ||
| AccrualObject | I_GLAccountLineItem | AccrualObject | ||
| AccrualSubobject | I_GLAccountLineItem | AccrualSubobject | ||
| AccrualItemType | I_GLAccountLineItem | AccrualItemType | ||
| AccrualReferenceObject | I_GLAccountLineItem | AccrualReferenceObject | ||
| AccrualObjectLogicalSystem | I_GLAccountLineItem | AccrualObjectLogicalSystem | ||
| Material | I_GLAccountLineItem | Material | ||
| PrdcssrJournalEntryCompanyCode | I_GLAccountLineItem | PrdcssrJournalEntryCompanyCode | ||
| PrdcssrJournalEntryFiscalYear | I_GLAccountLineItem | PrdcssrJournalEntryFiscalYear | ||
| PredecessorJournalEntry | I_GLAccountLineItem | PredecessorJournalEntry | ||
| PredecessorJournalEntryItem | I_GLAccountLineItem | PredecessorJournalEntryItem | ||
| CreditRiskClass | ||||
| TAGGEDACCOUNT | ||||
| SpecialGLCode | I_GLAccountLineItem | SpecialGLCode |
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName: 'PVALRUNITEM'
@AccessControl.authorizationCheck: #NOT_ALLOWED
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType: { serviceQuality: #D, sizeCategory: #XXL, dataClass: #MIXED }
@VDM.private: true
@VDM.viewType: #COMPOSITE
define view P_ValuationRunAccountLineItem
with parameters
p_fiscal_year_period : fiscalyearperiod
as select from I_GLAccountLineItem as acdoca
left outer to one join P_BPCreditRiskClass as _CustomerRiskClass on acdoca.Customer = _CustomerRiskClass.Customer
left outer to one join R_FinClsgMDChgBPSpclGLAcct as _specialglaccount on acdoca.CompanyCode = _specialglaccount.CompanyCode
and(
acdoca.SpecialGLCode = _specialglaccount.SpecialGLCode
)
and(
(
acdoca.Customer is not initial
and acdoca.Customer = _specialglaccount.Customer
)
or(
acdoca.Supplier is not initial
and acdoca.Supplier = _specialglaccount.Supplier
)
)
{
// Debit items are invoices, credit items are payments
key acdoca.CompanyCode,
// For non-open item we require current ledger fiscal year
key acdoca.LedgerFiscalYear as FiscalYear,
key acdoca.AccountingDocument,
key acdoca.LedgerGLLineItem,
key acdoca.Ledger,
acdoca.SourceLedger,
acdoca.AccountingDocumentItem,
cast(
case when acdoca.FiscalYearPeriod = :p_fiscal_year_period
then 'VALUATION_CURRENT'
when acdoca.FiscalYearPeriod < :p_fiscal_year_period
then 'VALUATION_PREVIOUS' end as fins_cls_val_line_type) as line_type,
acdoca._PostingKey.DebitCreditCode,
acdoca.ClearingAccountingDocument,
acdoca.ClearingDocFiscalYear,
acdoca.ClearingDate,
acdoca.NetDueDate,
acdoca.ChartOfAccounts,
acdoca.GLAccount,
acdoca.CreationDateTime,
acdoca.SubLedgerAcctLineItemType,
acdoca.PostingDate,
acdoca.PostingDate as OriginalPostingDate,
acdoca.AccountingDocumentCategory,
acdoca.LedgerFiscalYear,
acdoca.ReferenceDocumentType,
acdoca.FiscalYearPeriod,
acdoca.BusinessTransactionCategory,
acdoca.IsOpenItemManaged,
acdoca.IsReversal,
acdoca.IsReversed,
acdoca.BalanceTransactionCurrency,
acdoca.CompanyCodeCurrency,
acdoca.GlobalCurrency,
acdoca.FreeDefinedCurrency1,
acdoca.FreeDefinedCurrency2,
acdoca.FreeDefinedCurrency3,
acdoca.FreeDefinedCurrency4,
acdoca.FreeDefinedCurrency5,
acdoca.FreeDefinedCurrency6,
acdoca.FreeDefinedCurrency7,
acdoca.FreeDefinedCurrency8,
acdoca.AmountInBalanceTransacCrcy,
acdoca.AmountInCompanyCodeCurrency,
acdoca.AmountInGlobalCurrency,
acdoca.AmountInFreeDefinedCurrency1,
acdoca.AmountInFreeDefinedCurrency2,
acdoca.AmountInFreeDefinedCurrency3,
acdoca.AmountInFreeDefinedCurrency4,
acdoca.AmountInFreeDefinedCurrency5,
acdoca.AmountInFreeDefinedCurrency6,
acdoca.AmountInFreeDefinedCurrency7,
acdoca.AmountInFreeDefinedCurrency8,
' ' as ISCLEAREDATKEYDATE,
acdoca.GLAccountType,
acdoca.FinancialAccountType, // corresponding wl field name ACCOUNT_TYPE
acdoca.AssignmentReference,
acdoca.GLRecordType,
case when acdoca.Customer is not initial
then coalesce(acdoca._Customer.CustomerCorporateGroup, ' ')
else
coalesce(acdoca._Supplier.SupplierCorporateGroup, ' ') end as CUSTOMER_SUPPLIER_GROUP_KEY,
acdoca.FiscalPeriod,
acdoca.OffsettingAccount,
acdoca.WBSElement,
acdoca.TaxCode,
acdoca.TaxCountry,
cast(case acdoca.GLAccountType when 'C' then acdoca.HouseBank else '' end as farp_hbkid) as HouseBank,
cast(case acdoca.GLAccountType when 'C' then acdoca.HouseBankAccount else '' end as fac_hktid) as HouseBankAccount,
acdoca.CostCtrActivityType,
acdoca.WBSElementInternalID,
acdoca.FinancialTransactionType,
acdoca.JointVenture,
acdoca.JointVentureEquityGroup,
acdoca.JointVentureEquityType,
acdoca.PartnerVenture,
acdoca.JointVenturePartner,
acdoca.JointVentureCostRecoveryCode,
acdoca.ProjectNetwork,
acdoca.RelatedNetworkActivity,
acdoca.OrderID,
acdoca.BusinessProcess,
acdoca.SalesDocument as SalesOrder,
acdoca.SalesDocumentItem as SalesOrderItem,
acdoca.CostObject,
acdoca.CostCenter,
acdoca.ProfitCenter,
acdoca.FunctionalArea,
acdoca.BusinessArea,
acdoca.ControllingArea,
acdoca.Segment,
acdoca.PartnerCostCenter,
acdoca.PartnerProfitCenter,
acdoca.PartnerFunctionalArea,
acdoca.PartnerBusinessArea,
acdoca.PartnerCompany,
acdoca.PartnerSegment,
acdoca.Supplier,
acdoca.Customer,
acdoca.FinancialValuationObjectType,
acdoca.FinancialValuationObject,
acdoca.FinancialValuationSubobject,
acdoca.REBusinessEntity,
acdoca.RealEstateBuilding,
acdoca.RealEstateProperty,
acdoca.Fund,
acdoca.BudgetPeriod,
acdoca.GrantID,
acdoca.PubSecBudgetAccount,
acdoca.CashLedgerAccount,
acdoca.SponsoredProgram,
acdoca.SponsoredClass,
acdoca.Plant,
acdoca.Product,
acdoca.ShipToParty,
acdoca.PartnerFund,
acdoca.PartnerGrant,
acdoca.CashLedgerCompanyCode,
acdoca.FundsCenter,
acdoca.PartnerEquityGroup,
acdoca.FundedProgram,
acdoca.PartnerBudgetPeriod,
acdoca.PubSecBudgetAccountCoCode,
acdoca.ServiceDocument,
acdoca.ServiceDocumentItem,
acdoca.ServiceDocumentType,
acdoca.GeneralLedgerAgingScope,
acdoca.GeneralLedgerAgingIncrement,
acdoca.AccrualObjectType,
acdoca.AccrualObject,
acdoca.AccrualSubobject,
acdoca.AccrualItemType,
acdoca.AccrualReferenceObject,
acdoca.AccrualObjectLogicalSystem,
acdoca.Material,
cast(
case when acdoca.RelatedNetworkActivity is not initial
then concat(concat(acdoca.OrderCategory, '/'), acdoca.AccountAssignment)
else '' end as cls_run_nplnr_vorgn_helper) as relatednetworkactivityinternal,
acdoca.PrdcssrJournalEntryCompanyCode,
acdoca.PrdcssrJournalEntryFiscalYear,
acdoca.PredecessorJournalEntry,
acdoca.PredecessorJournalEntryItem,
cast(coalesce(coalesce(_Customer._CustomerToBusinessPartner._BusinessPartner.BusinessPartner,
_Supplier._SupplierToBusinessPartner._BusinessPartner.BusinessPartner), '') as bu_partner preserving type) as BusinessPartner,
cast(coalesce(_CustomerRiskClass._CreditManagement.CreditRiskClass, '') as ukm_risk_class) as CreditRiskClass,
cast(
case when acdoca.SpecialGLCode is initial or (acdoca.SpecialGLCode != _specialglaccount.SpecialGLCode)
then
coalesce(coalesce(acdoca._SupplierCompany.ReconciliationAccount, acdoca._CustomerCompany.ReconciliationAccount), '')
else
_specialglaccount.GLAccount
end as akont) as MASTERDATARECNCLNACCT,
coalesce(coalesce(acdoca._SupplierCompany.ReconciliationAccount, acdoca._CustomerCompany.ReconciliationAccount), '') as TAGGEDACCOUNT,
cast(
coalesce(coalesce(acdoca._Supplier._SupplierToBusinessPartner._BusinessPartner._BPFinancialServicesExt.TradingPartner,
acdoca._Customer._CustomerToBusinessPartner._BusinessPartner._BPFinancialServicesExt.TradingPartner),
'') as rassc) as MASTERDATAPARTNERCOMPANY,
acdoca.SpecialGLCode as SpecialGLCode
}
where
(
acdoca.Supplier is initial
or acdoca._SupplierCompany.IsBusinessPurposeCompleted = ''
)
and(
acdoca.Customer is initial
or acdoca._CustomerCompany.IsBusinessPurposeCompleted = ''
)
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