C_HzdsSubstInvtrySubstProposal

DDL: C_HZDSSUBSTINVTRYSUBSTPROPOSAL Type: view CONSUMPTION Package: EHHSS_CNS_HSI

HSI: Items Consumption View

C_HzdsSubstInvtrySubstProposal is a Consumption CDS View that provides data about "HSI: Items Consumption View" in SAP S/4HANA. It reads from 2 data sources (I_HzdsSubstInventoryDraft, P_HzdsSubstInvtrySubstProposal) and exposes 28 fields with key fields HzdsSubstInventoryUUID, ChemicalUUID. It has 3 associations to related views. Part of development package EHHSS_CNS_HSI.

Data Sources (2)

SourceAliasJoin Type
I_HzdsSubstInventoryDraft _HzdsSubstInventory inner
P_HzdsSubstInvtrySubstProposal P_HzdsSubstInvtrySubstProposal from

Parameters (2)

NameTypeDefault
P_StartDate budat
P_EndDate budat

Associations (3)

CardinalityTargetAliasCondition
[0..1] I_Chemical _Chemical _HzdsSubstInvtrySubstProposal.ChemicalUUID = _Chemical.ChemicalUUID and _Chemical.RevisionStartDate <= $session.system_date and _Chemical.RevisionEndDate >= $session.system_date
[1..1] I_EHSLocation _EHSLocation _HzdsSubstInventory.EHSLocationUUID = _EHSLocation.EHSLocationUUID and _EHSLocation.RevisionStartDate <= $session.system_date and _EHSLocation.RevisionEndDate > $session.system_date
[0..*] I_ChemicalNameText _ChemicalNameText $projection.ChemicalUUID = _ChemicalNameText.ChemicalUUID and $projection.chemicalrevisionuuid = _ChemicalNameText.ChemicalRevisionUUID

Annotations (19)

NameValueLevelField
EndUserText.label HSI: Items Consumption View view
AbapCatalog.sqlViewName CHASSUBINVPROP view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #NOT_REQUIRED view
VDM.viewType #CONSUMPTION view
ClientHandling.algorithm #SESSION_VARIABLE view
DataAging.noAgingRestriction true view
ObjectModel.createEnabled true view
ObjectModel.updateEnabled true view
ObjectModel.deleteEnabled true view
ObjectModel.representativeKey HzdsSubstInventoryUUID view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.serviceQuality #D view
Search.searchable true view
Metadata.ignorePropagatedAnnotations false view
Metadata.allowExtensions true view

Fields (28)

KeyFieldSource TableSource FieldDescription
KEY HzdsSubstInventoryUUID _HzdsSubstInvtrySubstProposal HzdsSubstInventoryUUID
KEY ChemicalUUID _HzdsSubstInvtrySubstProposal ChemicalUUID
HzdsSubstInventoryItemUUID
ChemicalRevisionUUID _Chemical ChemicalRevisionUUID
ChemicalID
CreationDateTime _HzdsSubstInvtrySubstProposal CreationDateTime Created On
LastGoodsMovementPostingDate _HzdsSubstInvtrySubstProposal LastGoodsMovementPostingDate Last Movement
CASNumber
NameOfChemical
FactoryJargonForSubstance FactoryJargonForSubstance
SubstYearlyTonnageQty SubstYearlyTonnageQty Yearly Tonnage Qty
SubstYearlyTonnageQtyUnit
SubstYearlyTonnageBandName
SubstHoldupQty SubstHoldupQty Holdup Qty
SubstHoldupQtyUnit
SubstHoldupTonnageBandName
GHSHazardStatementCodes
GHSHazardClassCategoryNames GHS Classifications
HzdsSubstInvtryItemIsFinished HzdsSubstInvtryItemIsFinished
HzdsSubstInvtryItemIsPrinted HzdsSubstInvtryItemIsPrinted
EHSLocationType
EHSLocationStatus
EHSLocationAuthorizationGroup
Plant
CostCenter
CompanyCode
BusinessArea _EHSLocation BusinessArea
_ChemicalNameText
@EndUserText.label: 'HSI: Items Consumption View'

@AbapCatalog:
{
  sqlViewName: 'CHASSUBINVPROP',
  compiler.compareFilter: true,
  preserveKey: true
}

@AccessControl: { authorizationCheck: #CHECK,
                  personalData.blocking: #NOT_REQUIRED }

@VDM.viewType: #CONSUMPTION

@ClientHandling.algorithm: #SESSION_VARIABLE
@DataAging.noAgingRestriction:true

@ObjectModel:
{

  createEnabled: true,
  updateEnabled: true,
  deleteEnabled: true,

  representativeKey: 'HzdsSubstInventoryUUID',
  semanticKey:  [ 'ChemicalUUID' ],
  usageType:
  {
    dataClass: #MIXED,
    sizeCategory: #XXL,
    serviceQuality: #D
  }
}

@Search.searchable : true

@Metadata: { ignorePropagatedAnnotations: false,
             allowExtensions:true }

define view C_HzdsSubstInvtrySubstProposal
  with parameters
    P_StartDate : budat,
    P_EndDate   : budat

  as select from           P_HzdsSubstInvtrySubstProposal( P_StartDate : $parameters.P_StartDate, P_EndDate : $parameters.P_EndDate ) as _HzdsSubstInvtrySubstProposal

  //  as select from  ZJB_C_HSIUsedChemicals2 as _HzdsSubstInvtrySubstProposal


    inner join             I_HzdsSubstInventoryDraft                                                                                  as _HzdsSubstInventory     on _HzdsSubstInvtrySubstProposal.HzdsSubstInventoryUUID = _HzdsSubstInventory.HzdsSubstInventoryUUID

    left outer to one join I_HzdsSubstInventoryItemDraft                                                                              as _HzdsSubstInventoryItem on  _HzdsSubstInvtrySubstProposal.HzdsSubstInventoryUUID = _HzdsSubstInventoryItem.HzdsSubstInventoryUUID
                                                                                                                                                                 and _HzdsSubstInvtrySubstProposal.ChemicalUUID           = _HzdsSubstInventoryItem.ChemicalUUID

  association [0..1] to I_Chemical         as _Chemical         on  _HzdsSubstInvtrySubstProposal.ChemicalUUID = _Chemical.ChemicalUUID
                                                                and _Chemical.RevisionStartDate                <= $session.system_date
                                                                and _Chemical.RevisionEndDate                  >= $session.system_date

  association [1..1] to I_EHSLocation      as _EHSLocation      on  _HzdsSubstInventory.EHSLocationUUID = _EHSLocation.EHSLocationUUID
                                                                and _EHSLocation.RevisionStartDate      <= $session.system_date
                                                                and _EHSLocation.RevisionEndDate        > $session.system_date



  association [0..*] to I_ChemicalNameText as _ChemicalNameText on  $projection.ChemicalUUID         = _ChemicalNameText.ChemicalUUID
                                                                and $projection.chemicalrevisionuuid = _ChemicalNameText.ChemicalRevisionUUID

  //  association [0..*] to I_UnitOfMeasureText as _SubstYearlyTonnageQtyUnitText on  $projection.SubstYearlyTonnageQtyUnit = _SubstYearlyTonnageQtyUnitText.UnitOfMeasure

  //  association [0..*] to I_UnitOfMeasureText            as _SubstHoldupQtyUnitText        on  $projection.SubstYearlyTonnageQtyUnit = _SubstHoldupQtyUnitText.UnitOfMeasure


{
      @ObjectModel: { readOnly: true,
                      filter.enabled: false,
                      sort.enabled: false }
  key _HzdsSubstInvtrySubstProposal.HzdsSubstInventoryUUID,

      @Consumption.valueHelpDefinition: [{
        entity: { name: 'C_ChemicalSearchVH',
                  element: 'ChemicalUUID' },
        additionalBinding: [{  element : 'NameOfChemical' ,
                               localElement : 'NameOfChemical' }],
        label: 'Chemical UUID'
        }]
      @ObjectModel: { text: { association: '_ChemicalNameText',
                             control:     #ASSOCIATED_TEXT_UI_HIDDEN },
                      filter.enabled: false,
                      sort.enabled: false }
  key _HzdsSubstInvtrySubstProposal.ChemicalUUID,

      @ObjectModel: { filter.enabled: false,
                      sort.enabled: false }
      ''                                                                                                          as  HzdsSubstInventoryItemUUID,

      @ObjectModel: { readOnly: true,
                      filter.enabled: false,
                      sort.enabled: false }
      _Chemical.ChemicalRevisionUUID,

      @ObjectModel: { readOnly: true,
                      filter.enabled: true,
                      sort.enabled: true }
      @Search: { defaultSearchElement: true,
                 ranking: #MEDIUM,
                 fuzzinessThreshold: 0.7 }
      _Chemical._ChemicalRoot.ChemicalID,

      @ObjectModel: { readOnly: true,
                      filter.enabled: false,
                      sort.enabled: true }
      @Search: { defaultSearchElement: true,
                 ranking: #MEDIUM,
                 fuzzinessThreshold: 0.7 }
      @EndUserText.label: 'Created On'
      _HzdsSubstInvtrySubstProposal.CreationDateTime,

      @ObjectModel: { readOnly: true,
                      filter.enabled: false,
                      sort.enabled: false }
      @Search: { defaultSearchElement: true,
                 ranking: #MEDIUM,
                 fuzzinessThreshold: 0.7 }
      @EndUserText.label: 'Last Movement'
      _HzdsSubstInvtrySubstProposal.LastGoodsMovementPostingDate,


      @ObjectModel: { readOnly: true,
                      filter.enabled: true,
                      sort.enabled: true }
      @Search: { defaultSearchElement: true,
                 ranking: #MEDIUM,
                 fuzzinessThreshold: 0.7 }
      _Chemical._ChemicalBasicInfo.CASNumber                                                                      as  CASNumber,

      @Search: { defaultSearchElement: true,
                 ranking: #HIGH,
                 fuzzinessThreshold: 0.7,
                 fulltextIndex: { required: true } }
      @ObjectModel: { readOnly: true,
                      filter.enabled: true,
                      sort.enabled: true }
      //_Chemical._ChemicalName[1: Language = $session.system_language ].NameOfChemical,

      _Chemical._ChemicalBasicInfo._ChemicalName[1: Language = $session.system_language ].NameOfChemical,

      @Search: { defaultSearchElement: true,
                 ranking: #MEDIUM,
                 fuzzinessThreshold: 0.7 }
      FactoryJargonForSubstance,

      @ObjectModel: { filter.enabled: false,
                      sort.enabled: false }
      @Semantics.quantity.unitOfMeasure : 'SubstYearlyTonnageQtyUnit'
      @EndUserText.label: 'Yearly Tonnage Qty'
      SubstYearlyTonnageQty,

      @Semantics.unitOfMeasure: true
      @Consumption.valueHelpDefinition: [{
        entity: { name: 'C_HzdsSubstInventoryUoMVH',
                  element: 'UnitOfMeasure' },
        label: 'Unit Of Measure'
      }]
      @ObjectModel: { filter.enabled: false,
                      sort.enabled: false }
      cast ( '' as ehhss_hsi_yearly_tonnage_unit )                                                                as  SubstYearlyTonnageQtyUnit,

      @ObjectModel: { readOnly: true,
                     virtualElement: true,
                     virtualElementCalculatedBy: 'ABAP:CL_EHHSS_HSI_ITM_SADL_EXIT' }
      cast( '' as ehhss_hsi_tonnage_band_name )                                                                   as  SubstYearlyTonnageBandName,

      @Semantics.quantity.unitOfMeasure : 'SubstHoldupQtyUnit'
      @EndUserText.label: 'Holdup Qty'
      @ObjectModel: { filter.enabled: false,
                      sort.enabled: false }
      SubstHoldupQty,

      @Semantics.unitOfMeasure: true
      @Consumption.valueHelpDefinition: [{
        entity: { name: 'C_HzdsSubstInventoryUoMVH',
                  element: 'UnitOfMeasure' },
        label: 'Unit Of Measure'
      }]
      @ObjectModel: { filter.enabled: false,
                      sort.enabled: false }
      cast ('' as ehhss_hsi_holdup_unit )                                                                         as  SubstHoldupQtyUnit,

      @ObjectModel: { readOnly: true,
                      virtualElement: true,
                      virtualElementCalculatedBy: 'ABAP:CL_EHHSS_HSI_ITM_SADL_EXIT' }
      cast( '' as ehhss_hsi_tonnage_band_name )                                                                   as  SubstHoldupTonnageBandName,

      @ObjectModel: { readOnly: true,
                      virtualElement: true,
                      virtualElementCalculatedBy: 'ABAP:CL_EHHSS_HSI_ITM_SADL_EXIT' }
      cast( '' as ehfnd_hazard_statement_conct_t  )                                                               as  GHSHazardStatementCodes,

      @ObjectModel: { readOnly: true,
                      virtualElement: true,
                      virtualElementCalculatedBy: 'ABAP:CL_EHHSS_HSI_ITM_SADL_EXIT' }
      @EndUserText.label: 'GHS Classifications'
      cast( '' as ehfnd_classification_conct_t )                                                                  as  GHSHazardClassCategoryNames, // To DO change name of field


      @ObjectModel: { filter.enabled: false,
                      sort.enabled: false }
      HzdsSubstInvtryItemIsFinished,

      @ObjectModel: { filter.enabled: false,
                      sort.enabled: false }
      HzdsSubstInvtryItemIsPrinted,


      @Consumption.hidden: true
      _EHSLocation .EHSLocationType,
      @Consumption.hidden: true
      _EHSLocation .EHSLocationStatus,
      @Consumption.hidden: true
      cast(_EHSLocation.EHSLocationAuthorizationGroup as ehfnd_loc_auth_group_nc preserving type )                as  EHSLocationAuthorizationGroup,
      @Consumption.hidden: true
      _EHSLocation .Plant,
      @Consumption.hidden: true
      _EHSLocation .CostCenter,
      @Consumption.hidden: true
      _EHSLocation .CompanyCode,
      @Consumption.hidden: true
      _EHSLocation.BusinessArea,
// *  begin correction 3066290   11.06.2021

    //*  @Consumption.hidden: true

      _EHSLocation.Country,
 // *  end correction 3066290   11.06.2021     

      @Consumption.hidden: true
      _HzdsSubstInventory.HzdsSubstInventoryStatus,


      /* Associations */
      _ChemicalNameText

}
where
  _HzdsSubstInventoryItem.ChemicalUUID is null