P_FSTMT_ACDOC_OI
P_FSTMT_ACDOC_OI is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_GLAccountLineItem) and exposes 19 fields with key fields rldnr, rbukrs, racct, Segment, prctr.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_GLAccountLineItem | I_GLAccountLineItem | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| p_keydate_acdoc | abap.dats |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | P_FSTMTACDOC_OI | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
Fields (19)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | rldnr | Ledger | ||
| KEY | rbukrs | CompanyCode | ||
| KEY | racct | GLAccount | ||
| KEY | Segment | Segment | ||
| KEY | prctr | ProfitCenter | ||
| KEY | rwcur | TransactionCurrency | ||
| KEY | netduedate | NetDueDate | ||
| hsl | ||||
| ksl | ||||
| osl | ||||
| vsl | ||||
| bsl | ||||
| csl | ||||
| dsl | ||||
| esl | ||||
| fsl | ||||
| gsl | ||||
| aging | GeneralLedgerAgingScope | |||
| FiscalYearPeriod | FiscalYearPeriod |
@AbapCatalog.sqlViewName: 'P_FSTMTACDOC_OI'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@VDM.private:true
@VDM.viewType: #COMPOSITE
@ObjectModel: {
usageType.serviceQuality: #D,
usageType.sizeCategory: #XXL,
usageType.dataClass: #MIXED }
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_FSTMT_ACDOC_OI
with parameters
p_keydate_acdoc :abap.dats
// p_FiscalYear :gjahr
as select from I_GLAccountLineItem
{
key Ledger as rldnr ,
key CompanyCode as rbukrs ,
key GLAccount as racct ,
key Segment ,
key ProfitCenter as prctr ,
key TransactionCurrency as rwcur,
key NetDueDate as netduedate,
sum(AmountInCompanyCodeCurrency) as hsl,
sum(AmountInGlobalCurrency) as ksl,
sum(AmountInFreeDefinedCurrency1) as osl,
sum(AmountInFreeDefinedCurrency2) as vsl,
sum(AmountInFreeDefinedCurrency3) as bsl,
sum(AmountInFreeDefinedCurrency4) as csl,
sum(AmountInFreeDefinedCurrency5) as dsl,
sum(AmountInFreeDefinedCurrency6) as esl,
sum(AmountInFreeDefinedCurrency7) as fsl,
sum(AmountInFreeDefinedCurrency8) as gsl,
case when GLAccountType = 'C'
then HouseBank else '' end as hbkid,
case when GLAccountType = 'C'
then HouseBankAccount else '' end as hktid,
GeneralLedgerAgingScope as aging,
GeneralLedgerAgingIncrement as posted_incrmnt,
case when GLAccountType = 'X' or GLAccountType = 'C'
then ''
else FunctionalArea end as funcarea,
FiscalYearPeriod
}
where PostingDate <= left( $parameters.p_keydate_acdoc, 4 ) and
AccountingDocumentCategory <> 'J' and
AccountingDocumentCategory <> 'D' and
AccountingDocumentCategory <> 'M' and
AccountingDocumentCategory <> 'P' and
AccountingDocumentCategory <> 'V' and
AccountingDocumentCategory <> 'W' and
AccountingDocumentCategory <> 'Z' and
( GLRecordType = '0' or GLRecordType = '5') and
// only open items in BS are relevant
GLAccountType = 'X' or
GLAccountType = 'C' and
IsOpenItemManaged = 'X' and
FiscalYear < left( $parameters.p_keydate_acdoc, 4 ) and //$parameters.p_FiscalYear and
AccountingDocumentCategory <> 'C' and
// items not yet cleared or
// cleared in years after current year or
// cleared in current year before keydate just to reduce carry forward amount
( ClearingDocFiscalYear = '0000' or
ClearingDate > $parameters.p_keydate_acdoc ) // cleared items after current date
group by Ledger, CompanyCode, FiscalYearPeriod, GLAccountType, GLAccount, FunctionalArea, Segment, ProfitCenter, TransactionCurrency, NetDueDate, HouseBank, HouseBankAccount, GeneralLedgerAgingScope, GeneralLedgerAgingIncrement
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_GLACCOUNTLINEITEM"
],
"ASSOCIATED":
[],
"BASE":
[],
"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