P_RTPCOrderBalance
P_RTPCOrderBalance is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (acdoca, I_Ledger) and exposes 14 fields with key fields OrderID, ControllingArea, Ledger.
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PRTPCORDBALC | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| AbapCatalog.preserveKey | true | view |
Fields (14)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | OrderID | aufnr | ||
| KEY | ControllingArea | kokrs | ||
| KEY | Ledger | rldnr | ||
| FiscalYearPeriod | fiscyearper | |||
| AmountInCompanyCodeCurrency | ||||
| AmountInGlobalCurrency | ||||
| AmountInFreeDefinedCurrency1 | ||||
| AmountInFreeDefinedCurrency2 | ||||
| AmountInFreeDefinedCurrency3 | ||||
| AmountInFreeDefinedCurrency4 | ||||
| AmountInFreeDefinedCurrency5 | ||||
| AmountInFreeDefinedCurrency6 | ||||
| AmountInFreeDefinedCurrency7 | ||||
| AmountInFreeDefinedCurrency8 |
@AbapCatalog.sqlViewName: 'PRTPCORDBALC'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
//@EndUserText.label: 'Event-based Order's order balance'
@VDM.viewType: #COMPOSITE
@VDM.private:true
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@AbapCatalog.preserveKey:true
define view P_RTPCOrderBalance
as select from acdoca as _item
inner join I_Ledger as _ledger on _ledger.Ledger = _item.rldnr
//and _ledger.IsLeadingLedger = 'X' //support only leading leader in CE2005
and _ledger.LedgerType = '' //standard ledger only
{
key aufnr as OrderID,
key kokrs as ControllingArea,
key rldnr as Ledger,
fiscyearper as FiscalYearPeriod,
sum(hsl) as AmountInCompanyCodeCurrency,
sum(ksl) as AmountInGlobalCurrency,
sum(osl) as AmountInFreeDefinedCurrency1,
sum(vsl) as AmountInFreeDefinedCurrency2,
sum(bsl) as AmountInFreeDefinedCurrency3,
sum(csl) as AmountInFreeDefinedCurrency4,
sum(dsl) as AmountInFreeDefinedCurrency5,
sum(esl) as AmountInFreeDefinedCurrency6,
sum(fsl) as AmountInFreeDefinedCurrency7,
sum(gsl) as AmountInFreeDefinedCurrency8
}
where
(
_item.accasty = 'OR'
or _item.accasty = 'OP'
)
and(
_item.autyp = '10'
or _item.autyp = '40'
)
and _item.bttype <> 'TBCS' //ignore TBCS posting
and _item.co_beknz <> ''
and _item.objnr <> ''
and (_item.ktosl <> 'PRD' or _item.bttype <> 'EBVP')
group by
aufnr,
kokrs,
rldnr,
fiscyearper
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_LEDGER",
"ACDOCA"
],
"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