I_EQUIPMENTDATA

CDS View

Equipment Data

I_EQUIPMENTDATA is a CDS View in S/4HANA. Equipment Data. It contains 2 fields. 4 CDS views read from this table.

CDS Views using this table (4)

ViewTypeJoinVDMDescription
A_EquipmentPartner view_entity from COMPOSITE Equipment Partner Functions
A_EquipmentWarrantyAssgmt view_entity from COMPOSITE Equipment Warranty
R_EquipmentPartnerTP view_entity from TRANSACTIONAL Equipment Partner Functions
R_EquipmentWrntyAssgmtTP view_entity from TRANSACTIONAL Equipment Warranty

Fields (2)

KeyField CDS FieldsUsed in Views
KEY Equipment Equipment 4
ValidityEndDate ValidityEndDate 4
@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',
                           '_Address2'] // 2302 CE - Consider I_Address_2

}

@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'

      @ObjectModel.foreignKey.association: '_Address2' //2302 CE - Consider I_Address_2

      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,
      //Adding EndOfUseDate field - 2308

      I_Equipment.EquipmentEndOfUseDate,

      //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,
      @API.element.releaseState: #DEPRECATED
      @API.element.successor: '_Address2'
      I_EquipmentTimeSeg._LocationAccountAssignment._Address,
      I_EquipmentTimeSeg._LocationAccountAssignment._Address2, //Added : 2302 CE - Consider fields from I_Address_2

      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'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_EQUIPMENT",
"I_EQUIPMENTTIMESEG",
"I_LINEARASSETMANAGEMENTDATA",
"I_LOCATIONACCOUNTASSIGNMENT",
"I_STATUSOBJECTSTATUS",
"I_WBSELEMENTBASICDATA",
"I_WORKCENTER"
],
"ASSOCIATED":
[
"E_EQUIPMENT",
"I_ABCINDICATOR",
"I_ADDRESS",
"I_ADDRESSDEFAULTREPRESENTATION",
"I_COMPANYCODE",
"I_CONTROLLINGAREA",
"I_COSTCENTER",
"I_COUNTRY",
"I_CURRENCY",
"I_CUSTOMER",
"I_DIVISION",
"I_EQUIPMENT",
"I_EQUIPMENTCATEGORY",
"I_EQUIPMENTHIERARCHYNODE",
"I_EQUIPMENTTEXT",
"I_FUNCTIONALLOCATIONDATA",
"I_INDICATOR",
"I_LOCATION",
"I_LOCATIONACCOUNTASSIGNMENT",
"I_MAINTENANCEPLANPLANT",
"I_MASTERFIXEDASSET",
"I_MATERIAL",
"I_ORDER",
"I_PLANT",
"I_PLANTSECTION",
"I_PRODUCT",
"I_STORAGELOCATION",
"I_SUPPLIER",
"I_TECHNICALOBJECTTYPE",
"I_UNITOFMEASURE",
"I_WBSELEMENTBASICDATA",
"I_WORKCENTER",
"I_WORKCENTERBYSEMANTICKEY",
"I_WORKCENTERTYPE"
],
"BASE":
[
"I_EQUIPMENT",
"I_EQUIPMENTTIMESEG",
"I_LOCATIONACCOUNTASSIGNMENT",
"I_WORKCENTER"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/