C_ChmlCmplncReqPrps

DDL: C_CHMLCMPLNCREQPRPS Type: view CONSUMPTION

Purpose Overview of a Chemical Compliance Request

C_ChmlCmplncReqPrps is a Consumption CDS View that provides data about "Purpose Overview of a Chemical Compliance Request" in SAP S/4HANA. It reads from 1 data source (I_ChmlCmplncReqPrps) and exposes 12 fields with key fields CmplncPrpsUUID, ChmlCmplncRequestUUID, ChmlCmplncPrpsAssgmtUUID. It has 5 associations to related views.

Data Sources (1)

SourceAliasJoin Type
I_ChmlCmplncReqPrps ChmlCmplnReqPrps from

Associations (5)

CardinalityTargetAliasCondition
[1..1] C_ChmlCmplncReqProcMkt _ChmlCmplncReq $projection.ChmlCmplncRequestUUID = _ChmlCmplncReq.ChmlCmplncRequestUUID
[0..1] P_ChmlCmplncPrpsMktRqmtCt _PrpsMktRqmtCt $projection.CmplncPrpsUUID = _PrpsMktRqmtCt.CmplncPrpsUUID
[0..1] P_ChmlCmplncPrpsDGRqmtCt _PrpsDgRqmtCt $projection.CmplncPrpsUUID = _PrpsDgRqmtCt.CmplncPrpsUUID
[0..1] P_ChmlCmplncPrpsSdsRqmtCt _PrpsSdsRqmtCt $projection.CmplncPrpsUUID = _PrpsSdsRqmtCt.CmplncPrpsUUID
[0..*] C_CmplncPrpsNameWithFallback _CmplncPrpsTextFallback $projection.CmplncPrpsUUID = _CmplncPrpsTextFallback.CmplncPrpsUUID

Annotations (14)

NameValueLevelField
EndUserText.label Purpose Overview of a Chemical Compliance Request view
AbapCatalog.sqlViewName CCCREQPRPSASS view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.serviceQuality #C view
UI.headerInfo.typeName Compliance Purpose to Verify view
UI.headerInfo.typeNamePlural Compliance Purposes to Verify view
UI.headerInfo.title.value CmplncPrpsName view
UI.lineItem.criticality Criticality view
Search.searchable true view

Fields (12)

KeyFieldSource TableSource FieldDescription
KEY CmplncPrpsUUID I_ChmlCmplncReqPrps CmplncPrpsUUID
KEY ChmlCmplncRequestUUID I_ChmlCmplncReqPrps ChmlCmplncRequestUUID
KEY ChmlCmplncPrpsAssgmtUUID ChmlCmplncPrpsAssgmtUUID
CmplncPrpsasCmplncPrpsFallbackName
PurposeNamewithoutdefaultusedforsearch
CmplncPrpsNameasCmplncPrpsName
CmplncPrpsasCmplncPrps
ChmlCmplncReqChgTypeName
NmbrOfChmlCmplncMktRqmts _PrpsMktRqmtCt NmbrOfChmlCmplncMktRqmts
NmbrOfChmlCmplncDngrsGdsRqmts _PrpsDgRqmtCt NmbrOfChmlCmplncDngrsGdsRqmts
NmbrOfChmlCmplncDataShtRqmts _PrpsSdsRqmtCt NmbrOfChmlCmplncDataShtRqmts
_ChmlCmplncReq _ChmlCmplncReq
@EndUserText.label: 'Purpose Overview of a Chemical Compliance Request'
@AbapCatalog:
{
  sqlViewName: 'CCCREQPRPSASS',
  compiler.compareFilter: true
}

@AccessControl:
{
  authorizationCheck: #CHECK
}

@ClientHandling.algorithm: #SESSION_VARIABLE

@VDM.viewType: #CONSUMPTION

@ObjectModel:
{
  semanticKey:  [ 'CmplncPrpsUUID' ],
  usageType:
  {
    /*Service Quality - reflects the quality of service with respect to the expected performance of the CDS view:
      #A: may be consumed within business logic for high volume transactions or background processing
      #B: may be consumed within business logic for transactions or background processing
    */
    dataClass: #MIXED,
    sizeCategory: #M,
    serviceQuality: #C
  }
}

@UI : {
 headerInfo: {
    typeName: 'Compliance Purpose to Verify',
    typeNamePlural: 'Compliance Purposes to Verify',
    title.value: 'CmplncPrpsName'
 },
 presentationVariant : {
    sortOrder: [{by: 'ChmlCmplncRequestSortOrder', direction : #ASC}, {by: 'CmplncPrpsName', direction: #ASC }],
    groupBy: ['ChmlCmplncRequestSortOrder'],
    requestAtLeast: ['CmplncPrpsUUID',
                    'ChmlCmplncReqChgType',
                    'CmplncPrpsName'
                  ]
  },
  -- used for the table line highlight indicator
  lineItem:
  {
    criticality: 'Criticality'
  }
}

--Search
@Search.searchable : true

define view C_ChmlCmplncReqPrps

  as select from           I_ChmlCmplncReqPrps       as ChmlCmplnReqPrps
    left outer to one join I_ChmlCmplncReqPrpsAssgmt as _ChmlCmplncReqPrpsAssgmt on  _ChmlCmplncReqPrpsAssgmt.ChmlCmplncRequestUUID = ChmlCmplnReqPrps.ChmlCmplncRequestUUID
                                                                                 and _ChmlCmplncReqPrpsAssgmt.CmplncPrpsUUID        = ChmlCmplnReqPrps.CmplncPrpsUUID

  association [1..1] to C_ChmlCmplncReqProcMkt       as _ChmlCmplncReq          on $projection.ChmlCmplncRequestUUID = _ChmlCmplncReq.ChmlCmplncRequestUUID

  association [0..1] to P_ChmlCmplncPrpsMktRqmtCt    as _PrpsMktRqmtCt          on $projection.CmplncPrpsUUID = _PrpsMktRqmtCt.CmplncPrpsUUID
  association [0..1] to P_ChmlCmplncPrpsDGRqmtCt     as _PrpsDgRqmtCt           on $projection.CmplncPrpsUUID = _PrpsDgRqmtCt.CmplncPrpsUUID
  association [0..1] to P_ChmlCmplncPrpsSdsRqmtCt    as _PrpsSdsRqmtCt          on $projection.CmplncPrpsUUID = _PrpsSdsRqmtCt.CmplncPrpsUUID

  //  association [0..*] to I_CmplncPrpsText             as _CmplncPrpsText         on $projection.CmplncPrpsUUID = _CmplncPrpsText.CmplncPrpsUUID

  association [0..*] to C_CmplncPrpsNameWithFallback as _CmplncPrpsTextFallback on $projection.CmplncPrpsUUID = _CmplncPrpsTextFallback.CmplncPrpsUUID

{
           // Purpose UUID / Name

           @UI:
           {
             lineItem:
             {
               position: 10,
               importance: #HIGH,
               label: 'Compliance Purpose'
             },
             textArrangement: #TEXT_ONLY
           }
           @ObjectModel:
           {
             text.element: ['CmplncPrpsFallbackName'],
             readOnly: true
           }
  key      ChmlCmplnReqPrps.CmplncPrpsUUID,

           @UI.hidden: true
           @ObjectModel.readOnly: true
  key      ChmlCmplnReqPrps.ChmlCmplncRequestUUID,

           @UI.hidden: true
           @ObjectModel.readOnly: true
  key      ChmlCmplncPrpsAssgmtUUID,


           -- Default Purpose Name
           @UI.hidden: true
           @ObjectModel.readOnly: true
           _CmplncPrpsTextFallback.CmplncPrps            as CmplncPrpsFallbackName,

           -- Purpose Name without default - used for search, because on Default Purpose Name search not possible
           @UI.hidden: true
           @ObjectModel.readOnly: true
           @Search: { defaultSearchElement: true, fuzzinessThreshold: 0.8 }
           _CmplncPrpsTextFallback.CmplncPrpsName        as CmplncPrpsName,
           -- Purpose Name English - used for search
           @UI.hidden: true
           @ObjectModel.readOnly: true
           @Search: { defaultSearchElement: true, fuzzinessThreshold: 0.8 }
           _CmplncPrpsTextFallback.CmplncPrpsEnglishName as CmplncPrpsEnglishName,
           -- Purpose Number - used for search
           @UI.hidden: true
           @ObjectModel.readOnly: true
           @Search: { defaultSearchElement: true, fuzzinessThreshold: 0.8 }
           ChmlCmplnReqPrps._Purpose.CmplncPrps          as CmplncPrps,


           -- Change Type
           @UI: {
             textArrangement: #TEXT_ONLY
           }
           @ObjectModel:
           {
             readOnly: true,
             text.element:  [ 'ChmlCmplncReqChgTypeName' ]
           }
           cast( case
             when _ChmlCmplncReqPrpsAssgmt.ChmlCmplncPrpsAssgmtUUID is not null then
               _ChmlCmplncReqPrpsAssgmt.ChmlCmplncReqChgType
             else
               'EXISTING'
           end as ehfnd_crq_change_type )                as ChmlCmplncReqChgType,

           @UI.hidden: true
           @ObjectModel.readOnly: true
           @ObjectModel.virtualElement
           @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHPMA_CPLREQ_PRPS_CALC_EXIT'
           cast('' as val_text)                          as ChmlCmplncReqChgTypeName,

           -- Item criticality
           @UI.hidden: true
           case
               when _ChmlCmplncReqPrpsAssgmt.ChmlCmplncPrpsAssgmtUUID is not null then
                 case _ChmlCmplncReqPrpsAssgmt.ChmlCmplncReqChgType
                   when 'MANUAL' then 3
                   else 0
                 end
               else 0
           end                                           as Criticality,

           -- Internal sort order
           @UI.hidden: true
           @ObjectModel.readOnly: true
           case
               when _ChmlCmplncReqPrpsAssgmt.ChmlCmplncPrpsAssgmtUUID is not null then
                 case _ChmlCmplncReqPrpsAssgmt.ChmlCmplncReqChgType
                   when 'MANUAL' then 0
                   when 'REQUESTED' then 1
                   else 2
                 end
               else 2
           end                                           as ChmlCmplncRequestSortOrder,

           // Number of Compliance Requirement - Marketability

           @UI:
           {
            lineItem:
            {
              position: 20,
              importance: #HIGH
            }
           }
           @ObjectModel.readOnly: true
           _PrpsMktRqmtCt.NmbrOfChmlCmplncMktRqmts,

           // Number of Compliance Requirement - Dangerous Goods

           @UI:
           {
            lineItem:
            {
              position: 30,
              importance: #HIGH
            }
           }
           @ObjectModel.readOnly: true
           _PrpsDgRqmtCt.NmbrOfChmlCmplncDngrsGdsRqmts,

           // Number of Compliance Requirement - Safety Data Sheet

           @UI:
           {
            lineItem:
            {
              position: 40,
              importance: #HIGH
            }
           }
           @ObjectModel.readOnly: true
           _PrpsSdsRqmtCt.NmbrOfChmlCmplncDataShtRqmts,

           /* Associations */
           _ChmlCmplncReq
}