P_ChmlSuplrMatlRqmtRsltAllSts

DDL: P_CHMLSUPLRMATLRQMTRSLTALLSTS Type: view CONSUMPTION

Counter for all CRR Status for Chemical Supplier Material

P_ChmlSuplrMatlRqmtRsltAllSts is a Consumption CDS View that provides data about "Counter for all CRR Status for Chemical Supplier Material" in SAP S/4HANA. It reads from 1 data source (I_ChmlSuplrMatl) and exposes 5 fields. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_ChmlSuplrMatl SupplierMaterial from

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_UnitOfMeasure _PercentageUnitOfMeasure _PercentageUnitOfMeasure.UnitOfMeasure = '%'

Annotations (8)

NameValueLevelField
EndUserText.label Counter for all CRR Status for Chemical Supplier Material view
AbapCatalog.sqlViewName PCSMCRRALLSTS view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
VDM.private true view

Fields (5)

KeyFieldSource TableSource FieldDescription
ChmlSuplrMatlUUID
ChmlSuplrMatlDataStatus
ChmlSuplrMatlDataStsChgDteTme
UnitOfMeasure
_PercentageUnitOfMeasure _PercentageUnitOfMeasure
--Label of view
@EndUserText.label: 'Counter for all CRR Status for Chemical Supplier Material'

@AbapCatalog:
{
  -- SQL view name (16 characters)
  sqlViewName: 'PCSMCRRALLSTS',

  --If it's true, the filter conditions are compared and, if they match, the associated join expression is evaluated only once
  compiler.compareFilter: true,
  preserveKey: true

}

--Access Control: Authorizations Checks
@AccessControl:
{
  authorizationCheck: #NOT_REQUIRED
}

--Client Handling of the view
@ClientHandling.algorithm: #SESSION_VARIABLE

--VDM view type
@VDM.viewType: #CONSUMPTION
@VDM.private: true

define view P_ChmlSuplrMatlRqmtRsltAllSts
  --Select data from basic view of Supplier Material
  as select from    I_ChmlSuplrMatl             as SupplierMaterial

  --Unit of measurement %
  association [0..1] to I_UnitOfMeasure         as _PercentageUnitOfMeasure on _PercentageUnitOfMeasure.UnitOfMeasure = '%'
{
      --UUID of Supplier Material
  key SupplierMaterial.ChmlSuplrMatlUUID,

      --Data status of supplier material
      SupplierMaterial.ChmlSuplrMatlDataStatus,

      --Change date of data status
      SupplierMaterial.ChmlSuplrMatlDataStsChgDteTme,

      ---------------------------------------------------------------------------------------------
      /*Status "Compliant"*/
      ---------------------------------------------------------------------------------------------

      --Status 'Compliant'
      cast( '01' as ehfnd_crr_man_stat_nd ) as ChmlCmplncStatusCompliant,

      --Counter of Status 'Compliant'
      @ObjectModel.readOnly: true
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_CSM_RQRSLT_STAT_CALC'
      cast( 0 as int2 )                     as NrOfChmlCmplncStsCompliant,

      --Percentage of Status Compliant
      @Semantics.quantity.unitOfMeasure: 'UnitOfMeasure'
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_CSM_RQRSLT_STAT_CALC'
      cast( 0 as ehfnd_csm_nr_of_crrs_compliant )                     as RatioOfCmplncStsCompliant,

      --Criticality of Status Compliant
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_CSM_RQRSLT_STAT_CALC'
      cast( 0 as int2 )                     as CmplncStsCompliantCritlty,

      ---------------------------------------------------------------------------------------------
      /*Status "Not Compliant"*/
      ---------------------------------------------------------------------------------------------

      --Status 'Not Compliant'
      cast( '04' as ehfnd_crr_man_stat_nd ) as ChmlCmplncStatusNotCompliant,

      --Counter of Status 'Not compliant'
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_CSM_RQRSLT_STAT_CALC'
      cast( 0 as int2 )                     as NrOfChmlCmplncStsNotCompliant,

      --Percentage of Status Not Compliant
      //@Semantics.quantity.unitOfMeasure: 'UnitOfMeasure'

      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_CSM_RQRSLT_STAT_CALC'
      cast( 0 as ehfnd_csm_nr_of_crrs_notcompl )                     as RatioOfCmplncStsNotCompliant,

      --Criticality of Status Not Compliant
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_CSM_RQRSLT_STAT_CALC'
      cast( 0 as int2 )                     as CmplncStsNotCompliantCritlty,

      ---------------------------------------------------------------------------------------------
      /*Status "Unknown"*/
      ---------------------------------------------------------------------------------------------

      --Status 'Unknown'
      cast( '03' as ehfnd_crr_man_stat_nd ) as ChmlCmplncStatusUnknown,

      --Counter of Status 'Unknown'
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_CSM_RQRSLT_STAT_CALC'
      cast( 0 as int2 )                     as NrOfChmlCmplncStsUnknown,

      --Percentage of Status Unknown
      //@Semantics.quantity.unitOfMeasure: 'UnitOfMeasure'

      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_CSM_RQRSLT_STAT_CALC'
      cast( 0 as int2 )                     as RatioOfCmplncStsUnknown,

      --Criticality of Status Unknown
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_CSM_RQRSLT_STAT_CALC'
      cast( 0 as int2 )                     as CmplncStsUnknownCritlty,

      --Unit of measurment of ratio %
      //@Semantics.unitOfMeasure: true

      @ObjectModel.foreignKey.association: '_PercentageUnitOfMeasure'
      _PercentageUnitOfMeasure.UnitOfMeasure,

      --Latest creation date/time
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_CSM_RQRSLT_STAT_CALC'
      cast( 0 as timestampl )               as CmplRqRsltLastCreationDateTime,

      ---------------------------------------------------------------------------------------------
      /*Additional Data*/
      ---------------------------------------------------------------------------------------------

      --Number of all CRRs
      @ObjectModel.virtualElement
      @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_EHFND_CSM_RQRSLT_STAT_CALC'
      cast( 0 as int2 )                     as NrOfAllChmlCmplncRqmtRslt,

      /*Association*/
      _PercentageUnitOfMeasure
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CHMLSUPLRMATL",
"I_UNITOFMEASURE"
],
"ASSOCIATED":
[
"I_UNITOFMEASURE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/