I_INHREPAIRITEMNOTE

CDS View

Notes for In-House Repair Item

I_INHREPAIRITEMNOTE is a CDS View in S/4HANA. Notes for In-House Repair Item. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
P_InhRepairItemNote view_entity from TRANSACTIONAL
@EndUserText.label: 'Notes for In-House Repair Item'
@VDM: {
  lifecycle.contract.type: #PUBLIC_LOCAL_API,
  viewType: #BASIC
}
@AccessControl: {
  authorizationCheck: #CHECK
}
@Metadata: {
  ignorePropagatedAnnotations: true
}
@ObjectModel: {
  usageType: {serviceQuality: #B, sizeCategory: #L, dataClass: #TRANSACTIONAL}
}
@ClientHandling: {
  algorithm: #SESSION_VARIABLE
}
@AbapCatalog: {
  sqlViewName: 'IINHREPAITEMNOTE',
  compiler.compareFilter: true,
  preserveKey: true
}

define view I_InhRepairItemNote
  as select from           stxh                as stxh

    inner join I_InHouseRepairItem as InHouseRepairItem on InHouseRepairItem.InHouseRepairItemCharUUID = stxh.tdname

    // We need an empty string field for the text. String fields cannot be created as "cast('' as systring)...".

    // Hence, we implement a dummy join that never returns a matching record but provides the string field (which then is null).

    left outer to one join crms4t_note_temp    as _InoteTemp        on _InoteTemp.id = stxh.tdname

  association [0..1] to I_TextObjectType     as _TextObjectType     on  $projection.TextObjectType     = _TextObjectType.TextObjectType
                                                                    and $projection.TextObjectCategory = _TextObjectType.TextObjectCategory

  association [0..1] to I_TextObjectCategory as _TextObjectCategory on  $projection.TextObjectCategory = _TextObjectCategory.TextObjectCategory

  association [0..1] to I_Language           as _Language           on  $projection.Language = _Language.Language

  association [0..1] to I_InHouseRepairItem  as _InHouseRepairItem  on  $projection.CustMgmtObjectType = _InHouseRepairItem.CustMgmtObjectType
                                                                    and $projection.InHouseRepair      = _InHouseRepairItem.InHouseRepair
                                                                    and $projection.InHouseRepairItem  = _InHouseRepairItem.InHouseRepairItem

  association [0..1] to I_InHouseRepair      as _InHouseRepair      on  $projection.CustMgmtObjectType = _InHouseRepair.CustMgmtObjectType
                                                                    and $projection.InHouseRepair      = _InHouseRepair.InHouseRepair
{
  key InHouseRepairItem.CustMgmtObjectType                                 as CustMgmtObjectType,

  key InHouseRepairItem.InHouseRepair                                      as InHouseRepair,

  key InHouseRepairItem.InHouseRepairItem                                  as InHouseRepairItem,

      @ObjectModel.foreignKey.association: '_TextobjectType'
  key stxh.tdid                                                            as TextObjectType,

      @Semantics.language: true
      @ObjectModel.foreignKey.association: '_Language'
  key stxh.tdspras                                                         as Language,

      InHouseRepairItem.InHouseRepairItemUUID                              as InHouseRepairItemUUID,

      @ObjectModel.foreignKey.association: '_Textobjectcategory'
      stxh.tdobject                                                        as TextObjectCategory,


      @Semantics.user.createdBy: true
      stxh.tdfuser                                                         as CreatedByUser,
      @Semantics.systemDate.createdAt: true
      stxh.tdfdate                                                         as CreationDate,
      @Semantics.systemTime.createdAt: true
      stxh.tdftime                                                         as CreationTime,

      @Semantics.user.lastChangedBy: true
      stxh.tdluser                                                         as LastChangedByUser,
      @Semantics.systemDate.lastChangedAt: true
      stxh.tdldate                                                         as LastChangeDate,
      @Semantics.systemTime.lastChangedAt: true
      stxh.tdltime                                                         as LastChangeTime,

      @Semantics.text:true
      _InoteTemp.text                                                      as InhRepairNoteText,
      // Responsible Employee

      _InHouseRepair.ResponsibleEmployee                                   as RespEmployeeBusinessPartnerId, // ResponsibleEmployee,


      // Organizational Data

      @Consumption.hidden: true
      _InHouseRepair.SalesOrganization                                     as SalesOrganization,
      @Consumption.hidden: true
      _InHouseRepair.DistributionChannel                                   as DistributionChannel,
      @Consumption.hidden: true
      _InHouseRepair.Division                                              as Division,
      @Consumption.hidden: true
      _InHouseRepair.SalesOffice                                           as SalesOffice,
      @Consumption.hidden: true
      _InHouseRepair.SalesGroup                                            as SalesGroup,

      // CRM Org units

      //these fields are only ON PREMISE

      @Feature: 'BF:API_FULLSCOPE'
      @Consumption.hidden: true
      _InHouseRepair.SalesOrganizationOrgUnitID                            as SalesOrganizationOrgUnitID,
      @Feature: 'BF:API_FULLSCOPE'
      @Consumption.hidden: true
      _InHouseRepair.SalesOfficeOrgUnitID                                  as SalesOfficeOrgUnitID,
      @Feature: 'BF:API_FULLSCOPE'
      @Consumption.hidden: true
      _InHouseRepair.SalesGroupOrgUnitID                                   as SalesGroupOrgUnitID,



      _TextObjectType,
      _TextObjectCategory,
      _Language,
      _InHouseRepairItem,
      _InHouseRepair
}
where
  stxh.tdobject = 'CRM_ORDERI'