CDS标准视图:功能位置 I_FunctionalLocation
- 视图名称:I_FunctionalLocation
- 视图类型:基础
- 视图代码:
点击查看代码
@EndUserText.label: 'Functional Location'
@Analytics: { dataCategory: #DIMENSION }
@VDM.viewType: #BASIC
@AbapCatalog: { sqlViewName: 'IFUNCTLLOCATION', compiler.compareFilter, preserveKey }
@AccessControl.authorizationCheck:#CHECK
@ObjectModel.representativeKey: 'FunctionalLocation'
@ObjectModel.semanticKey: [ 'FunctionalLocation' ]
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #MASTER
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory: #L
@AccessControl.privilegedAssociations:['_CreatedByUser','_LastChangedByUser','_LocationAccountAssignment', '_Status']
@Metadata: { ignorePropagatedAnnotations, allowExtensions }
@ObjectModel.supportedCapabilities: [#SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE, #CDS_MODELING_ASSOCIATION_TARGET]
define view I_FunctionalLocation
as select from iflot
association [0..1] to I_FunctionalLocationCategory as _FunctionalLocationCategory on _FunctionalLocationCategory.FunctionalLocationCategory = $projection.FunctionalLocationCategory
association [0..1] to I_TechnicalObjectType as _TechnicalObjectType on _TechnicalObjectType.TechnicalObjectType = $projection.TechnicalObjectType
association [0..1] to I_WorkCenterType as _WorkCenterType on $projection.WorkCenterTypeCode = _WorkCenterType.WorkCenterTypeCode
association [0..1] to I_WorkCenter as _WorkCenter on _WorkCenter.WorkCenterInternalID = $projection.WorkCenterInternalID
and _WorkCenter.WorkCenterTypeCode = $projection.WorkCenterTypeCode
association [0..1] to I_LocationAccountAssignment as _LocationAccountAssignment on _LocationAccountAssignment.MaintObjectLocAcctAssgmtNmbr = $projection.MaintObjectLocAcctAssgmtNmbr
association [0..*] to I_FunctionalLocationText as _FunctionalLocationText on _FunctionalLocationText.FunctionalLocation = $projection.FunctionalLocation
association [0..1] to I_FunctionalLocation as _SuperiorFunctionalLocation on _SuperiorFunctionalLocation.FunctionalLocation = $projection.SuperiorFunctionalLocation
association [0..*] to I_FunctionalLocationText as _SupFunctionalLocationText on _SupFunctionalLocationText.FunctionalLocation = $projection.SuperiorFunctionalLocation
association [0..1] to I_User as _CreatedByUser on _CreatedByUser.UserID = $projection.CreatedByUser
association [0..1] to I_User as _LastChangedByUser on _LastChangedByUser.UserID = $projection.LastChangedByUser
association [0..1] to I_MaintenancePlanPlant as _MaintenancePlanningPlant on _MaintenancePlanningPlant.MaintenancePlanningPlant = $projection.MaintenancePlanningPlant
association [0..1] to I_MaintenancePlannerGroup as _MaintenancePlannerGroup on $projection.MaintenancePlannerGroup = _MaintenancePlannerGroup.MaintenancePlannerGroup
and $projection.MaintenancePlanningPlant = _MaintenancePlannerGroup.MaintenancePlanningPlant
association [0..1] to I_Country as _ManufacturerCountry on $projection.ManufacturerCountry = _ManufacturerCountry.Country
association [0..1] to I_Currency as _Currency on $projection.Currency = _Currency.Currency
association [0..1] to I_TechnicalReport as _FunctionalLocationCodeCatalog on $projection.CatalogProfile = _FunctionalLocationCodeCatalog.CatalogProfile
association [0..1] to I_FuncLocationStructure as _FuncLocationStructure on $projection.FuncLocationStructure = _FuncLocationStructure.FuncLocationStructure
association [0..1] to I_FunctionalLocationLabel as _FunctionalLocationLabel on _FunctionalLocationLabel.FunctionalLocation = $projection.FunctionalLocation
association [0..1] to I_Material as _ConstructionMaterial on $projection.ConstructionMaterial = _ConstructionMaterial.Material
association [0..1] to I_UnitOfMeasure as _GrossWeightUnit on $projection.GrossWeightUnit = _GrossWeightUnit.UnitOfMeasure
association [0..1] to I_LinearAssetManagementData as _LinearAssetManagementData on $projection.FunctionalLocation = _LinearAssetManagementData.LinearDataObjectKey
and _LinearAssetManagementData.LinearDataObjectType = 'IF'
association [0..*] to I_StatusObjectStatus as _Status on $projection.MaintObjectInternalID = _Status.StatusObject
association [0..*] to I_PlantMaintenancePartner as _PlantMaintenancePartner on $projection.MaintObjectInternalID = _PlantMaintenancePartner.MaintObjectInternalID
-- Extension, do not expose as association:
association [0..1] to E_FunctionalLocation as _FunctionalLocationExtension on _FunctionalLocationExtension.FunctionalLocation = $projection.FunctionalLocation
{
@ObjectModel.text.association: '_FunctionalLocationText'
key iflot.tplnr as FunctionalLocation,
@ObjectModel.foreignKey.association: '_FuncLocationStructure'
iflot.tplkz as FuncLocationStructure,
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_FuncnlLocCatStdVH',
element: 'FunctionalLocationCategory' }
}]
@ObjectModel.foreignKey.association: '_FunctionalLocationCategory'
iflot.fltyp as FunctionalLocationCategory,
@ObjectModel.foreignKey.association: '_WorkCenter'
iflot.lgwid as WorkCenterInternalID,
@ObjectModel.foreignKey.association: '_WorkCenterType'
iflot.pm_objty as WorkCenterTypeCode,
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_TechnicalObjectTypeStdVH',
element: 'TechnicalObjectType' }
}]
@ObjectModel.foreignKey.association: '_TechnicalObjectType'
iflot.eqart as TechnicalObjectType,
@ObjectModel.foreignKey.association: '_LocationAccountAssignment'
iflot.iloan as MaintObjectLocAcctAssgmtNmbr,
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_MaterialStdVH',
element: 'Material' }
}]
@ObjectModel.foreignKey.association: '_ConstructionMaterial'
iflot.submt as ConstructionMaterial,
// Admin data
@Semantics.user.createdBy: true
iflot.ernam as CreatedByUser,
@Semantics.systemDate.createdAt : true
iflot.erdat as CreationDate,
@Semantics.user.lastChangedBy: true
iflot.aenam as LastChangedByUser,
@Semantics.systemDate.lastChangedAt: true
iflot.aedat as LastChangeDate,
iflot.herst as AssetManufacturerName,
iflot.typbz as ManufacturerPartTypeName,
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_MaintPlnrGrpStdVH',
element: 'MaintenancePlannerGroup' },
additionalBinding: [{ localElement: 'MaintenancePlanningPlant',
element: 'MaintenancePlanningPlant' }]
}]
@ObjectModel.foreignKey.association: '_MaintenancePlannerGroup'
iflot.ingrp as MaintenancePlannerGroup,
@ObjectModel.foreignKey.association: '_MaintenancePlanningPlant'
iflot.iwerk as MaintenancePlanningPlant,
@ObjectModel.foreignKey.association: '_FunctionalLocationCodeCatalog'
iflot.rbnr as CatalogProfile,
iflot.begru as AuthorizationGroup,
@ObjectModel.text.association: '_SupFunctionalLocationText'
iflot.tplma as SuperiorFunctionalLocation,
@ObjectModel.foreignKey.association: '_ManufacturerCountry'
iflot.herld as ManufacturerCountry,
iflot.baujj as ConstructionYear,
iflot.baumm as ConstructionMonth,
@Semantics.amount.currencyCode: 'Currency'
iflot.answt as AcquisitionValue,
@Semantics.currencyCode: true
iflot.waers as Currency,
iflot.ansdt as AcquisitionDate,
iflot.objnr as MaintObjectInternalID,
iflot.posnr as FuncnlLocPosInSuperiorTechObj,
iflot.mapar as ManufacturerPartNmbr,
iflot.serge as ManufacturerSerialNumber,
iflot.invnr as InventoryNumber,
@Semantics.quantity.unitOfMeasure: 'GrossWeightUnit'
iflot.brgew as GrossWeight,
@ObjectModel.foreignKey.association: '_GrossWeightUnit'
@Semantics.unitOfMeasure: true
iflot.gewei as GrossWeightUnit,
iflot.groes as SizeOrDimensionText,
iflot.datab as OperationStartDate,
@Semantics.systemDateTime.lastChangedAt: true
iflot.changeddatetime as LastChangeDateTime,
iflot.iequi as EquipmentInstallationIsAllowed,
iflot.einzl as OnePieceOfEquipmentIsAllowed,
// Propagate association
_LastChangedByUser,
_CreatedByUser,
_FunctionalLocationText,
_FunctionalLocationCategory,
_SuperiorFunctionalLocation,
_SupFunctionalLocationText,
_WorkCenterType,
_WorkCenter,
_TechnicalObjectType,
_LocationAccountAssignment,
_MaintenancePlanningPlant,
_MaintenancePlannerGroup,
_ManufacturerCountry,
_Currency,
_FunctionalLocationCodeCatalog,
_FuncLocationStructure,
_FunctionalLocationLabel,
_ConstructionMaterial,
_GrossWeightUnit,
_LinearAssetManagementData,
_Status,
_PlantMaintenancePartner
}
-
事务代码:IL03/IH06
功能位置结构和对应的计划工厂 -
视图结构:
字段名称 | 设备名称 |
---|---|
功能位置 | FUNCTIONALLOCATION |
结构标识 | FUNCLOCATIONSTRUCTURE |
功能位置种类 | FUNCTIONALLOCATIONCATEGORY |
工作中心 | WORKCENTERINTERNALID |
对象类型 | WORKCENTERTYPECODE |
对象类型 | TECHNICALOBJECTTYPE |
位置/科目分配 | MAINTOBJECTLOCACCTASSGMTNMBR |
构造类型 | CONSTRUCTIONMATERIAL |
创建人 | CREATEDBYUSER |
创建日期 | CREATIONDATE |
更改人 | LASTCHANGEDBYUSER |
更改日期 | LASTCHANGEDATE |
制造商 | ASSETMANUFACTURERNAME |
型号 | MANUFACTURERPARTTYPENAME |
计划人员组 | MAINTENANCEPLANNERGROUP |
计划工厂 | MAINTENANCEPLANNINGPLANT |
类别参数文件 | CATALOGPROFILE |
授权组 | AUTHORIZATIONGROUP |
上级功能位置 | SUPERIORFUNCTIONALLOCATION |
制造国家/地区 | MANUFACTURERCOUNTRY |
制造年份 | CONSTRUCTIONYEAR |
制造月份 | CONSTRUCTIONMONTH |
购置价值 | ACQUISITIONVALUE |
货币 | CURRENCY |
购置日期 | ACQUISITIONDATE |
对象编号 | MAINTOBJECTINTERNALID |
位置 | FUNCNLLOCPOSINSUPERIORTECHOBJ |
制造商零件号 | MANUFACTURERPARTNMBR |
制造商序列号 | MANUFACTURERSERIALNUMBER |
库存号 | INVENTORYNUMBER |
毛重 | GROSSWEIGHT |
重量单位 | GROSSWEIGHTUNIT |
大小/尺寸 | SIZEORDIMENSIONTEXT |
开始日期 | OPERATIONSTARTDATE |
时戳 | LASTCHANGEDATETIME |
设备安装 | EQUIPMENTINSTALLATIONISALLOWED |
单个安装 | ONEPIECEOFEQUIPMENTISALLOWED |
本文来自博客园,作者:观兴,转载请注明原文链接:https://www.cnblogs.com/guanxing/p/18635858