C_SftyDataShtRelatedAssmt

DDL: C_SFTYDATASHTRELATEDASSMT SQL: CCCCRRSDSRELASSM Type: view CONSUMPTION

SDS Related Assmt for unpackaged prods

C_SftyDataShtRelatedAssmt is a Consumption CDS View that provides data about "SDS Related Assmt for unpackaged prods" in SAP S/4HANA. It reads from 1 data source (I_CmplRqRslt) and exposes 22 fields with key fields ChmlCmplncInfoUUID, SubstanceUUID, CmplRqVersUUID, CmplRqRsltUUID. It has 5 associations to related views. It is exposed through 1 OData service (UI_EHS_FND_CRR_OVERVIEW).

Data Sources (1)

SourceAliasJoin Type
I_CmplRqRslt CmplRqRslt from

Associations (5)

CardinalityTargetAliasCondition
[0..1] I_CmplRqVersEnhanced _CmplRqVers $projection.CmplRqVersUUID = _CmplRqVers.CmplRqVersUUID --
[1..1] I_ChmlCmplncInfo _ChmlCmplncInfo $projection.ChmlCmplncInfoUUID = _ChmlCmplncInfo.ChmlCmplncInfoUUID --required to show a draft-indicator
[1..1] C_CmplRqRsltDraftAdminvData _DraftAdministrativeData $projection.CmplRqRsltUUID = _DraftAdministrativeData.CmplRqRsltUUID
[0..1] I_BusinessUserBasic _ProcessorUser $projection.Processor = _ProcessorUser.BusinessPartner -- Determines the full name of the business user who has released the CRR
[0..1] I_BusinessUserBasic _ReleasedByUser $projection.ReleasedByUser = _ReleasedByUser.BusinessPartner

Annotations (16)

NameValueLevelField
AbapCatalog.sqlViewName CCCCRRSDSRELASSM view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
EndUserText.label SDS Related Assmt for unpackaged prods view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.allowExtensions true view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #C view
UI.headerInfo.typeName Safety Data Sheet: Related Assessment view
UI.headerInfo.typeNamePlural Safety Data Sheet: Related Assessments view
UI.headerInfo.title.value CmplRqVersName view
Search.searchable true view

OData Services (1)

ServiceBindingVersionContractRelease
UI_EHS_FND_CRR_OVERVIEW UI_EHS_FND_CRR_OVERVIEW V2 C1 NOT_RELEASED

Fields (22)

KeyFieldSource TableSource FieldDescription
KEY ChmlCmplncInfoUUID ChmlCmplncInfoUUID
KEY SubstanceUUID SubstanceUUID
KEY CmplRqVersUUID CmplRqVersUUID
KEY CmplRqRsltUUID CmplRqRsltUUID
CmplRqVersName
CmplRqVersNameInCurLang
CmplRqVersEnglishName _CmplRqVers CmplRqVersEnglishName
ComplianceRequirement _CmplRqVers ComplianceRequirement
CmplRqPattern _CmplRqVers CmplRqPattern
CmplRqRsltNavgnLink CmplRqRsltUUID
CmplRqRsltProcessingStatus CmplRqRsltProcessingStatus
Processor Processor
CmplRqRsltPrelimProcessorName
ReleasedByUser ReleasedByUser
ReleasedByUserName
CmplRqRsltProcessorName
IsActiveEntity
char30asSemanticObjectAction
_CmplRqVers _CmplRqVers
_ChmlCmplncInfo _ChmlCmplncInfo
_DraftAdministrativeData _DraftAdministrativeData
_ReleasedByUser _ReleasedByUser
@AbapCatalog.sqlViewName: 'CCCCRRSDSRELASSM'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@EndUserText.label: 'SDS Related Assmt for unpackaged prods'

@AccessControl:
{
  authorizationCheck: #MANDATORY,
  // blocking of personal data not required (no personal data fields exposed for material; user can not be blocked)

  personalData.blocking: #NOT_REQUIRED
}

@ClientHandling.algorithm: #SESSION_VARIABLE

@Metadata.allowExtensions: true
@VDM.viewType: #CONSUMPTION

@ObjectModel:
{
  semanticKey:  [ 'CmplRqVersName' ],
  usageType:
  {
    dataClass: #MIXED,
    sizeCategory: #XL,
    serviceQuality: #C
  }
}

@UI:
{
  headerInfo : {
    typeName : 'Safety Data Sheet: Related Assessment',
    typeNamePlural : 'Safety Data Sheet: Related Assessments',
    title.value : 'CmplRqVersName' // Needed to enable CoPilot

  },
  presentationVariant: {
    sortOrder: [ {by: 'CmplRqVersName', direction: #ASC }],
    requestAtLeast :
    [
      'CmplRqPattern',
      'CmplRqRsltNavgnLink',
      'CmplRqVersName', // Used for draft indicator in UI

      'HasDraftEntity', // Used for draft indicator in UI

      'IsActiveEntity', // Used for draft indicator in UI

      'SemanticObjectAction'
    ]
  }
}

--Search
@Search.searchable : true

// All View (In Progress and Released Versions) for SDS Related Assessments for UPs

// Text has been renamed after development from "Safety Data Sheet Related Assessments" to "First Aid Measures Assessments" and for CE2011 to "Safety Data Sheet: Related Assessments"


define view C_SftyDataShtRelatedAssmt
  as select from I_CmplRqRslt as CmplRqRslt

  -- association to Compliance Requirement Version
  association [0..1] to I_CmplRqVersEnhanced        as _CmplRqVers              on $projection.CmplRqVersUUID = _CmplRqVers.CmplRqVersUUID

  -- Association used in DCL to determine responsible unit
  association [1..1] to I_ChmlCmplncInfo            as _ChmlCmplncInfo          on $projection.ChmlCmplncInfoUUID = _ChmlCmplncInfo.ChmlCmplncInfoUUID

  --required to show a draft-indicator
  association [1..1] to C_CmplRqRsltDraftAdminvData as _DraftAdministrativeData on $projection.CmplRqRsltUUID = _DraftAdministrativeData.CmplRqRsltUUID

  association [0..1] to I_BusinessUserBasic         as _ProcessorUser           on $projection.Processor = _ProcessorUser.BusinessPartner

  -- Determines the full name of the business user who has released the CRR
  association [0..1] to I_BusinessUserBasic         as _ReleasedByUser          on $projection.ReleasedByUser = _ReleasedByUser.BusinessPartner

{
      // UUID of packaged or unpackaged product

      @ObjectModel.readOnly: true
  key ChmlCmplncInfoUUID,

      @ObjectModel.readOnly: true
  key SubstanceUUID,

      // UUID of compliance requirement version

      @ObjectModel.readOnly: true
  key CmplRqVersUUID,

      @ObjectModel.readOnly: true
  key CmplRqRsltUUID,

      @Semantics.text: true
      @ObjectModel.readOnly: true
      cast( _CmplRqVers.CmplRqVersName as ehfnd_crr_crv_name preserving type )     as CmplRqVersName,

      @ObjectModel.readOnly: true
      @Search: { defaultSearchElement: true, fuzzinessThreshold: 0.7 } // changed from 0.8 to 0.7 -> 2070494787

      _CmplRqVers._CmplRqVersTextInCurrentLang.CmplRqVersName                      as CmplRqVersNameInCurLang,

      @ObjectModel.readOnly: true
      @Search: { defaultSearchElement: true, fuzzinessThreshold: 0.7 } // changed from 0.8 to 0.7 -> 2070494787

      _CmplRqVers.CmplRqVersEnglishName                                            as CmplRqVersEnglishName,

      _CmplRqVers.ComplianceRequirement,

      @ObjectModel.readOnly: true
      _CmplRqVers.CmplRqPattern,

      @ObjectModel.readOnly: true
      CmplRqRsltUUID                                                               as CmplRqRsltNavgnLink,

      // for segmented button (In Progress/Released)

      CmplRqRsltProcessingStatus,

      @ObjectModel.readOnly: true
      Processor,

      @ObjectModel.readOnly: true
      @Search: { defaultSearchElement: true, fuzzinessThreshold: 0.8 }
      cast(_ProcessorUser.PersonFullName as ehpma_processor_name preserving type)  as CmplRqRsltPrelimProcessorName,

      @ObjectModel.readOnly: true
      @ObjectModel.text.element: ['ReleasedByUserName']
      ReleasedByUser,

      @ObjectModel.readOnly: true
      @Semantics.text: true
      @Search: { defaultSearchElement: true, fuzzinessThreshold: 0.8 }
      cast(_ReleasedByUser.PersonFullName as ehpma_processor_name preserving type) as ReleasedByUserName,

      // displayed Processor/Released By

      @ObjectModel.readOnly: true
      @ObjectModel: {
        virtualElement: true,
        virtualElementCalculatedBy: 'ABAP:CL_EHFND_CRR_PROC_RELDBY_EXIT'
      }
      cast( '' as ehpma_processor_name )                                           as CmplRqRsltProcessorName,


      ---- draft data ----
      @ObjectModel: {
        virtualElement: true,
        virtualElementCalculatedBy: 'ABAP:CL_EHFND_CRR_DRAFT_IND_EXIT'
      }
      @ObjectModel.readOnly: true
      cast( '' as boole_d )                                                        as HasDraftEntity,

      @ObjectModel: {
        virtualElement: true,
        virtualElementCalculatedBy: 'ABAP:CL_EHFND_CRR_DRAFT_IND_EXIT'
      }
      @ObjectModel.readOnly: true
      cast( '' as boole_d )                                                        as IsActiveEntity,

      -- SemanticObjectAction
      @ObjectModel: {
        virtualElement: true,
        virtualElementCalculatedBy: 'ABAP:CL_EHFND_CRV_CONFIG_CALC_EXT'
      }
      @ObjectModel.readOnly: true
      cast( '' as abap.char( 30 ) )                                                as SemanticObjectAction,

      /* Associations */
      _CmplRqVers,
      _ChmlCmplncInfo,
      _DraftAdministrativeData,
      _ReleasedByUser
}
where

       CmplRqRslt.CmplRqVersUUID              is not null
  and  _CmplRqVers.CmplRqApplicationComponent =  'SDS'
  and  _CmplRqVers.CmplRqPattern              <> 'CompliancePatternSDSManagement'
  and(
       CmplRqRslt.CmplRqRsltProcessingStatus  =  'IP'
    or CmplRqRslt.CmplRqRsltProcessingStatus  =  'RE'
  )