@VDM.viewType: #CONSUMPTION
@AbapCatalog.sqlViewName: 'CPURORDCOMMIT'
@EndUserText.label: 'Commitments of Purchase Order'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.preserveKey: true
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #BLOCKED_DATA_EXCLUDED
@ObjectModel: {
transactionalProcessingDelegated: false,
semanticKey: ['PurchaseOrder', 'PurchaseOrderItem', 'AccountAssignmentNumber' ],
createEnabled: false,
updateEnabled: false,
deleteEnabled: false
}
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #MIXED
@Search.searchable: false
@UI.headerInfo:{
typeName: 'Commitment',
typeNamePlural: 'Commitments',
title: {value: 'Purchase Order Commitments'}
}
define view C_PurchaseOrderCommitment
as select from P_PurchaseOrderCommitment as PurchaseOrderCommitment
inner join I_PurchaseOrderItemTP as _PurchaseOrderItem on _PurchaseOrderItem.PurchaseOrder = PurchaseOrderCommitment.PurchasingDocument
and _PurchaseOrderItem.PurchaseOrderItem = PurchaseOrderCommitment.PurchasingDocumentItem
//Having an association due to DCL! DO NOT REMOVE!
association [1..1] to C_PurchaseOrderTP as _PurchaseOrderTP on _PurchaseOrderTP.PurchaseOrder = $projection.PurchaseOrder
association [0..1] to I_MM_GLAccountVH as _GLAccount on $projection.GLAccount = _GLAccount.GLAccount
and $projection.CompanyCode = _GLAccount.CompanyCode
association [0..1] to I_MM_ControllingAreaVH as _ControllingAreaValueHelp on $projection.ControllingArea = _ControllingAreaValueHelp.ControllingArea
association [0..1] to I_PubSecBudgetAccountStdVH as _PubSecBudgetAccountStd on _PubSecBudgetAccountStd.PubSecBudgetAccount = $projection.PubSecBudgetAccount
and _PubSecBudgetAccountStd.PubSecBudgetAccountCoCode = $projection.PubSecBudgetAccountCoCode
association [0..1] to I_PubSecBdgtCnsmpnType as _PubSecBdgtCnsmpnType on _PubSecBdgtCnsmpnType.PubSecBudgetCnsmpnType = $projection.PubSecBudgetCnsmpnType
{
@UI.hidden: true
@ObjectModel.foreignKey.association: '_PurchaseOrderTP'
key cast (PurchasingDocument as vdm_purchaseorder preserving type) as PurchaseOrder,
@UI.lineItem: [{position: 20 }]
key PurchasingDocumentItem as PurchaseOrderItem,
@UI.lineItem: [{position: 30 }]
key cast(AccountAssignmentNumber as dzekkn_ll preserving type ) as AccountAssignmentNumber,
key SourceReferenceDocSubitem,
key Segment,
@UI.lineItem: [{position: 60 }]
@ObjectModel.foreignKey.association: '_GLAccount'
@Consumption.valueHelpDefinition: [{ entity:{ name : 'I_MM_GLAccountVH', element: 'GLAccount'},
additionalBinding: [{ localElement: 'CompanyCode',
element: 'CompanyCode' }]
}]
key PurchaseOrderCommitment.GLAccount,
@UI.lineItem: [{position: 70 }]
@Consumption.valueHelp: '_ControllingAreaValueHelp'
@ObjectModel.foreignKey.association: '_ControllingAreaValueHelp'
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.8 }
key ControllingArea,
@UI.lineItem: [{position: 80}]
@ObjectModel.foreignKey.association: '_FunctionalArea'
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.8 }
@Consumption.valueHelpDefinition: [{ entity: { name : 'I_FNDSMGMTFUNCNLAREASTDVH', element: 'FunctionalArea' } }]
key PurchaseOrderCommitment.FunctionalArea,
@UI.lineItem: [{position: 90,importance: #HIGH}]
key PurchaseOrderCommitment.CompanyCode,
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_MM_GLAccountVH',
element: 'GLAccount' },
additionalBinding: [{ localElement: 'CompanyCode',
element: 'CompanyCode' }]
}]
key PurchaseOrderCommitment.CashLedgerAccount,
@Consumption.valueHelpDefinition: [{ entity: { name : 'I_FundStdVH', element: 'Fund' } }]
key PurchaseOrderCommitment.Fund,
@Consumption.valueHelpDefinition: [{ entity: { name : 'I_GrantStdVH', element: 'GrantID' } }]
key PurchaseOrderCommitment.GrantID,
@Consumption.valueHelpDefinition: [{ entity: { name : 'I_BudgetPeriodStdVH', element: 'BudgetPeriod' } }]
key PurchaseOrderCommitment.BudgetPeriod,
key PurchaseOrderCommitment.FiscalYearPeriod,
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_PubSecBudgetAccountStdVH',
element: 'PubSecBudgetAccount' },
additionalBinding: [{ localElement: 'PubSecBudgetAccountCoCode',
element: 'PubSecBudgetAccountCoCode' }]
}]
key PurchaseOrderCommitment.PubSecBudgetAccount,
key PurchaseOrderCommitment.PubSecBudgetAccountCoCode,
key PurchaseOrderCommitment.PubSecBudgetIsRelevant,
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_PubSecBdgtCnsmpnType',
element: 'PubSecBudgetCnsmpnType' }
}]
key PurchaseOrderCommitment.PubSecBudgetCnsmpnType,
key PurchaseOrderCommitment.CostCenter,
key PurchaseOrderCommitment.ProfitCenter,
@UI.hidden
key PurchaseOrderCommitment.WBSElementInternalID,
key PurchaseOrderCommitment.WBSElement,
key PurchaseOrderCommitment.AccountAssignmentType,
key PurchaseOrderCommitment.AccountAssignment,
key PurchaseOrderCommitment.SponsoredProgram,
key PurchaseOrderCommitment.SponsoredClass,
@UI.lineItem: [{position: 40 }]
PurchaseOrderItemText as DocumentItemText,
@UI.lineItem: [{position: 50 }]
@Semantics.amount.currencyCode: 'TransactionCurrency'
cast (AmountInTransactionCurrency as fis_wsl_ll preserving type ) as AmountInTransactionCurrency,
@Semantics.amount.currencyCode: 'CompanyCodeCurrency'
cast(AmountInCompanyCodeCurrency as fis_hsl_ll preserving type ) as AmountInCompanyCodeCurrency,
@Semantics.currencyCode: true
TransactionCurrency,
@Semantics.currencyCode: true
CompanyCodeCurrency,
// @Semantics: { unitOfMeasure: true }
// BaseUnit,
// @UI.lineItem: [{position: 60 }]
// @Semantics: { quantity.unitOfMeasure: 'BaseUnit' }
// @ObjectModel.readOnly: true
// @ObjectModel.mandatory: true
// cast (PlannedQuantity as poacctassgmtplannedquantity preserving type ) as PlannedQuantity,
@Semantics.amount.currencyCode: 'GlobalCurrency'
cast(AmountInGlobalCurrency as fis_ksl_ll preserving type ) as AmountInGlobalCurrency,
@Semantics.currencyCode: true
GlobalCurrency,
@UI.hidden: true
IsCommitment,
_PurchaseOrderTP,
_ControllingAreaValueHelp,
PurchaseOrderCommitment._FunctionalArea,
_PubSecBudgetAccountStd,
_PubSecBdgtCnsmpnType,
_GLAccount
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PURCHASEORDERITEMTP",
"P_PURCHASEORDERCOMMITMENT"
],
"ASSOCIATED":
[
"C_PURCHASEORDERTP",
"I_FUNCTIONALAREA",
"I_MM_CONTROLLINGAREAVH",
"I_MM_GLACCOUNTVH",
"I_PUBSECBDGTCNSMPNTYPE",
"I_PUBSECBUDGETACCOUNTSTDVH"
],
"BASE":
[
"P_PURCHASEORDERCOMMITMENT"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/