P_DefaultFsclYearVarDerivation

DDL: P_DEFAULTFSCLYEARVARDERIVATION SQL: PFIDEFFYV Type: view BASIC

P_DefaultFsclYearVarDerivation is a Basic CDS View 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.

Data Sources (3)

SourceAliasJoin Type
I_CompanyCode I_CompanyCode union_all
I_ControllingArea I_ControllingArea from
P_LedgerCompanyCode P_LedgerCompanyCode union_all

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PFIDEFFYV view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #BASIC view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.representativeKey CompanyCode view

Fields (14)

KeyFieldSource TableSource FieldDescription
KEY ControllingArea ControllingArea
KEY CompanyCodeDefault
KEY Ledger
KEY CompanyCode
AccountingPrinciple
KEY CompanyCodeDefault CompanyCode
KEY Ledger
KEY CompanyCode
AccountingPrinciple
KEY CompanyCodeDefault
KEY Ledger Ledger
KEY CompanyCode CompanyCode
AccountingPrinciple AccountingPrinciple
FiscalYearVariant FiscalYearVariant
@AbapCatalog.sqlViewName: 'PFIDEFFYV'

@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #BASIC
@VDM.private:true
@ClientHandling.algorithm: #SESSION_VARIABLE
//@Analytics.internalName: #LOCAL 

@ObjectModel.representativeKey: 'CompanyCode'
//@EndUserText.label: 'Derive fiscal year variant'


define view P_DefaultFsclYearVarDerivation as select from 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 ControllingArea,
//@ObjectModel.foreignKey.association: '_CompanyCode'

key cast('    ' as bukrs preserving type ) as CompanyCodeDefault,
//@ObjectModel.foreignKey.association: '_Ledger'

key cast('  ' as fins_ledger preserving type ) as Ledger,
//@ObjectModel.foreignKey.association: '_CompanyCode'

key cast('    ' as bukrs preserving type ) as CompanyCode,
//@ObjectModel.foreignKey.association: '_AccountingPrinciple'

cast('    ' as accounting_principle preserving type) as AccountingPrinciple,
//@ObjectModel.foreignKey.association: '_FiscalYearVariant'

FiscalYearVariant

}

union all select from I_CompanyCode 
{
//@ObjectModel.foreignKey.association: '_ControllingArea'

key cast('    ' as fis_kokrs preserving type ) as ControllingArea,
//@ObjectModel.foreignKey.association: '_CompanyCode'

key CompanyCode as CompanyCodeDefault,
//@ObjectModel.foreignKey.association: '_Ledger'

key cast('  ' as fins_ledger preserving type ) as Ledger,

//@ObjectModel.foreignKey.association: '_CompanyCode'

key cast('    ' as bukrs preserving type ) as CompanyCode,
//@ObjectModel.foreignKey.association: '_AccountingPrinciple'

cast('    ' as accounting_principle preserving type) as AccountingPrinciple,
//@ObjectModel.foreignKey.association: '_FiscalYearVariant'

FiscalYearVariant
 
}

union all select from P_LedgerCompanyCode 
{
//@ObjectModel.foreignKey.association: '_ControllingArea'

key cast('    ' as fis_kokrs preserving type ) as ControllingArea,
//@ObjectModel.foreignKey.association: '_CompanyCode'

key cast('    ' as bukrs preserving type ) as CompanyCodeDefault,
//@ObjectModel.foreignKey.association: '_Ledger'

key Ledger,
//@ObjectModel.foreignKey.association: '_CompanyCode'

key CompanyCode,
//@ObjectModel.foreignKey.association: '_AccountingPrinciple'

AccountingPrinciple,
//@ObjectModel.foreignKey.association: '_FiscalYearVariant'

FiscalYearVariant 

}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_COMPANYCODE",
"I_CONTROLLINGAREA",
"P_LEDGERCOMPANYCODE"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/