C_UpaDaGdsClfnTechNameAll

DDL: C_UPADAGDSCLFNTECHNAMEALL SQL: IUPDGTECHNAMALL Type: view CONSUMPTION

Technical Names - All Company Substances

C_UpaDaGdsClfnTechNameAll is a Consumption CDS View that provides data about "Technical Names - All Company Substances" in SAP S/4HANA. It reads from 1 data source (I_Substance) and exposes 7 fields with key fields SubstanceUUID, CmplRqVersOrganicPrxdUUID, CmplRqVersSelfReactvSubstUUID. It has 3 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_Substance I_Substance from

Parameters (3)

NameTypeDefault
P_CmplRqVersUUID sysuuid_x
P_DangerousGoodsIdnNumber ehdgm_dangerous_good_idn
P_DangerousGoodsIdnNumberType ehdgm_dangerous_good_idn_type

Associations (3)

CardinalityTargetAliasCondition
[0..1] P_SubstNameFallbackLogonLang _SubstNameFallbackLogonLang _SubstNameFallbackLogonLang.SubstanceUUID = $projection.SubstanceUUID
[0..1] P_SubstIsOnOrganicPrxdList _SubstIsOnOrganicPrxdList _SubstIsOnOrganicPrxdList.SubstanceUUID = $projection.SubstanceUUID and _SubstIsOnOrganicPrxdList.CmplRqVersUUID = $parameters.P_CmplRqVersUUID and _SubstIsOnOrganicPrxdList.ProdCmplncDngrsGdsIdnNmbrType = $parameters.P_DangerousGoodsIdnNumberType and _SubstIsOnOrganicPrxdList.ProdCmplncDngrsGdsIdnNmbr = $parameters.P_DangerousGoodsIdnNumber
[0..1] P_SubstIsOnSelfReactvSubstList _SubstIsOnSelfReactvSubstList _SubstIsOnSelfReactvSubstList.SubstanceUUID = $projection.SubstanceUUID and _SubstIsOnSelfReactvSubstList.CmplRqVersUUID = $parameters.P_CmplRqVersUUID and _SubstIsOnSelfReactvSubstList.ProdCmplncDngrsGdsIdnNmbrType = $parameters.P_DangerousGoodsIdnNumberType and _SubstIsOnSelfReactvSubstList.ProdCmplncDngrsGdsIdnNmbr = $parameters.P_DangerousGoodsIdnNumber

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName IUPDGTECHNAMALL view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #NOT_REQUIRED view
VDM.viewType #CONSUMPTION view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Technical Names - All Company Substances view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY SubstanceUUID SubstanceUUID
KEY CmplRqVersOrganicPrxdUUID _SubstIsOnOrganicPrxdList CmplRqVersOrganicPrxdUUID
KEY CmplRqVersSelfReactvSubstUUID _SubstIsOnSelfReactvSubstList CmplRqVersSelfReactvSubstUUID
SubstanceNameendasSubstanceName
CASNumber _ListedSubstance CASNumber
ECNumber _ListedSubstance ECNumber
ResponsibleUnit ResponsibleUnit
@AbapCatalog.sqlViewName: 'IUPDGTECHNAMALL'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #NOT_REQUIRED
@VDM.viewType: #CONSUMPTION
@ClientHandling.algorithm: #SESSION_VARIABLE

@EndUserText.label: 'Technical Names - All Company Substances'

@ObjectModel.usageType:{ serviceQuality: #C,        // < 15 msec

                         sizeCategory:  #L,         // < 10.000.000

                         dataClass: #MIXED }

define view C_UpaDaGdsClfnTechNameAll
  with parameters
    P_CmplRqVersUUID              : sysuuid_x,
    P_DangerousGoodsIdnNumber     : ehdgm_dangerous_good_idn,
    P_DangerousGoodsIdnNumberType : ehdgm_dangerous_good_idn_type

  as select from I_Substance

  association [0..1] to P_SubstNameFallbackLogonLang   as _SubstNameFallbackLogonLang   on  _SubstNameFallbackLogonLang.SubstanceUUID = $projection.SubstanceUUID

  // check if the substance is on the organic peroxide list

  association [0..1] to P_SubstIsOnOrganicPrxdList     as _SubstIsOnOrganicPrxdList     on  _SubstIsOnOrganicPrxdList.SubstanceUUID                 = $projection.SubstanceUUID
                                                                                        and _SubstIsOnOrganicPrxdList.CmplRqVersUUID                = $parameters.P_CmplRqVersUUID
                                                                                        and _SubstIsOnOrganicPrxdList.ProdCmplncDngrsGdsIdnNmbrType = $parameters.P_DangerousGoodsIdnNumberType
                                                                                        and _SubstIsOnOrganicPrxdList.ProdCmplncDngrsGdsIdnNmbr     = $parameters.P_DangerousGoodsIdnNumber

  // check if the substance is on the self-reactive substance list

  association [0..1] to P_SubstIsOnSelfReactvSubstList as _SubstIsOnSelfReactvSubstList on  _SubstIsOnSelfReactvSubstList.SubstanceUUID                 = $projection.SubstanceUUID
                                                                                        and _SubstIsOnSelfReactvSubstList.CmplRqVersUUID                = $parameters.P_CmplRqVersUUID
                                                                                        and _SubstIsOnSelfReactvSubstList.ProdCmplncDngrsGdsIdnNmbrType = $parameters.P_DangerousGoodsIdnNumberType
                                                                                        and _SubstIsOnSelfReactvSubstList.ProdCmplncDngrsGdsIdnNmbr     = $parameters.P_DangerousGoodsIdnNumber

{

  key SubstanceUUID                                           as SubstanceUUID,
      // key field if the substance is on the organic peroxide list

  key _SubstIsOnOrganicPrxdList.CmplRqVersOrganicPrxdUUID,
      // key field if the substance is on the self reactive substance list

  key _SubstIsOnSelfReactvSubstList.CmplRqVersSelfReactvSubstUUID,

      case
      // use the name from the list if the substance is on the peroxide list

            when _SubstIsOnOrganicPrxdList.SubstanceUUID is not null
              then _SubstIsOnOrganicPrxdList.DngrsGdsOrganicPrxdName
      // use the name from the list if the substance is on the self-reactive substance list

            when _SubstIsOnSelfReactvSubstList.SubstanceUUID is not null
              then _SubstIsOnSelfReactvSubstList.DngrsGdsSelfReactvName
      // by default use the substance name

            else
              _SubstNameFallbackLogonLang.SubstanceName
          end                                                 as SubstanceName,

      _ListedSubstance.CASNumber                              as CASNumber,
      _ListedSubstance.ECNumber                               as ECNumber,

      @ObjectModel.readOnly: true
      cast (
        case
          when _SubstIsOnOrganicPrxdList.SubstanceUUID is not null
            then 'X'
      // when _SubstIsOnOrganicPrxdList.SubstanceUUID is null

      //   then ''

          else ''
        end
      as substisonorganicprxdlist preserving type)            as SubstIsOnOrganicPrxdList,

      @ObjectModel.readOnly: true
      cast (
        case
          when _SubstIsOnSelfReactvSubstList.SubstanceUUID is not null
            then 'X'
      // when _SubstIsOnSelfReactvSubstList.SubstanceUUID is null

      //   then ''

          else ''
        end
      as substisonselfreactvsubstlist preserving type)        as SubstIsOnSelfReactvSubstList,

      // Position on List

      @ObjectModel.readOnly: true
      case
        when _SubstIsOnOrganicPrxdList.SubstanceUUID is not null
          then _SubstIsOnOrganicPrxdList.DngrsGdsPositionOnSource
        when _SubstIsOnSelfReactvSubstList.SubstanceUUID is not null
          then _SubstIsOnSelfReactvSubstList.DngrsGdsPositionOnSource
        else
          0
      end                                                     as DngrsGdsPositionOnSource,

      // Printed Name

      @ObjectModel.readOnly: true
      case
        when _SubstIsOnOrganicPrxdList.SubstanceUUID is not null
          then _SubstIsOnOrganicPrxdList.DngrsGdsOrganicPrxdPrintedName
        when _SubstIsOnSelfReactvSubstList.SubstanceUUID is not null
          then _SubstIsOnSelfReactvSubstList.DngrsGdsSelfReactvPrintedName
        else
          ''
      end                                                     as DngrsGdsSubstPrintedName,

      // Additional Information

      @ObjectModel.readOnly: true
      case
        when _SubstIsOnOrganicPrxdList.SubstanceUUID is not null
          then _SubstIsOnOrganicPrxdList.DngrsGdsOrganicPrxdAddlInfoTxt
        when _SubstIsOnSelfReactvSubstList.SubstanceUUID is not null
          then _SubstIsOnSelfReactvSubstList.DngrsGdsSelfReactvAddlInfoTxt
        else
          ''
      end                                                     as DngrsGdsAddlInfoTxt,

      // Concentration - Lower Operator/Value/Unit

      @ObjectModel.readOnly: true
      case
        when _SubstIsOnOrganicPrxdList.SubstanceUUID is not null
          then _SubstIsOnOrganicPrxdList.DngrsGdsConcnLowrQtyOptr
        when _SubstIsOnSelfReactvSubstList.SubstanceUUID is not null
          then _SubstIsOnSelfReactvSubstList.DngrsGdsConcnLowrQtyOptr
        else
          ''
      end                                                     as DngrsGdsConcnLowrQtyOptr,
      @ObjectModel.readOnly: true
      case
        when _SubstIsOnOrganicPrxdList.SubstanceUUID is not null
          then _SubstIsOnOrganicPrxdList.DngrsGdsConcnLowrQty
        when _SubstIsOnSelfReactvSubstList.SubstanceUUID is not null
          then _SubstIsOnSelfReactvSubstList.DngrsGdsConcnLowrQty
        else
          0
      end                                                     as DngrsGdsConcnLowrQty,
      @ObjectModel.readOnly: true
      case
        when _SubstIsOnOrganicPrxdList.SubstanceUUID is not null
          then _SubstIsOnOrganicPrxdList.DngrsGdsConcnLowrQtyUnit
        when _SubstIsOnSelfReactvSubstList.SubstanceUUID is not null
          then _SubstIsOnSelfReactvSubstList.DngrsGdsConcnLowrQtyUnit
        else
          cast( '  ' as dngrsgdsconcnuprqtyunit )
      end                                                     as DngrsGdsConcnLowrQtyUnit,

      // Concentration - Upper Operator/Value/Unit

      @ObjectModel.readOnly: true
      case
        when _SubstIsOnOrganicPrxdList.SubstanceUUID is not null
          then _SubstIsOnOrganicPrxdList.DngrsGdsConcnUprQtyOptr
        when _SubstIsOnSelfReactvSubstList.SubstanceUUID is not null
          then _SubstIsOnSelfReactvSubstList.DngrsGdsConcnUprQtyOptr
        else
          ''
      end                                                     as DngrsGdsConcnUprQtyOptr,
      @ObjectModel.readOnly: true
      case
        when _SubstIsOnOrganicPrxdList.SubstanceUUID is not null
          then _SubstIsOnOrganicPrxdList.DngrsGdsConcnUprQty
        when _SubstIsOnSelfReactvSubstList.SubstanceUUID is not null
          then _SubstIsOnSelfReactvSubstList.DngrsGdsConcnUprQty
        else
          0
      end                                                     as DngrsGdsConcnUprQty,
      @ObjectModel.readOnly: true
      case
        when _SubstIsOnOrganicPrxdList.SubstanceUUID is not null
          then _SubstIsOnOrganicPrxdList.DngrsGdsConcnUprQtyUnit
        when _SubstIsOnSelfReactvSubstList.SubstanceUUID is not null
          then _SubstIsOnSelfReactvSubstList.DngrsGdsConcnUprQtyUnit
        else
          cast( '  ' as dngrsgdsconcnuprqtyunit )
      end                                                     as DngrsGdsConcnUprQtyUnit,

      --Technical Name Exist Flag
      @ObjectModel.readOnly: true
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHDGM_UP_COMPONENT_EXIT'
      cast('' as substancetechnameisexisting preserving type) as SubstanceTechNameIsExisting,

      --Technical Name is Creatable Flag
      @ObjectModel.readOnly: true
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHDGM_UP_COMPONENT_EXIT'
      cast('' as substancetechnameiseditable preserving type) as SubstanceTechNameIsEditable,

      --Technical Name
      @ObjectModel.readOnly: true
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHDGM_UP_COMPONENT_EXIT'
      cast('' as substancetechnametext)                       as SubstanceTechNameText,

      // Required for DCL

      @Consumption.hidden: true
      ResponsibleUnit

      // Associations

      //      _SubstIsOnOrganicPrxdList,

      //      _SubstIsOnSelfReactvSubstList

}
where
  _SubstNameFallbackLogonLang.SubstanceName <> ''
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_SUBSTACTIVEDRAFTLSTDSUBST",
"I_SUBSTANCE",
"P_SUBSTISONORGANICPRXDLIST",
"P_SUBSTISONSELFREACTVSUBSTLIST",
"P_SUBSTNAMEFALLBACKLOGONLANG"
],
"ASSOCIATED":
[
"P_SUBSTISONORGANICPRXDLIST",
"P_SUBSTISONSELFREACTVSUBSTLIST",
"P_SUBSTNAMEFALLBACKLOGONLANG"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/