I_PURESUBSTANCE

CDS View

Pure Substance

I_PURESUBSTANCE is a CDS View in S/4HANA. Pure Substance. 3 CDS views read from this table.

CDS Views using this table (3)

ViewTypeJoinVDMDescription
A_PureSubstance view from CONSUMPTION Pure Substance
C_PureSubstance view from CONSUMPTION Manage Pure Substances
ESH_N_PURESUB view from
@AbapCatalog.sqlViewName: 'IPURESUBSTANCE'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey:true

@AccessControl.authorizationCheck: #CHECK

@EndUserText.label: 'Pure Substance'

@VDM.lifecycle.contract.type: #SAP_INTERNAL_API
@VDM.viewType: #COMPOSITE

@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.dataClass: #MASTER
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.compositionRoot:true

define view I_PureSubstance
  with parameters
    @Environment.systemField: #SYSTEM_DATE
    P_KeyDate : sydate
  as select from I_SpecificationForKeyDate( P_KeyDate: $parameters.P_KeyDate ) as Spec
    inner join   I_SpecTypeAssignedCategory                                    as _SpecTypeAssignedCategory on  Spec.SpecificationType                          = _SpecTypeAssignedCategory.SpecificationType
                                                                                                            and _SpecTypeAssignedCategory.SpecificationCategory = 'PURE'
  association [0..1] to I_SpecDistinctIdfrByPosition as _PrimaryIdentifier        on  _PrimaryIdentifier.SpecificationInternalID    = $projection.PureSubstanceInternalID
                                                                                  and _PrimaryIdentifier.SpecificationIdnListingPos = '0001'
                                                                                  and _PrimaryIdentifier.SpecificationCategory      = 'PURE'
  association [0..1] to I_SpecDistinctIdfrByPosition as _SecondaryIdentifier      on  _SecondaryIdentifier.SpecificationInternalID    = $projection.PureSubstanceInternalID
                                                                                  and _SecondaryIdentifier.SpecificationIdnListingPos = '0002'
                                                                                  and _SecondaryIdentifier.SpecificationCategory      = 'PURE'
  association [0..1] to I_User                       as _CreatedByUser            on  _CreatedByUser.UserID = $projection.PureSubstanceCreatedByUser
  association [0..1] to I_User                       as _ChangedByUser            on  _ChangedByUser.UserID = $projection.PureSubstanceChangedByUser
  association [0..1] to I_SpecAuthorizationGroup     as _PureSubstanceAuthGroup   on  $projection.PureSubstanceAuthznGroup = _PureSubstanceAuthGroup.SpecificationAuthznGroup
  association [0..1] to I_SpecificationLastChange    as _SpecificationLastChange  on  $projection.PureSubstanceInternalID = _SpecificationLastChange.SpecificationInternalID

  //For CDS-based Search Model. Need for auxiliary view N_SpecAssignedHeaderStatus

  association [0..1] to I_SpecAssignedHeaderStatus   as _SpecAssignedHeaderStatus on  $projection.PureSubstanceInternalID = _SpecAssignedHeaderStatus.SpecificationInternalID

  // Product Compliance Integration as Listed Substance

  association [0..1] to I_SpecListedSubstanceLink    as _SpecListedSubstanceLink  on  $projection.PureSubstanceInternalID = _SpecListedSubstanceLink.SpecificationInternalID

{
  key cast(SpecificationInternalID as /plmb/spc_pure_int_id preserving type )            as PureSubstanceInternalID,
      cast(Specification as /plmb/spc_pure_ext_id preserving type )                      as PureSubstance,

      @Semantics.systemDate.createdAt: true
      cast(SpecificationCreationDate as /plmb/spc_pure_created_on preserving type )      as PureSubstanceCreationDate,
      cast(SpecificationCreatedByUser as /plmb/spc_pure_created_by preserving type )     as PureSubstanceCreatedByUser,

      @Semantics.systemDate.lastChangedAt: true
      cast(SpecificationLastChangeDate as /plmb/spc_pure_changed_on preserving type )    as PureSubstanceChangeDate,
      cast(SpecificationLastChangedByUser as /plmb/spc_pure_changed_by preserving type ) as PureSubstanceChangedByUser,

      @ObjectModel.foreignKey.association: '_PureSubstanceAuthGroup'
      cast(SpecificationAuthznGroup as /plmb/spc_pure_auth_group preserving type )       as PureSubstanceAuthznGroup,
      cast(Spec.SpecificationType as /plmb/spc_pure_type preserving type )               as PureSubstanceType,

      SpecificationValidityStartDate,
      SpecificationValidityEndDate,
      SpecificationSubstanceNatr,
      SpecificationChangeNumber,

      /* Associations */
      _SpecAssignedHeaderStatus,
      _CreatedByUser,
      _LastChangedByUser,
      _PrimaryIdentifier,
      _SecondaryIdentifier,
      _SpecTypeAssignedCategory.SpecificationCategory,
      _PureSubstanceAuthGroup,
      _AssignedHeaderStatus,
      _SpecListedSubstanceLink,
      _SpecificationLastChange,

      /* Associations for Search Modelling */
      Spec._SpecificationType,
      _SpecIdentifierForKeyDate,
      _ChangeMaster,
      _SpecAssignedMaterial,
      _DocumentInfoRecordObjectLink,

      /* Associations for Access Control Management */
      _LogAccMObjectTypeActive,
      _LogAccMObjectUserAuthzn,
      _LogAccMObjSecureIDAssgmt
}
where
  SpecificationIsDeleted <> 'X'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_SPECIFICATIONFORKEYDATE",
"I_SPECTYPEASSIGNEDCATEGORY"
],
"ASSOCIATED":
[
"I_CHANGEMASTER",
"I_DOCUMENTINFORECORDOBJECTLINK",
"I_LOGACCMOBJECTTYPEACTIVE",
"I_LOGACCMOBJECTUSERAUTHZN",
"I_LOGACCMOBJSECUREIDASSGMT",
"I_SPECASSIGNEDHEADERSTATUS",
"I_SPECASSIGNEDMATERIAL",
"I_SPECAUTHORIZATIONGROUP",
"I_SPECDISTINCTIDFRBYPOSITION",
"I_SPECIDENTIFIERFORKEYDATE",
"I_SPECIFICATIONLASTCHANGE",
"I_SPECLISTEDSUBSTANCELINK",
"I_SPECTYPE",
"I_USER"
],
"BASE":
[
"I_SPECIFICATIONFORKEYDATE"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/