P_ML_CoCode_Ledger_BCF
P_ML_CoCode_Ledger_BCF is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_LedgerCompanyCodeCrcyRoles) and exposes 13 fields with key fields CompanyCode, Ledger.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_LedgerCompanyCodeCrcyRoles | f | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_CalendarDate | calendardate |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #X | view | |
| ObjectModel.usageType.sizeCategory | #S | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view |
Fields (13)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | I_LedgerCompanyCodeCrcyRoles | CompanyCode | |
| KEY | Ledger | I_LedgerCompanyCodeCrcyRoles | Ledger | |
| FiscalYearVariant | I_LedgerCompanyCodeCrcyRoles | FiscalYearVariant | ||
| CompanyCodeCurrencyRole | _CurtpH | CurrencyRole | ||
| GlobalCurrencyRole | _CurtpK | CurrencyRole | ||
| FreeDefinedCurrency1Role | _CurtpO | CurrencyRole | ||
| FreeDefinedCurrency2Role | _CurtpV | CurrencyRole | ||
| FreeDefinedCurrency3Role | _CurtpB | CurrencyRole | ||
| FreeDefinedCurrency4Role | _CurtpC | CurrencyRole | ||
| FreeDefinedCurrency5Role | _CurtpD | CurrencyRole | ||
| FreeDefinedCurrency6Role | _CurtpE | CurrencyRole | ||
| FreeDefinedCurrency7Role | _CurtpF | CurrencyRole | ||
| FreeDefinedCurrency8Role | _CurtpG | CurrencyRole |
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
serviceQuality: #X,
sizeCategory: #S,
dataClass: #MIXED
}
@VDM: {
viewType: #COMPOSITE,
private:true }
define view entity P_ML_CoCode_Ledger_BCF
with parameters
P_CalendarDate : calendardate
as select from I_LedgerCompanyCodeCrcyRoles as f
left outer to one join I_Distinct_Postingdate as dp on dp.FiscalYearVariant = f.FiscalYearVariant
and dp.CalendarDate = $parameters.P_CalendarDate
and dp.IsSpecialPeriod = ' '
left outer to one join I_LastBalanceCarryForward as bcf on bcf.CompanyCode = f.CompanyCode
and bcf.Ledger = f.Ledger
left outer to many join I_MatlLedgerValnCrcyRoleName as _CurtpH on f.CompanyCode = _CurtpH.CompanyCode
and f.CompanyCodeCurrencyRole = _CurtpH.CurrencyRole
and f.Ledger = _CurtpH.Ledger
left outer to many join I_MatlLedgerValnCrcyRoleName as _CurtpK on f.CompanyCode = _CurtpK.CompanyCode
and f.GlobalCurrencyRole = _CurtpK.CurrencyRole
and f.Ledger = _CurtpK.Ledger
left outer to many join I_MatlLedgerValnCrcyRoleName as _CurtpO on f.CompanyCode = _CurtpO.CompanyCode
and f.FreeDefinedCurrency1Role = _CurtpO.CurrencyRole
and f.Ledger = _CurtpO.Ledger
left outer to many join I_MatlLedgerValnCrcyRoleName as _CurtpV on f.CompanyCode = _CurtpV.CompanyCode
and f.FreeDefinedCurrency2Role = _CurtpV.CurrencyRole
and f.Ledger = _CurtpV.Ledger
left outer to many join I_MatlLedgerValnCrcyRoleName as _CurtpB on f.CompanyCode = _CurtpB.CompanyCode
and f.FreeDefinedCurrency3Role = _CurtpB.CurrencyRole
and f.Ledger = _CurtpB.Ledger
left outer to many join I_MatlLedgerValnCrcyRoleName as _CurtpC on f.CompanyCode = _CurtpC.CompanyCode
and f.FreeDefinedCurrency4Role = _CurtpC.CurrencyRole
and f.Ledger = _CurtpC.Ledger
left outer to many join I_MatlLedgerValnCrcyRoleName as _CurtpD on f.CompanyCode = _CurtpD.CompanyCode
and f.FreeDefinedCurrency5Role = _CurtpD.CurrencyRole
and f.Ledger = _CurtpD.Ledger
left outer to many join I_MatlLedgerValnCrcyRoleName as _CurtpE on f.CompanyCode = _CurtpE.CompanyCode
and f.FreeDefinedCurrency6Role = _CurtpE.CurrencyRole
and f.Ledger = _CurtpE.Ledger
left outer to many join I_MatlLedgerValnCrcyRoleName as _CurtpF on f.CompanyCode = _CurtpF.CompanyCode
and f.FreeDefinedCurrency7Role = _CurtpF.CurrencyRole
and f.Ledger = _CurtpF.Ledger
left outer to many join I_MatlLedgerValnCrcyRoleName as _CurtpG on f.CompanyCode = _CurtpG.CompanyCode
and f.FreeDefinedCurrency8Role = _CurtpG.CurrencyRole
and f.Ledger = _CurtpG.Ledger
{
key f.CompanyCode,
key f.Ledger,
f.FiscalYearVariant,
_CurtpH.CurrencyRole as CompanyCodeCurrencyRole,
_CurtpK.CurrencyRole as GlobalCurrencyRole,
_CurtpO.CurrencyRole as FreeDefinedCurrency1Role,
_CurtpV.CurrencyRole as FreeDefinedCurrency2Role,
_CurtpB.CurrencyRole as FreeDefinedCurrency3Role,
_CurtpC.CurrencyRole as FreeDefinedCurrency4Role,
_CurtpD.CurrencyRole as FreeDefinedCurrency5Role,
_CurtpE.CurrencyRole as FreeDefinedCurrency6Role,
_CurtpF.CurrencyRole as FreeDefinedCurrency7Role,
_CurtpG.CurrencyRole as FreeDefinedCurrency8Role,
case
when bcf.BalanceCarryforwardToYear is null
then '0000'
when dp.FiscalYear is null
then bcf.BalanceCarryforwardToYear
when bcf.BalanceCarryforwardToYear > dp.FiscalYear
then dp.FiscalYear
else bcf.BalanceCarryforwardToYear
end as FromFiscalYear
}
where _CurtpH.CurrencyRole is not null
or _CurtpK.CurrencyRole is not null
or _CurtpO.CurrencyRole is not null
or _CurtpV.CurrencyRole is not null
or _CurtpB.CurrencyRole is not null
or _CurtpC.CurrencyRole is not null
or _CurtpD.CurrencyRole is not null
or _CurtpE.CurrencyRole is not null
or _CurtpF.CurrencyRole is not null
or _CurtpG.CurrencyRole is not null
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_DISTINCT_POSTINGDATE",
"I_LASTBALANCECARRYFORWARD",
"I_LEDGERCOMPANYCODECRCYROLES",
"I_MATLLEDGERVALNCRCYROLENAME"
],
"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