P_DefaultFsclYearVarDerivation is a Basic CDS View that provides data about "Derive fiscal year variant" in SAP S/4HANA. It reads from 3 data sources (I_CompanyCode, I_ControllingArea, P_LedgerCompanyCode) and exposes 14 fields with key fields ControllingArea, CompanyCodeDefault, Ledger, CompanyCode, CompanyCodeDefault. Part of development package FINS_FIS_FICO.
@Metadata.ignorePropagatedAnnotations: true@AccessControl.authorizationCheck: #NOT_REQUIRED@VDM.viewType: #BASIC@VDM.private:true@ObjectModel.representativeKey: 'CompanyCode'
//@Analytics.technicalName: 'PFIDEFFYV'
//@EndUserText.label: 'Derive fiscal year variant'
defineviewentity P_DefaultFsclYearVarDerivation asselectfrom I_ControllingArea as I_ControllingArea
//association [0..1] to I_ControllingArea as _ControllingArea on $projection.ControllingArea = _ControllingArea.ControllingArea
//association [0..1] to I_CompanyCode as _CompanyCode on $projection.CompanyCode = _CompanyCode.CompanyCode
//association [0..1] to I_Ledger as _Ledger on $projection.Ledger = _Ledger.Ledger
//association [0..1] to I_FiscalYearVariant as _FiscalYearVariant on $projection.FiscalYearVariant = _FiscalYearVariant.FiscalYearVariant
//association [0..1] to I_AccountingPrinciple as _AccountingPrinciple on $projection.AccountingPrinciple = _AccountingPrinciple.AccountingPrinciple
{
//@ObjectModel.foreignKey.association: '_ControllingArea'
key I_ControllingArea.ControllingArea,
//@ObjectModel.foreignKey.association: '_CompanyCode'
keycast(' ' as bukrs preserving type ) as CompanyCodeDefault,
//@ObjectModel.foreignKey.association: '_Ledger'
keycast(' ' as fins_ledger preserving type ) as Ledger,
//@ObjectModel.foreignKey.association: '_CompanyCode'
keycast(' ' as bukrs preserving type ) as CompanyCode,
//@ObjectModel.foreignKey.association: '_AccountingPrinciple'
cast(' ' as accounting_principle preserving type) as AccountingPrinciple,
//@ObjectModel.foreignKey.association: '_FiscalYearVariant'
I_ControllingArea.FiscalYearVariant
}
unionallselectfrom I_CompanyCode as I_CompanyCode
{
//@ObjectModel.foreignKey.association: '_ControllingArea'
keycast(' ' as fis_kokrs preserving type ) as ControllingArea,
//@ObjectModel.foreignKey.association: '_CompanyCode'
key CompanyCode as CompanyCodeDefault,
//@ObjectModel.foreignKey.association: '_Ledger'
keycast(' ' as fins_ledger preserving type ) as Ledger,
//@ObjectModel.foreignKey.association: '_CompanyCode'
keycast(' ' as bukrs preserving type ) as CompanyCode,
//@ObjectModel.foreignKey.association: '_AccountingPrinciple'
cast(' ' as accounting_principle preserving type) as AccountingPrinciple,
//@ObjectModel.foreignKey.association: '_FiscalYearVariant'
I_CompanyCode.FiscalYearVariant
}
unionallselectfrom P_LedgerCompanyCode as P_LedgerCompanyCode
{
//@ObjectModel.foreignKey.association: '_ControllingArea'
keycast(' ' as fis_kokrs preserving type ) as ControllingArea,
//@ObjectModel.foreignKey.association: '_CompanyCode'
keycast(' ' as bukrs preserving type ) as CompanyCodeDefault,
//@ObjectModel.foreignKey.association: '_Ledger'
key P_LedgerCompanyCode.Ledger,
//@ObjectModel.foreignKey.association: '_CompanyCode'
key P_LedgerCompanyCode.CompanyCode,
//@ObjectModel.foreignKey.association: '_AccountingPrinciple'
P_LedgerCompanyCode.AccountingPrinciple,
//@ObjectModel.foreignKey.association: '_FiscalYearVariant'
P_LedgerCompanyCode.FiscalYearVariant
}