@Metadata.ignorePropagatedAnnotations: true
@UI: {
headerInfo: {
description: {
value: 'ProjectDemand'
},
title: {
value: 'ProjectDemandName'
},
typeNamePlural: 'All Demands',
typeName: 'Demand'
}
}
@Metadata.allowExtensions: true
@Search.searchable: true
@ObjectModel: {
usageType: {
sizeCategory: #XL,
dataClass: #TRANSACTIONAL,
serviceQuality: #C
},
representativeKey: 'ProjectDemandUUID',
semanticKey: [
'ProjectDemand'
]
}
@VDM.usage.type: [ #TRANSACTIONAL_PROCESSING_SERVICE ]
@VDM.viewType: #CONSUMPTION
@AccessControl.personalData.blocking: #REQUIRED
@EndUserText.label: 'Manage Demands for All tab'
@AccessControl.authorizationCheck: #CHECK
@Consumption.dbHints: [ 'USE_HEX_PLAN' ]
define root view entity C_MngProjectDemandTP
provider contract transactional_query
as projection on I_ProjectDemandTP as _ProjectDemand
association [1] to I_ProjectDemandStatus as _ProjectDemandStatusFilter on $projection.ProjectDemandStatus = _ProjectDemandStatusFilter.ProjectDemandStatus
// association [0..1] to C_MngProjDmndSrvcPurReqnOrd as _MngProjDmndSrvcPurReqnOrd
// on $projection.ProjectDemandUUID = _MngProjDmndSrvcPurReqnOrd.ProjectDemandUUID
// association [0..1] to C_MngProjDmndMatlPurReqnOrd as _ProjDmndMatlPurReqnOrd
// on $projection.ProjectDemandUUID = _ProjDmndMatlPurReqnOrd.ProjectDemandUUID
association [0..1] to C_ProjDmndWorkPackageDisplay as _ProjectElementPopOverData on $projection.ReferencedObjectUUID = _ProjectElementPopOverData.ProjectElementUUID
association [0..1] to C_ProjDmndProjectDisplay as _ProjectPopOverData on $projection.ProjectDescription = _ProjectPopOverData.ProjectDescription
and $projection.ProjectUUID = _ProjectPopOverData.ProjectUUID
//association [1] to C_ProjDmndCalcdCatSpcfcFields as _ProjDmndCalcCatSpecFields on $projection.ProjectDemandUUID = _ProjDmndCalcCatSpecFields.ProjectDemandUUID
association [1] to I_ProjectDemandDateMaintenance as _ProjDmndMatlDateMaint on $projection.ProjectDemandCategory = _ProjDmndMatlDateMaint.ProjectDemandCategory
and $projection.ProjectDemandDateMaintenance = _ProjDmndMatlDateMaint.ProjectDemandDateMaintenance
and $projection.ProjectDemandType = _ProjDmndMatlDateMaint.ProjectDemandType
// Removed _Project in CE 2308 Release to improve performance
association [1] to I_EnterpriseProject as _Project on $projection.ProjectUUID = _Project.ProjectUUID
association [1] to C_ProjectDemandTypeFilter as _ProjectDemandTypeFilter on $projection.ProjectDemandType = _ProjectDemandTypeFilter.ProjectDemandType
association [1] to I_EnterpriseProjectForUser as _EnterpriseProjectForUser on $projection.ProjectUUID = _EnterpriseProjectForUser.ProjectUUID
// //2508 - MPD performance improvement - begin
// //These associations will be used to calculated purchasing related values. The same associations exist in I_ProjectDemandTP, but joined by DemandUUID, which is time-consuming
// //These associations will push down the filter because of provided PRs and PRIs. It will return data only for those entries, which have Purchase Requisition.
//
// association [0..1] to I_MngProjDmndSrvcPurReqnOrd as _MngProjDmndSrvcPurReqOrdHelp on $projection.PurchaseRequisition = _MngProjDmndSrvcPurReqOrdHelp.PurchaseRequisition
// and $projection.PurchaseRequisitionItem = _MngProjDmndSrvcPurReqOrdHelp.PurchaseRequisitionItem
// and _MngProjDmndSrvcPurReqOrdHelp.PurchaseRequisition is not initial
//
// // association [0..1] to I_MngProjDmndMatlPurReqnOrd as _MngProjDmndMatlPROrdHelper on $projection.PurchaseRequisition = _MngProjDmndMatlPROrdHelper.PurchaseRequisition
// // and $projection.PurchaseRequisitionItem = _MngProjDmndMatlPROrdHelper.PurchaseRequisitionItem
// // and _MngProjDmndMatlPROrdHelper.PurchaseRequisition is not initial
// //2508 - MPD performance improvement - end
{
key ProjectDemandUUID, // @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
// //2508 - MPD performance improvement - begin
// @UI.hidden: true
// @Consumption.filter.hidden: true
// _ProjDmndCalcCatSpecFields.PurchaseRequisition as PurchaseRequisition,
// @UI.hidden: true
// @Consumption.filter.hidden: true
// _ProjDmndCalcCatSpecFields.PurchaseRequisitionItem as PurchaseRequisitionItem,
// //2508 - MPD performance improvement - end
@Consumption.valueHelpDefinition: [
{
entity: {
element: 'ProjectDemand',
name: 'C_ProjectDemandVH'
}
}
]
ProjectDemand, // @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
@Search.defaultSearchElement: true
ProjectDemandName,
@Consumption.valueHelpDefinition: [
{
additionalBinding: [
{
usage: #FILTER,
element: 'ProjectDemandCategory',
localElement: 'ProjectDemandCategory'
}
],
entity: {
element: 'ProjectDemandType',
name: 'C_ProjectDemandTypeFilter'
}
}
]
@ObjectModel.foreignKey.association:'_ProjectDemandTypeFilter'
ProjectDemandType, // @ObjectModel.readOnly: true
@Consumption.filter.hidden: true
@ObjectModel.foreignKey.association:'_ProjectDemandCategory'
ProjectDemandCategory,
@Consumption.filter.hidden: true
ProjectDemandDescription, // @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
@Semantics: {
quantity: {
unitOfMeasure: 'ProjDmndRequestedQuantityUnit'
}
}
ProjDmndRequestedQuantity,
@ObjectModel.foreignKey.association: '_ProjDmndQuantityUnit'
ProjDmndRequestedQuantityUnit, // @ObjectModel.mandatory: true
@Consumption.valueHelpDefinition: [
{
entity: {
element: 'ProjectElementUUID',
name: 'C_ProjectDemandWorkPackageVH'
}
}
]
@ObjectModel.foreignKey.association: '_ProjectElementPopOverData'
@ObjectModel: {
text.element: [
'ProjectElementDescription'
]
}
ReferencedObjectUUID, // @ObjectModel.text.element: ['ProjectElementDescription']
// _ProjectElementData.ProjectDescription as ReferencedObjectUUID_Text,
@ObjectModel.text.element: [
'PlantName'
]
@ObjectModel.foreignKey.association: '_Plant'
Plant,
@Consumption.filter.hidden: true
@UI.hidden: true
_Plant.PlantName,
@Consumption.valueHelpDefinition: [
{
additionalBinding: [
{
element: 'ProjectDemandType',
localElement: 'ProjectDemandType'
}
],
entity: {
element: 'ProjectDemandDateMaintenance',
name: 'I_ProjectDemandDateMaintenance'
}
}
]
@Consumption.filter.hidden: true
// @UI.textArrangement: '_ProjectDemandDateMaint'
@ObjectModel.foreignKey.association: '_ProjDmndMatlDateMaint'
ProjectDemandDateMaintenance, // @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
@Consumption.filter.selectionType: #INTERVAL
@Semantics.calendarItem.due: true
@Semantics.businessDate.at: true
ProjectDemandStartDate,
@Consumption.filter.selectionType: #INTERVAL
ProjectDemandEndDate, // @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
@ObjectModel.foreignKey.association: '_ProjectDemandStatusFilter'
// @ObjectModel.readOnly: true
ProjectDemandStatus, // @UI.textArrangement: '_ProjectDemandStatus'
@ObjectModel.text.element: [
'PurchasingGroupName'
]
@ObjectModel.foreignKey.association: '_PurchasingGroup'
//CE2508 - Added @EndUserText.label annotation - Start
@EndUserText.label: 'Purchasing Group'
//CE2508 - Added @EndUserText.label annotation - End
//@ObjectModel.text.association: '_PurchasingGroup'
PurchasingGroup,
//CE2508 - Added @EndUserText.label annotation - Start
@EndUserText.label: 'Purchasing Group Name'
//CE2508 - Added @EndUserText.label annotation - End
@UI.fieldGroup: [
{
label: 'Purchasing Group Name',
position: 70,
qualifier: 'filtermatdmd'
}
]
_PurchasingGroup.PurchasingGroupName, // @ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
@ObjectModel.text.element: [
'PurchasingOrganizationName'
]
@ObjectModel.foreignKey.association: '_PurchasingOrganisation'
//@ObjectModel.text.association: '_PurchasingOrganisation'
//CE2508 - Added @EndUserText.label annotation - Start
@EndUserText.label: 'Purchasing Organization'
//CE2508 - Added @EndUserText.label annotation - End
PurchasingOrganization,
//CE2508 - Added @EndUserText.label annotation - Start
@EndUserText.label: 'Purchasing Organization Name'
//CE2508 - Added @EndUserText.label annotation - End
@UI.fieldGroup: [
{
label: 'Purchasing Organization Name',
position: 80,
qualifier: 'filtermatdmd'
}
]
_PurchasingOrganisation.PurchasingOrganizationName,
@ObjectModel.foreignKey.association: '_ProjectDemandCurrency'
ProjectDemandRequestCurrency,
@Semantics: {
amount: {
currencyCode: 'ProjectDemandRequestCurrency'
}
}
@Consumption.filter.hidden: true
ProjectDemandPerUnitAmount,
@Consumption.filter.hidden: true
PriceUnitQty, // @ObjectModel.readOnly: true
@Semantics: {
amount: {
currencyCode: 'ProjectDemandRequestCurrency'
}
}
@Consumption.filter.hidden: true
@EndUserText.label: 'Net Demand Value'
ProjectDemandRequestNetAmount,
@Semantics: {
amount: {
currencyCode: 'ProjDmndReqNetAmountCurrency'
}
}
cast( ProjectDemandRequestNetAmount as tv_proj_dmnd_expected_value preserving type ) as ProjectDemandExpectedAmount, // @ObjectModel.mandatory: 'EXTERNAL_CALCULATION'
// @ObjectModel.readOnly: true
// @Semantics: { amount : {currencyCode: 'ProjectDemandRequestCurrency'} }
// _MngProjDmndCalcdFields.ProjDmndCalcdExpectedAmount,
@ObjectModel.foreignKey.association: '_ProjectDemandNetCurrency'
ProjDmndReqNetAmountCurrency, // @ObjectModel.mandatory: 'EXTERNAL_CALCULATIION'
@Semantics: {
amount: {
currencyCode: 'ProjectDemandRequestCurrency'
}
}
@EndUserText.label: 'Overall Limit'
ProjectDemandOverallAmount,
CreatedByUser,
@Consumption.filter.selectionType: #INTERVAL
CreationDateTime,
LastChangedByUser,
@Consumption.filter.selectionType: #INTERVAL
LastChangeDateTime,
@UI.hidden: true
ProjectDemandLastChangedByUser,
@UI.hidden: true
ProjDemandLastChangeDateTime,
@Consumption.valueHelpDefinition: [
{
entity: {
element: 'Project',
name: 'C_EnterpriseProjectVH'
}
}
]
_ProjectElementData.Project as Project, // @ObjectModel.foreignKey.association: '_ProjectPopOverData'
@ObjectModel.foreignKey.association: '_ProjectPopOverData'
_ProjectElementData.ProjectDescription as ProjectDescription,
@UI.hidden: true
_ProjectElementData.ProjectUUID as ProjectUUID,
@Consumption.valueHelpDefinition: [
{
entity: {
element: 'WBSElement',
name: 'C_WBSElementVH'
}
}
]
_ProjectElementData.ProjectElement as ProjectElementForFilter,
@Consumption.filter.hidden: true
_ProjectElementData.ProjectElement as ProjectElement,
@UI.hidden: true
_ProjectElementData.ProjectElementDescription, // @ObjectModel.readOnly: true
_ProjDmndCalcCatSpecFields.FormattedPurRequisitionItem,
_ProjDmndMatlPurReqnOrd.FormattedProjDmndResvnItem,
// @ObjectModel.readOnly: true
// //2508 - MPD performance improvement - begin
@Consumption.filter.hidden: true
// @ObjectModel.virtualElement: true
// @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_PS_DMND_CALC_FIELDS'
// virtual IsPurOrderAllwdForInbDeliv : boole_d,
_ProjDmndCalcCatSpecFields.IsPurOrderAllwdForInbDeliv,
// //2508 - MPD performance improvement - end
@Consumption.filter.hidden: true
_ProjectElementData,
@Consumption.filter.hidden: true
_ProjectDemandTypeFilter,
@Consumption.filter.hidden: true
_ProjectDemandStatusFilter, // @ObjectModel.readOnly: true
// _ProjectElementPopOverData.ProjectProcessingStatus,
//
// @ObjectModel.readOnly: true
// @UI.hidden: true
// _ProjectElementPopOverData.ProcessingStatusText,
//
// @ObjectModel.readOnly: true
// _ProjectElementPopOverData.PlannedStartDate,
//
// @ObjectModel.readOnly: true
// _ProjectElementPopOverData.PlannedEndDate,
//
// //@ObjectModel.readOnly: true
// //_ProjectPopOverData.ProjectProcessingStatus,
//
// //@ObjectModel.readOnly: true
// //_ProjectPopOverData.PlannedStartDate as ProjectPlannedStartDate,
//
// @ObjectModel.readOnly: true
// _ProjectPopOverData.PlannedEndDate,
_ProjectElementPopOverData,
_ProjectPopOverData,
// @ObjectModel.readOnly: true
// @UI.fieldGroup: [{qualifier: 'filtermatdmd', position: 10, label: 'Material' }]
//// @Consumption.valueHelpDefinition: [{ entity: { name : 'I_ProductStdVH', element : 'Product' } }]
// @EndUserText.label: 'Material'
// _ProjDmndCalcCatSpecFields.Material,
//
// @ObjectModel.readOnly: true
// @UI.fieldGroup: [{ qualifier: 'filtermatdmd', position: 20, label: 'Material Group'}]
//// @Consumption.valueHelpDefinition: [{ entity: { name : 'I_ProductGroup_2', element : 'ProductGroup' } }]
// @EndUserText.label: 'Material Group'
// _ProjDmndCalcCatSpecFields.MaterialGroup,
//
// @ObjectModel.readOnly: true
// @UI.fieldGroup: [{ qualifier: 'filtermatdmd', position: 30, label: 'Supplier'}]
//// @Consumption.valueHelpDefinition: [{ entity: { name : 'I_Supplier_VH', element : 'Supplier' } }]
// @EndUserText.label: 'Supplier'
// _ProjDmndCalcCatSpecFields.Supplier,
//
// @ObjectModel.readOnly: true
// @UI.fieldGroup: [{ qualifier: 'filtermatdmd', position: 40, label: 'Info Record'}]
//// @Consumption.valueHelpDefinition: [{ entity: { name : 'C_MMPurchasingInfoRecordHelp', element : 'PurchasingInfoRecord' } }]
// @EndUserText.label: 'Info Record'
// _ProjDmndCalcCatSpecFields.PurchasingInfoRecord,
//
// @ObjectModel.readOnly: true
// @UI.fieldGroup: [ { qualifier: 'filtermatdmd', position: 50, label: 'Purchase Contract' }]
//// @Consumption.valueHelpDefinition: [{ entity: { name : 'C_MMNonDeletedContractVH', element : 'PurchaseContract' } }]
// @EndUserText.label: 'Purchase Contract'
// _ProjDmndCalcCatSpecFields.PurchaseContract,
@UI.fieldGroup: [
{
value: '_ProjDmndCalcCatSpecFields.FormattedPurRequisitionItem',
label: 'Purchase Requisition Item',
position: 70,
qualifier: 'filtermatdmd'
},
{
value: '_ProjDmndCalcCatSpecFields.FormattedPurRequisitionItem',
semanticObjectAction: 'maintain',
label: 'Purchase Requisition Item',
position: 10,
qualifier: 'DemandHeaderInfoPRItm'
},
{
value: '_ProjDmndMatlPurReqnOrd.FormattedProjDmndResvnItem',
label: 'Reservation Item',
position: 50,
qualifier: 'DemandHeaderInfoPRItm'
},
{
value: '_ProjDmndCalcCatSpecFields.FormattedPurRequisitionItem',
semanticObjectAction: 'maintain',
label: 'Purchase Requisition Item',
position: 20,
qualifier: 'ProcurementRelatedSrv'
},
{
value: '_ProjDmndCalcCatSpecFields.FormattedPurRequisitionItem',
semanticObjectAction: 'maintain',
label: 'Purchase Requisition Item',
position: 20,
qualifier: 'ProcurementRelatedMat'
},
{
value: '_ProjDmndCalcCatSpecFields.PurchaseContract',
label: 'Purchase Contract',
position: 50,
qualifier: 'filtermatdmd'
},
{
value: '_ProjDmndCalcCatSpecFields.PurchasingInfoRecord',
label: 'Info Record',
position: 40,
qualifier: 'filtermatdmd'
},
{
value: '_ProjDmndCalcCatSpecFields.Supplier',
label: 'Supplier',
position: 30,
qualifier: 'filtermatdmd'
},
{
value: '_ProjDmndCalcCatSpecFields.MaterialGroup',
label: 'Material Group',
position: 20,
qualifier: 'filtermatdmd'
},
{
value: '_Material._MaterialSupply.ProjectDemandRequirementPlan',
label: 'Requirement Plan',
position: 40,
qualifier: 'ProcurementRelatedMat'
},
{
value: '_ProjDmndCalcCatSpecFields.Material',
label: 'Material',
position: 10,
qualifier: 'filtermatdmd'
}
]
_ProjDmndCalcCatSpecFields,
@EndUserText.label: 'Storage Location'
@Consumption.valueHelpDefinition: [
{
entity: {
element: 'StorageLocation',
name: 'C_MM_StorLocValueHelp'
}
}
]
@UI.fieldGroup: [
{
label: 'Storage Location',
position: 60,
qualifier: 'filtermatdmd'
}
]
_ProjectDemand._Material.StorageLocation,
@EndUserText.label: 'Cost Center'
@Consumption.valueHelpDefinition: [
// {
// entity: {
// element: 'CostCenter',
// name: 'C_ProjDemandCostCenterVH'
// }
// } ]
{ entity : {name: 'I_CostCenterStdVH', element: 'CostCenter' }
,additionalBinding: [ {localConstant: '> $session.system_date',element: 'ValidityEndDate'}] }]
@UI.fieldGroup: [
{
label: 'Cost Center',
position: 10,
qualifier: 'filterwork'
}
]
@UI.lineItem: [{ hidden: true }]
_ProjectDemand._Work.CostCenter,
@EndUserText.label: 'Activity Type'
@Consumption.valueHelpDefinition: [
{
entity: {
element: 'CostCtrActivityType',
name: 'C_ProjDemandActivityTypeVH'
}
}
]
@UI.fieldGroup: [
{
label: 'Activity Type',
position: 20,
qualifier: 'filterwork'
}
]
@UI.lineItem: [{ hidden: true }]
_ProjectDemand._Work.ActivityType,
@EndUserText.label: 'Requirement Plan'
@UI.fieldGroup: [
{
label: 'Requirement Plan',
position: 90,
qualifier: 'filtermatdmd'
}
]
_ProjectDemand._Material._MaterialSupply.ProjectDemandRequirementPlan,
@EndUserText.label: 'Planned Independent Requirement Item'
@UI.fieldGroup: [
{
label: 'Planned Independent Requirement Item',
position: 100,
qualifier: 'filtermatdmd'
}
]
_ProjectDemand._Material._MaterialSupply.ProjDmndPlndIndepRqmtItem,
@EndUserText.label: 'Project Demand Has Reservation'
_ProjectDemand._Material._MaterialSupply.ProjectDemandHasReservation,
@Consumption.filter.hidden: true
_MngProjDmndSrvcPurReqnOrd,
@Consumption.filter.hidden: true
_ProjDmndMatlPurReqnOrd,
// //2508 - MPD performance improvement - begin
// @Consumption.filter.hidden: true
// _MngProjDmndSrvcPurReqOrdHelp,
// //@Consumption.filter.hidden: true
// //_MngProjDmndMatlPROrdHelper,
// //2508 - MPD performance improvement - end
@Consumption.filter.hidden: true
_Material : redirected to composition child C_ProjectDemandMaterialAllTP,
@Consumption.filter.hidden: true
_Service : redirected to composition child C_ProjectDemandServiceAllTP,
@Consumption.filter.hidden: true
_Work : redirected to composition child C_ProjectDemandWorkAllTP,
@Consumption.filter.hidden: true
_ProjDmndQuantityUnit,
@Consumption.filter.hidden: true
_WorkPackage,
@Consumption.filter.hidden: true
_Plant,
@Consumption.filter.hidden: true
_PurchasingGroup,
@Consumption.filter.hidden: true
_ProjectDemandCurrency,
@Consumption.filter.hidden: true
_ProjectDemandNetCurrency,
@Consumption.filter.hidden: true
_ProjectDemandCategory,
// @Consumption.filter.hidden: true
// _ProjectDemandType,
@Consumption.filter.hidden: true
_PurchasingOrganisation,
@Consumption.filter.hidden: true
_ProjectDemandVH,
@Consumption.filter.hidden: true
_ProjectDemandStatus,
@UI.hidden: true
_ProjectDemandVH.ProjectDemandFormattedName,
@Consumption.filter.hidden: true
//@UI.lineItem: [{ position: 90, label: 'Number of Situations'}]
_ProjectDemandVH._SitnInstceIndicator.SitnNumberOfInstances,
@Consumption.filter.hidden: true
_ProjDmndMatlDateMaint,
_Project,
@Consumption.hidden: true
_EnterpriseProjectForUser
}
where
ProjectDemandType = 'S101'
or ProjectDemandType = 'S102'
or ProjectDemandType = 'S201'
or ProjectDemandType = 'S202'
or ProjectDemandType = 'S203'
or ProjectDemandType = 'S204'
or ProjectDemandType = 'S205'
or ProjectDemandType = 'S301' //Safeguarding in context of PSA Demand Harmonization 2208. Allow only these Demand Types
or ProjectDemandType = 'S304' //CE2502: also allow Demand Type S304 (External Staffing) -> ETO