@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'company code list item data'
@ObjectModel.representativeKey: 'GLAccount'
@Analytics.technicalName: 'IFIACOCDLI'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType: {
serviceQuality: #D,
sizeCategory: #L,
dataClass: #MIXED
}
define view entity I_ActiveGLAcctInCoCodeListItem
as select from I_GLAcctInCoCode as ActiveDocument
//Migrate to draft 2.0
left outer to one join I_GLAcctDraft as DraftDocument on ActiveDocument.ChartOfAccounts = DraftDocument.ActiveChartOfAccounts
and ActiveDocument.GLAccount = DraftDocument.ActiveGLAccount
and DraftDocument.HasActiveEntity = 'X'
left outer join I_DraftAdministrativeData as DraftAdmin on DraftDocument.GLAcctInChartOfAcctsDraftUUID = DraftAdmin.DraftUUID
/* association to root */
association [1..1] to I_GLAccountInChartOfAccounts as _GLAccountInChartOfAccounts on $projection.ChartOfAccounts = _GLAccountInChartOfAccounts.ChartOfAccounts
and $projection.GLAccount = _GLAccountInChartOfAccounts.GLAccount
/* Associations serve for search help or description text, must join on Non-ActiveObjectKeys */
association [0..1] to I_CompanyCode as _CompanyCode on $projection.CompanyCode = _CompanyCode.CompanyCode
association [1..1] to I_User as _User on $projection.CreatedByUser = _User.UserID
association [0..1] to I_InflationKey as _InflationKey on $projection.Country = _InflationKey.Country
and $projection.GLAcctInflationKey = _InflationKey.GLAcctInflationKey
association [0..1] to I_PlanningLevel as _PlanningLevel on $projection.PlanningLevel = _PlanningLevel.PlanningLevel
association [0..1] to I_Housebank as _HouseBank on $projection.CompanyCode = _HouseBank.CompanyCode
and $projection.HouseBank = _HouseBank.HouseBank
association [0..1] to I_HouseBankAccount as _HouseBankAccount on $projection.CompanyCode = _HouseBankAccount.CompanyCode
and $projection.HouseBank = _HouseBankAccount.HouseBank
and $projection.HouseBankAccount = _HouseBankAccount.HouseBankAccount
association [0..1] to I_Reconciliationaccttype as _Reconciliationaccttype on $projection.ReconciliationAccountType = _Reconciliationaccttype.ReconciliationAccountType
association [0..1] to I_InterestCalculationCode as _InterestCalculationCode on $projection.InterestCalculationCode = _InterestCalculationCode.InterestCalculationCode
association [0..1] to I_AcctgDocItmDspSqncRule as _AcctgDocItmDspSqncRule on $projection.AcctgDocItmDisplaySequenceRule = _AcctgDocItmDspSqncRule.AcctgDocItmDisplaySequenceRule
// association [0..1] to I_CashPlanningGroup as _CashPlanningGroup on $projection.CashPlanningGroup = _CashPlanningGroup.CashPlanningGroup
association [0..1] to I_GLAccountToleranceGroup as _GLAccountToleranceGroup on $projection.CompanyCode = _GLAccountToleranceGroup.CompanyCode
and $projection.APARToleranceGroup = _GLAccountToleranceGroup.APARToleranceGroup
association [0..1] to I_JointVentureRecovery as _JointVentureRecovery on $projection.JointVentureRecoveryCode = _JointVentureRecovery.JointVentureRecoveryCode
and $projection.CompanyCode = _JointVentureRecovery.CompanyCode
association [0..1] to I_FieldStatusGroup as _FieldStatusGroup on $projection.FieldStatusVariant = _FieldStatusGroup.FieldStatusVariant
and $projection.FieldStatusGroup = _FieldStatusGroup.FieldStatusGroup
association [0..1] to I_MultiCurrencyAccounting as _MultiCurrencyAccounting on $projection.MultiCurrencyAccountingCode = _MultiCurrencyAccounting.MultiCurrencyAccountingCode
association [0..1] to I_Currency as _GLAccountCurrency on $projection.GLAccountCurrency = _GLAccountCurrency.Currency
association [0..1] to I_TaxCategory as _TaxCategory on $projection.CompanyCode = _TaxCategory.CompanyCode
and $projection.TaxCategory = _TaxCategory.TaxCategory
association [0..1] to I_GLAcctTxtInMaintLang as _GLAcctTxtInMaintLang on $projection.ChartOfAccounts = _GLAcctTxtInMaintLang.ChartOfAccounts
and $projection.GLAccount = _GLAcctTxtInMaintLang.GLAccount
/** used in C_GLAcctInCoCodeListItem, add by Alex **/
association [0..*] to I_GLAccountText as _Text on $projection.ChartOfAccounts = _Text.ChartOfAccounts
and $projection.GLAccount = _Text.GLAccount
association [0..1] to I_Country as _Country on $projection.Country = _Country.Country
association [0..1] to I_FieldStatusVariant as _FieldStatusVariant on $projection.FieldStatusVariant = _FieldStatusVariant.FieldStatusVariant
association [0..1] to I_ChartOfAccounts as _ChartOfAccounts on $projection.ChartOfAccounts = _ChartOfAccounts.ChartOfAccounts
association [0..1] to I_GLAccountInChartOfAccounts as _AlternativeGLAccountExternal on $projection.CountryChartOfAccounts = _AlternativeGLAccountExternal.ChartOfAccounts
and $projection.AlternativeGLAccount = _AlternativeGLAccountExternal.GLAccount
{
@ObjectModel.foreignKey.association: '_ChartOfAccounts'
key ActiveDocument.ChartOfAccounts,
@ObjectModel.foreignKey.association: '_GLAccountInChartOfAccounts'
@ObjectModel.text.element: [ 'GLAccountName', 'GLAccountLongName' ]
key ActiveDocument.GLAccount,
@ObjectModel.foreignKey.association: '_CompanyCode'
@ObjectModel.text.element: [ 'CompanyCodeName' ]
key ActiveDocument.CompanyCode,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
ActiveDocument.AuthorizationGroup,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
ActiveDocument.AccountingClerk,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
@Semantics.businessDate.at: true
ActiveDocument.LastInterestCalcRunDate,
@Semantics.systemDate.createdAt: true
ActiveDocument.CreationDate,
@Semantics.user.id: true
ActiveDocument.CreatedByUser,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
@ObjectModel.foreignKey.association: '_PlanningLevel'
@ObjectModel.text.element: [ 'PlanningLevelName' ]
ActiveDocument.PlanningLevel,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
@ObjectModel.foreignKey.association: '_HouseBank'
ActiveDocument.HouseBank,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
@ObjectModel.foreignKey.association: '_HouseBankAccount'
@ObjectModel.text.element: [ 'HouseBankAccountDescription' ]
ActiveDocument.HouseBankAccount,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
ActiveDocument.ExchRateDifferencesAccountDetn,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
@ObjectModel.foreignKey.association: '_Reconciliationaccttype'
@ObjectModel.text.element: [ 'ReconciliationAccountTypeName' ]
ActiveDocument.ReconciliationAccountType,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
@ObjectModel.foreignKey.association: '_TaxCategory'
@ObjectModel.text.element: [ 'TaxCodeName' ]
ActiveDocument.TaxCategory,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
@ObjectModel.foreignKey.association: '_InterestCalculationCode'
@ObjectModel.text.element: [ 'InterestCalculationCodeName' ]
ActiveDocument.InterestCalculationCode,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
@ObjectModel.foreignKey.association: '_GLAccountCurrency'
@ObjectModel.text.element: [ 'CurrencyShortName' ]
ActiveDocument.GLAccountCurrency,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
ActiveDocument.IsManagedExternally,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
ActiveDocument.IsAutomaticallyPosted,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
ActiveDocument.LineItemDisplayIsEnabled,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
ActiveDocument.SupplementIsAllowed,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
ActiveDocument.IsOpenItemManaged,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
ActiveDocument.InterestCalculationDate,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
ActiveDocument.IntrstCalcFrequencyInMonths,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
@ObjectModel.foreignKey.association: '_AcctgDocItmDspSqncRule'
@ObjectModel.text.element: [ 'AcctgDocItmDspSequenceRuleName' ]
ActiveDocument.AcctgDocItmDisplaySequenceRule,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
ActiveDocument.AlternativeGLAccount,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
_AlternativeGLAccountExternal.GLAccountExternal as AlternativeGLAccountExternal,
ActiveDocument.CountryChartOfAccounts,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
@ObjectModel.foreignKey.association: '_JointVentureRecovery'
@ObjectModel.text.element: [ 'JointVentureRecoveryCodeName' ]
ActiveDocument.JointVentureRecoveryCode,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
ActiveDocument.CommitmentItem,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
ActiveDocument.TaxCodeIsRequired,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
ActiveDocument.BalanceHasLocalCurrency,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
ActiveDocument.ValuationGroup,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
@ObjectModel.foreignKey.association: '_GLAccountToleranceGroup'
@ObjectModel.text.element: [ 'APARToleranceGroupName' ]
ActiveDocument.APARToleranceGroup,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
ActiveDocument.AccountIsBlockedForPosting,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
ActiveDocument.AccountIsMarkedForDeletion,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
case
when ActiveDocument._GLAcctInCoCodeStatus.GLAcctCoCodeImplementStatus is null then
cast ( 'I' as glaccount_imst) //in process for SAP Delivered Content after Migration
else
ActiveDocument._GLAcctInCoCodeStatus.GLAcctCoCodeImplementStatus
end as GLAcctCoCodeImplementStatus,
// ActiveDocument._GLAcctInCoCodeImst.GLAcctCoCodeImplementStatus,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
case
when ActiveDocument._GLAcctInCoCodeStatus.GLAcctCoCodeImplementStatus is null then
'X' //in process for SAP Delivered Content after Migration
else
ActiveDocument._GLAcctInCoCodeStatus.GLAccountCoCodIsDeliveredBySAP
end as GLAccountCoCodIsDeliveredBySAP,
// ActiveDocument._GLAcctInCoCodeImst.GLAccountCoCodIsDeliveredBySAP,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
ActiveDocument.ClearingIsLedgerGroupSpecific,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
ActiveDocument.IsExtendedOpenItemManaged,
// @ObjectModel.mandatory: 'undefined'
// @ObjectModel.foreignKey.association: '_CashPlanningGroup'
// @ObjectModel.text.element: [ 'CashPlanningGroupName' ]
// ActiveDocument.CashPlanningGroup,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
ActiveDocument.IsCashFlowAccount,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
@ObjectModel.foreignKey.association: '_InflationKey'
@ObjectModel.text.element: [ 'GLAcctInflationKeyName' ]
ActiveDocument.GLAcctInflationKey,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
@ObjectModel.foreignKey.association: '_FieldStatusGroup'
@ObjectModel.text.element: [ 'FieldStatusGroupName' ]
ActiveDocument.FieldStatusGroup,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
@ObjectModel.foreignKey.association: '_MultiCurrencyAccounting'
@ObjectModel.text.element: [ 'MultiCurrencyAcctgCodeName' ]
ActiveDocument.MultiCurrencyAccountingCode,
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
ActiveDocument.ReconciliationAcctIsChangeable,
@ObjectModel.foreignKey.association: '_Country'
ActiveDocument.Country,
ActiveDocument.ControllingArea,
@ObjectModel.foreignKey.association: '_FieldStatusVariant'
ActiveDocument.FieldStatusVariant,
/** functional fields **/
//used in association _GLAcctInChtAcctsWithDraft, _GLAcctTxtInMaintLangWD, _Text
cast( hextobin('00000000000000000000000000000000') as ska1_draft_uuid ) as GLAcctInChartOfAcctsDraftUUID,
//used in lock
DraftAdmin.InProcessByUser,
DraftAdmin.InProcessByUserDescription,
DraftAdmin.DraftIsProcessedByMe,
cast( case
when( DraftDocument.GLAcctInChartOfAcctsDraftUUID is null ) then ' '
else 'X'
end as sdraft_has_draft ) as HasDraftEntity,
ActiveDocument.LastChangeDateTime, // ETag
/** Name fields **/
@ObjectModel.readOnly: true
_CompanyCode.CompanyCodeName,
@ObjectModel.readOnly: true
_GLAcctTxtInMaintLang.GLAccountName,
@ObjectModel.readOnly: true
_GLAcctTxtInMaintLang.GLAccountLongName,
@ObjectModel.readOnly: true
_GLAccountInChartOfAccounts.GLAccountType,
@ObjectModel.readOnly: true
_CompanyCode._Country._Text[1:Language = $session.system_language].CountryName,
@ObjectModel.readOnly: true
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION') // Value should be either 0-Hidden or 1-Read-only, never 3-Optional or 7-Mandatory
_InflationKey._Text[1:Language = $session.system_language].GLAcctInflationKeyName,
@ObjectModel.readOnly: true
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
_PlanningLevel._Text[1:Language = $session.system_language].PlanningLevelName,
@ObjectModel.readOnly: true
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
_HouseBankAccount._Text[1:Language = $session.system_language].HouseBankAccountDescription,
@ObjectModel.readOnly: true
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
_Reconciliationaccttype._Text[1:Language = $session.system_language].ReconciliationAccountTypeName,
@ObjectModel.readOnly: true
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
_InterestCalculationCode._Text[1:Language = $session.system_language].InterestCalculationCodeName,
@ObjectModel.readOnly: true
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
_AcctgDocItmDspSqncRule._Text[1:Language = $session.system_language].AcctgDocItmDspSequenceRuleName,
// @ObjectModel.readOnly: true
// @ObjectModel.mandatory: 'undefined'
// _CashPlanningGroup._Text[1:Language = $session.system_language].CashPlanningGroupName,
@ObjectModel.readOnly: true
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
_GLAccountToleranceGroup._Text[1:Language = $session.system_language].APARToleranceGroupName,
@ObjectModel.readOnly: true
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
_JointVentureRecovery._Text[1:Language = $session.system_language].JointVentureRecoveryCodeName,
@ObjectModel.readOnly: true
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
_FieldStatusGroup._Text[1:Language = $session.system_language].FieldStatusGroupName,
@ObjectModel.readOnly: true
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
_MultiCurrencyAccounting._Text[1:Language = $session.system_language].MultiCurrencyAcctgCodeName,
@ObjectModel.readOnly: true
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
_GLAccountCurrency._Text[1:Language = $session.system_language].CurrencyShortName,
@ObjectModel.readOnly: true
@ObjectModel.mandatory: #('EXTERNAL_CALCULATION')
_TaxCategory._Text[1:Language = $session.system_language].TaxCategoryName as TaxCodeName,
@ObjectModel.readOnly: true
cast( case _GLAccountInChartOfAccounts._GLAcctInChartOfAcctsProdn.GLAccountIsNotProdnRelevant
when 'X' then 'X'
else ' ' end as fins_glacct_not_needed ) as GLAccountIsNotProdnRelevant,
/* Associations */
_GLAccountInChartOfAccounts,
_CompanyCode,
_User,
_InflationKey,
_PlanningLevel,
_HouseBank,
_HouseBankAccount,
_Reconciliationaccttype,
_InterestCalculationCode,
_AcctgDocItmDspSqncRule,
// _CashPlanningGroup,
_GLAccountToleranceGroup,
_JointVentureRecovery,
_FieldStatusGroup,
_MultiCurrencyAccounting,
_GLAccountCurrency,
_TaxCategory,
_GLAcctTxtInMaintLang,
_Text,
_Country,
_FieldStatusVariant,
_ChartOfAccounts
}