首页 > 其他分享 >CDS标准视图:设备信息 I_EquipmentData

CDS标准视图:设备信息 I_EquipmentData

时间:2024-12-27 13:19:32浏览次数:8  
标签:ObjectModel CDS EquipmentTimeSeg Equipment 视图 ._ LocationAccountAssignment Equip

  • 视图名称:I_EquipmentData
  • 视图类型:基础视图
  • 视图代码:
点击查看代码
@EndUserText.label: 'Equipment Data'
@VDM.viewType: #COMPOSITE
@AbapCatalog.sqlViewName: 'IEQUIPMENTATTR'
@AbapCatalog.compiler.compareFilter: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.representativeKey: 'Equipment'

@AccessControl: {
  authorizationCheck: #CHECK,
  privilegedAssociations: ['_Location', '_Address', '_EquipmentHierarchyNode','_LOCATIONACCOUNTASSIGNMENT']
}

@Analytics: {
  dataCategory: #DIMENSION,
  dataExtraction: {
    enabled: true,
    delta.byElement: {
      name: 'LastChangeDateTime'
    }
  }
}

@ObjectModel: {
  usageType: {
    dataClass: #MASTER,
    serviceQuality: #C,
    sizeCategory: #L
  },
  supportedCapabilities: [ #EXTRACTION_DATA_SOURCE ]
}

@Metadata: {
  ignorePropagatedAnnotations,
  allowExtensions
}

// A more comprehensive view for equipment data, created as a replacement for BW extractor 0EQUIPMENT_ATTR

define view I_EquipmentData
  as select from I_EquipmentTimeSeg
    inner join   I_Equipment on I_Equipment.Equipment = I_EquipmentTimeSeg.Equipment
  association [0..1] to I_WorkCenterBySemanticKey as _MainWorkCenterBySemanticKey  on  $projection.MainWorkCenter      = _MainWorkCenterBySemanticKey.WorkCenter
                                                                                   and $projection.MainWorkCenterPlant = _MainWorkCenterBySemanticKey.Plant
  association [0..1] to I_WorkCenterBySemanticKey as _WorkCenterBySemanticKey      on  $projection.workcenter      = _WorkCenterBySemanticKey.WorkCenter
                                                                                   and $projection.WorkCenterPlant = _WorkCenterBySemanticKey.Plant
  association [0..1] to I_WorkCenter              as _WorkCenter                   on  $projection.WorkCenterInternalID = _WorkCenter.WorkCenterInternalID
                                                                                   and _WorkCenter.WorkCenterTypeCode   = 'A'
  association [0..1] to I_Plant                   as _WorkCenterPlant              on  $projection.WorkCenterPlant = _WorkCenterPlant.Plant
  association [0..1] to I_FunctionalLocationData  as _FunctionalLocation           on  $projection.functionallocation = _FunctionalLocation.FunctionalLocation
  association [0..1] to I_Indicator               as _EquipmentIsMarkedForDeletion on  $projection.EquipmentIsMarkedForDeletion = _EquipmentIsMarkedForDeletion.IndicatorValue
  association [0..*] to I_EquipmentHierarchyNode  as _EquipmentHierarchyNode       on  $projection.Equipment = _EquipmentHierarchyNode.Equipment
  association [0..1] to I_WBSElementBasicData      as _WBSElementBasicData      on  $projection.WBSElementInternalID = _WBSElementBasicData.WBSElementInternalID
  association [0..*] to I_EquipmentText            as _EquipmentText            on  $projection.Equipment = _EquipmentText.Equipment
    -- Extensions, do not expose as association:
  association [0..1] to E_Equipment as _EquipmentExtension on _EquipmentExtension.Equipment = $projection.Equipment
{
      @ObjectModel.text.association: '_EquipmentText'
      @ObjectModel.hierarchy.association: '_EquipmentHierarchyNode'
  key I_EquipmentTimeSeg.Equipment,
      @Semantics.businessDate.to: true
  key I_EquipmentTimeSeg.ValidityEndDate,
      I_EquipmentTimeSeg.EquipUsagePeriodSequenceNumber,

      /* Fields, as they appear in InfoObject 0EQUIPMENT */
      @ObjectModel.foreignKey.association: '_ABCIndicator'
      I_EquipmentTimeSeg._LocationAccountAssignment.ABCIndicator,
      @Semantics.amount.currencyCode: 'Currency'
      I_Equipment.AcquisitionValue,
      @ObjectModel.foreignKey.association: '_Address'
      I_EquipmentTimeSeg._LocationAccountAssignment.AddressID,
      @ObjectModel.foreignKey.association: '_MasterFixedAsset'
      I_EquipmentTimeSeg._LocationAccountAssignment.MasterFixedAsset,
      @ObjectModel.foreignKey.association: '_CompanyCode'
      I_EquipmentTimeSeg._LocationAccountAssignment.CompanyCode,
      @ObjectModel.foreignKey.association: '_CostCenter'
      I_EquipmentTimeSeg._LocationAccountAssignment.CostCenter,
      @ObjectModel.foreignKey.association: '_ControllingArea'
      I_EquipmentTimeSeg._LocationAccountAssignment.ControllingArea,
      @Semantics.currencyCode:true
      I_Equipment.Currency,
      I_Equipment.OperationStartDate,
      @ObjectModel.foreignKey.association: '_TechnicalObjectType'
      I_Equipment.TechnicalObjectType,
      @ObjectModel.foreignKey.association: '_FunctionalLocation'
      I_EquipmentTimeSeg._LocationAccountAssignment.FunctionalLocation,
      I_Equipment.InventoryNumber,
      @ObjectModel.foreignKey.association: '_Location'
      I_EquipmentTimeSeg._LocationAccountAssignment.AssetLocation,
      @ObjectModel.foreignKey.association: '_MaintenancePlant'
      I_EquipmentTimeSeg._LocationAccountAssignment.MaintenancePlant,
      I_EquipmentTimeSeg._LocationAccountAssignment.AssetRoom,
      @ObjectModel.foreignKey.association: '_Material'
      I_Equipment.Material,
      @ObjectModel.foreignKey.association: '_MaintenancePlanningPlant'
      I_EquipmentTimeSeg.MaintenancePlanningPlant,
      @ObjectModel.foreignKey.association: '_PlantSection'
      I_EquipmentTimeSeg._LocationAccountAssignment.PlantSection,
      I_EquipmentTimeSeg.MaintenancePlannerGroup,
      cast( I_EquipmentTimeSeg._LocationAccountAssignment._WBSElementBasicData.WBSElement as ps_posid preserving type )                                                                                                                                                                      as WBSElement,
      @ObjectModel.foreignKey.association: '_EquipmentCategory'
      I_Equipment.EquipmentCategory,
      @Semantics.systemDate.createdAt: true
      I_Equipment.CreationDate,
      @ObjectModel.foreignKey.association: '_Plant'
      I_Equipment.Plant,
      @ObjectModel.foreignKey.association: '_MainWorkCenter'
      I_EquipmentTimeSeg.WorkCenterInternalID                                                                                                                                                                                                                                                as MainWorkCenterInternalID,
      @ObjectModel.foreignKey.association: '_MainWorkCenterBySemanticKey'
      cast( I_EquipmentTimeSeg._WorkCenter.WorkCenter as gewrk preserving type )                                                                                                                                                                                                             as MainWorkCenter,
      @ObjectModel.foreignKey.association: '_MainWorkCenterPlant'
      cast( I_EquipmentTimeSeg._WorkCenter.Plant as wergw preserving type )                                                                                                                                                                                                                  as MainWorkCenterPlant,
      @ObjectModel.foreignKey.association: '_SettlementOrder'
      I_EquipmentTimeSeg._LocationAccountAssignment.SettlementOrder,
      @ObjectModel.foreignKey.association: '_WorkCenter'
      I_EquipmentTimeSeg._LocationAccountAssignment.WorkCenterInternalID,
      @ObjectModel.foreignKey.association: '_WorkCenterBySemanticKey'
      I_EquipmentTimeSeg._LocationAccountAssignment._WorkCenter.WorkCenter,
      @ObjectModel.foreignKey.association: '_WorkCenterPlant'
      I_EquipmentTimeSeg._LocationAccountAssignment._WorkCenter.Plant                                                                                                                                                                                                                        as WorkCenterPlant,

      /* Additional fields */
      /* If record is latest record (today's), then the timestamp comes from equipment.
         This is because timestamp on equipment catches changes done to EQUI AND EQUZ. Example: AcquisitionValue changed
         If record is an old record (i.e. its validity end date is not in the future), then that time segments timestamp is used.
         This will also prevent any later changes of EQUI to be detected by ODP extractor. However this was discussed to be intended. */
      @Semantics.systemDateTime.lastChangedAt: true
      case when I_EquipmentTimeSeg.ValidityEndDate = '99991231' then I_Equipment.LastChangeDateTime
           else I_EquipmentTimeSeg.LastChangeDateTime end                                                                                                                                                                                                                                    as LastChangeDateTime,

      @ObjectModel.foreignKey.association: '_EquipmentIsMarkedForDeletion'
      --@Semantics.booleanIndicator: true
      cast( case when _Status[ StatusCode = 'I0076' and StatusIsInactive = '' ].StatusCode is not null then 'X' else ' ' end as eam_is_deleted preserving type )                                                                                                                             as EquipmentIsMarkedForDeletion,

      //I_EquipmentTimeSeg
      I_EquipmentTimeSeg.NextEquipUsagePeriodSqncNmbr,
      I_EquipmentTimeSeg.MaintObjectLocAcctAssgmtNmbr,
      @ObjectModel.foreignKey.association: '_WorkCenterType'
      I_EquipmentTimeSeg.WorkCenterTypeCode,
      I_EquipmentTimeSeg.CatalogProfile,
      I_EquipmentTimeSeg.SuperordinateEquipment,
      I_EquipmentTimeSeg.TechnicalObjectSortCode,
      @ObjectModel.foreignKey.association: '_ConstructionMaterial'
      I_EquipmentTimeSeg.ConstructionMaterial,
      @Semantics.businessDate.from: true
      I_EquipmentTimeSeg.ValidityStartDate,
      I_EquipmentTimeSeg.ValidityEndTime,
      I_EquipmentTimeSeg.ManufacturerPartNmbr,

      //I_Equipment
      @ObjectModel.foreignKey.association: '_Division'
      I_Equipment.Division,
      @ObjectModel.foreignKey.association: '_StorageLocation'
      I_Equipment.StorageLocation,
      I_Equipment.AssetManufacturerName,
      I_Equipment.ManufacturerPartTypeName,
      @Semantics.address.country: true
      @ObjectModel.foreignKey.association: '_ManufacturerCountry'
      I_Equipment.ManufacturerCountry,
      I_Equipment.ConstructionYear,
      I_Equipment.ConstructionMonth,
      I_Equipment.AcquisitionDate,
      I_Equipment.MaintObjectInternalID,
      I_Equipment.SerialNumber,
      @ObjectModel.foreignKey.association: '_Customer'
      I_Equipment.Customer,
      I_Equipment.AuthorizationGroup,
      @Semantics.quantity.unitOfMeasure: 'GrossWeightUnit'
      I_Equipment.GrossWeight,
      @ObjectModel.foreignKey.association: '_GrossWeightUnit'
      @Semantics.unitOfMeasure: true
      I_Equipment.GrossWeightUnit,
      I_Equipment.SizeOrDimensionText,
      I_Equipment.Batch,
      @ObjectModel.foreignKey.association: '_Supplier'
      I_Equipment.Supplier,

      //I_LocationAccountAssignment
      _LocationAccountAssignment.MaintObjectFreeDefinedAttrib,
      _LocationAccountAssignment.BusinessArea,
      @ObjectModel.foreignKey.association: '_WBSElementBasicData'
      cast( I_EquipmentTimeSeg._LocationAccountAssignment.WBSElementInternalID as ps_psp_pnr preserving type ) as WBSElementInternalID,
      I_EquipmentTimeSeg._LocationAccountAssignment.FixedAsset,

      //I_LinearAssetManagementData
      cast( cast( I_Equipment._LinearAssetManagementData.LinearDataStartPoint as abap.dec(11, 3) ) as eaml_start_point )                                                                                                                                                                         as LinearDataStartPoint,
      cast( cast( I_Equipment._LinearAssetManagementData.LinearDataEndPoint as abap.dec(11, 3) ) as eaml_end_point )                                                                                                                                                                             as LinearDataEndPoint,
      @Semantics.quantity.unitOfMeasure: 'LinearDataUnitOfMeasure'
      I_Equipment._LinearAssetManagementData.LinearDataLength,
      @Semantics.unitOfMeasure: true
      I_Equipment._LinearAssetManagementData.LinearDataUnitOfMeasure,

      /* Associations */
      //I_EquipmentTimeSeg
      I_EquipmentTimeSeg._WorkCenter                                                                                                                                                                                                                                                         as _MainWorkCenter,
      I_EquipmentTimeSeg._Equipment,
      I_EquipmentTimeSeg._ConstructionMaterial,
      I_EquipmentTimeSeg._LocationAccountAssignment,
      I_EquipmentTimeSeg._MaintenancePlanningPlant,
      I_EquipmentTimeSeg._WorkCenterType,
      I_EquipmentTimeSeg._WorkCenter._Plant                                                                                                                                                                                                                                                  as _MainWorkCenterPlant,

      //I_Equipment
      I_Equipment._ManufacturerCountry,
      I_Equipment._StorageLocation,
      I_Equipment._Division,
      I_Equipment._EquipmentCategory,
      I_Equipment._Material,
      I_Equipment._Plant,
      I_Equipment._Currency,
      I_Equipment._TechnicalObjectType,
      I_Equipment._GrossWeightUnit,
      I_Equipment._Customer,
      I_Equipment._Supplier,

      //I_LocationAccountAssignment
      I_EquipmentTimeSeg._LocationAccountAssignment._ABCIndicator,
      I_EquipmentTimeSeg._LocationAccountAssignment._Address,
      I_EquipmentTimeSeg._LocationAccountAssignment._CompanyCode,
      I_EquipmentTimeSeg._LocationAccountAssignment._ControllingArea,
      I_EquipmentTimeSeg._LocationAccountAssignment._CostCenter,
      I_EquipmentTimeSeg._LocationAccountAssignment._Location,
      I_EquipmentTimeSeg._LocationAccountAssignment._MaintenancePlant,
      I_EquipmentTimeSeg._LocationAccountAssignment._MasterFixedAsset,
      I_EquipmentTimeSeg._LocationAccountAssignment._PlantSection,
      I_EquipmentTimeSeg._LocationAccountAssignment._SettlementOrder,
      _WBSElementBasicData,

      _WorkCenterBySemanticKey,
      _WorkCenterPlant,
      _WorkCenter,
      _MainWorkCenterBySemanticKey,
      _FunctionalLocation,
      _EquipmentHierarchyNode,
      _EquipmentIsMarkedForDeletion,
      _EquipmentText
}
where
  I_EquipmentTimeSeg.EquipUsagePeriodSequenceNumber = '001'
  • 事务代码:
    IE03/IH08
    设备主数据的位置、组织结构、结构视图信息

  • 视图结构:

字段名称 设备名称
设备 EQUIPMENT
有效期至 VALIDITYENDDATE
连续号码 EQUIPUSAGEPERIODSEQUENCENUMBER
ABC 标识 ABCINDICATOR
购置价值 ACQUISITIONVALUE
地址编号 ADDRESSID
资产 MASTERFIXEDASSET
公司代码 COMPANYCODE
成本中心 COSTCENTER
成本控制范围 CONTROLLINGAREA
货币 CURRENCY
开始日期 OPERATIONSTARTDATE
对象类型 TECHNICALOBJECTTYPE
功能位置 FUNCTIONALLOCATION
库存号 INVENTORYNUMBER
位置 ASSETLOCATION
维护工厂 MAINTENANCEPLANT
房间 ASSETROOM
物料 MATERIAL
计划工厂 MAINTENANCEPLANNINGPLANT
厂区 PLANTSECTION
计划人员组 MAINTENANCEPLANNERGROUP
WBS 要素 WBSELEMENT
设备种类 EQUIPMENTCATEGORY
创建日期 CREATIONDATE
工厂 PLANT
工作中心 MAINWORKCENTERINTERNALID
主工作中心 MAINWORKCENTER
工厂工作中心 MAINWORKCENTERPLANT
结算订单 SETTLEMENTORDER
PP工作中心 WORKCENTERINTERNALID
工作中心 WORKCENTER
工厂 WORKCENTERPLANT
时戳 LASTCHANGEDATETIME
已删除 EQUIPMENTISMARKEDFORDELETION
下一个使用期间 NEXTEQUIPUSAGEPERIODSQNCNMBR
位置/科目分配 MAINTOBJECTLOCACCTASSGMTNMBR
对象类型 WORKCENTERTYPECODE
类别参数文件 CATALOGPROFILE
上级设备 SUPERORDINATEEQUIPMENT
技术标识号 TECHNICALOBJECTSORTCODE
构造类型 CONSTRUCTIONMATERIAL
有效期自 VALIDITYSTARTDATE
时间 VALIDITYENDTIME
制造商零件号 MANUFACTURERPARTNMBR
产品组 DIVISION
地点 STORAGELOCATION
制造商 ASSETMANUFACTURERNAME
型号 MANUFACTURERPARTTYPENAME
制造国家/地区 MANUFACTURERCOUNTRY
制造年份 CONSTRUCTIONYEAR
制造月份 CONSTRUCTIONMONTH
购置日期 ACQUISITIONDATE
对象编号 MAINTOBJECTINTERNALID
序列号 SERIALNUMBER
当前客户 CUSTOMER
授权组 AUTHORIZATIONGROUP
重量 GROSSWEIGHT
重量单位 GROSSWEIGHTUNIT
大小/尺寸 SIZEORDIMENSIONTEXT
批次 BATCH
供应商 SUPPLIER
分类字段 MAINTOBJECTFREEDEFINEDATTRIB
业务范围 BUSINESSAREA
WBS 要素 WBSELEMENTINTERNALID
子编号 FIXEDASSET
起点 LINEARDATASTARTPOINT
终点 LINEARDATAENDPOINT
LINEARDATALENGTH
计量单位 LINEARDATAUNITOFMEASURE

标签:ObjectModel,CDS,EquipmentTimeSeg,Equipment,视图,._,LocationAccountAssignment,Equip
From: https://www.cnblogs.com/guanxing/p/18635476

相关文章

  • 日期迁移视图
    视图名称:I_ShiftedCalendarDate视图类型:带参数的视图时间期间偏移量单位(P_TimePeriodOffsetUnit):D代表天W代表周M代表月Q代表季Y代表年期间偏移量持续时间(P_TimePeriodOffsetDuration):对应数量视图代码:点击查看代码@AbapCatalog:{sqlViewName:'IFISCALDATE'......
  • Qt 模型Model/视图View/代理Delegate
    一、模型/视图/代理架构简介1、应用程序中往往要存储大量的数据,并对它们进行处理,然后可以通过各种形式显示给用户,用户需要时还可以对数据进行编辑。2、Qt中的模型/视图架构就是用来实现大量数据的存储、处理及其显示的。3、MVC设计模式:(1)、模型(Model)是应用对象,用......
  • ORACLE和会话相关的视图
    ORACLE和会话相关的视图1. v$session和v$session_waitv$session视图记录了当前连接Session的信息,这些信息包括用户名、连接主机、Session正在执行的SQL的SQL_ADDRESS、SQL_HASH_VALUE等,非常详尽。v$session_wait则记录了当前连接session正在等待的资源信息。在Oracle10g中,Ora......
  • 二叉树的右视图(层次遍历)
    给定一个二叉树的 根节点 root,想象自己站在它的右侧,按照从顶部到底部的顺序,返回从右侧所能看到的节点值。 示例1:输入:root=[1,2,3,null,5,null,4]输出:[1,3,4]解释:示例2:输入:root=[1,2,3,4,null,null,null,5]输出:[1,3,4,5]解释:示例3:输入:root=[1,null,3......
  • Loadrunner12 Controller 运行时不显示具体信息可视化的表格视图 解决方案
     loadrunnercontroller点击run运行时,下方的窗口没有显示表格视图,无法实现可查看资源的实时运行情况 实际上,左侧已经显示设计场景在运行了,蓝色部分为可查看部分 解决方案:1.点击view-viewgraphs-showxxgraphs;选择需要显示几个表格形式(这里我选择4个) 2.......
  • 【Python GUI 编程】tkinter :Ttk 树视图 Treeview
    在本文中,将介绍TkinterTreeview树视图小部件以及如何使用它来显示表格和分层数据。Tkinter中,没有专门的表格部件,Treeview可以很好地显示表格数据,支持多列显示。要创建Treeview树视图小部件,可以使用以下构造函数:tree=ttk.Treeview(master,**options)Treeview显示表......
  • Vue.js组件开发-路由与视图切换
    在Vue.js中,路由与视图切换是通过VueRouter来实现。VueRouter提供了声明式的路由配置、嵌套路由、动态路由匹配、路由参数、路由守卫等功能。基本概念‌路由‌:定义URL路径和组件之间的映射关系。‌视图‌:与特定路由相关联的组件,当用户访问某个路由时,对应的视图组件会被渲......
  • AI绘画中13个常用视图关键词,学完就能用!(稳定控图)
    哈喽这里是海绵今天给大家带来AI绘画种13个常用的视图关键词,学完就能用,有的时候画面不受控制,生的图不好看,跟你用什么视角有很大的关系!胡乱随机生图,一个是你画面不好看,二是画面达不到你想要的效果,掌握这些基础的关键词可以让你的有很大提升!要想要AI更听话,首先要学会一些基础......
  • Springmvc进一步学习(springmvc-mybatis):跳转不经过视图解析器、controller如何保存数
    上一章的springmvc回顾内容:1.springmvc框架:主要作用:处理客户的请求,并处理数据,以及响应客户。2.springmvc搭建流程:  [1]引入springmvc依赖。spring-webmvc  [2]编写springmvc配置文件。   1.包扫描<context:component-scanbasepackage=""/>   ......
  • GA/T1400视图库平台EasyCVR如何计算监控设备所需的带宽来选择PoE交换机?
    在构建一个高效、稳定的监控系统时,选择合适的PoE交换机以满足监控设备所需的带宽是至关重要的一步。带宽不足可能导致视频流卡顿、延迟甚至数据丢失,而带宽过剩则可能导致不必要的成本浪费。因此,精确计算监控设备所需的带宽对于确保监控系统的可靠性和经济性至关重要。以下是详细......