I_ChmlCmplncCmplRqRslt

DDL: I_CHMLCMPLNCCMPLRQRSLT SQL: ICCCRR Type: view COMPOSITE

Compliance Requirement Results for UP and PP

I_ChmlCmplncCmplRqRslt is a Composite CDS View that provides data about "Compliance Requirement Results for UP and PP" in SAP S/4HANA. It reads from 2 data sources (I_ChmlCmplncInfo, I_ChmlCmplncInfo) and exposes 19 fields with key fields ChmlCmplncInfoUUID, ChmlCmplncProdUUID, CmplRqVersUUID, ChmlCmplncProdUUID, CmplRqVersUUID. It has 2 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_ChmlCmplncInfo UnpackagedProduct from
I_ChmlCmplncInfo UnpackagedProduct union_all

Associations (2)

CardinalityTargetAliasCondition
[0..*] I_ChmlCmplncCmplRqRsltCombined _Combined _Combined.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID
[0..1] I_ChmlCmplncInfo _ChmlCmplncInfo _ChmlCmplncInfo.ChmlCmplncInfoUUID = $projection.ChmlCmplncProdUUID

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName ICCCRR view
AbapCatalog.compiler.compareFilter true view
EndUserText.label Compliance Requirement Results for UP and PP view
AccessControl.authorizationCheck #CHECK view
ClientHandling.type #INHERITED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #COMPOSITE view
ObjectModel.Link https view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #C view
Search.searchable false view

Fields (19)

KeyFieldSource TableSource FieldDescription
KEY ChmlCmplncInfoUUID I_ChmlCmplncInfo ChmlCmplncInfoUUID
KEY ChmlCmplncProdUUID I_ChmlCmplncInfo ChmlCmplncInfoUUID
KEY CmplRqVersUUID _Combined CmplRqVersUUID
ReldCmplRqRsltUUID _Combined ReldCmplRqRsltUUID
CmplRqRsltProcessingStatus _Combined CmplRqRsltProcessingStatus
ReldCmplRqRsltUUIDendasCmplRqRsltUUID
ReleaseDate
ReleasedByUser
_Combined _Combined
ChmlCmplncInfoUUIDasChmlCmplncInfoUUID
KEY ChmlCmplncProdUUID I_ChmlCmplncInfo ChmlCmplncInfoUUID
KEY CmplRqVersUUID _Combined CmplRqVersUUID
ReldCmplRqRsltUUID _Combined ReldCmplRqRsltUUID
CmplRqRsltProcessingStatus _Combined CmplRqRsltProcessingStatus
ReldCmplRqRsltUUIDendasCmplRqRsltUUID
ReleaseDate
ReleasedByUser
_Combined _Combined
_ChmlCmplncInfo _ChmlCmplncInfo
@AbapCatalog.sqlViewName: 'ICCCRR'

@AbapCatalog.compiler.compareFilter: true

@EndUserText.label: 'Compliance Requirement Results for UP and PP'

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

--Client Handling of the view
@ClientHandling:
{
  type: #INHERITED,
  algorithm: #SESSION_VARIABLE
}

--VDM view type
@VDM.viewType: #COMPOSITE

@ObjectModel:
{

  --Performance Annotations
    --Mandatory for non-private CDS views
    --Optional for private CDS views
    --Link: https://wiki.wdf.sap.corp/wiki/display/SuiteCDS/CDS+View+Performance

  usageType:
  {
    dataClass: #MIXED,
    sizeCategory: #XL,
    serviceQuality: #C
  }
}

@Search.searchable: false

/*----------------------------------------------------------------------------------------------------------------------
 Purpose: This view returns the CRR information of unpackaged product and its related packaged products
       This view provides information for the all views: In Progress and Released Versions, but showing only the released compliance status

       It returns always one record for each CRV-CCI combination:
        - the "in process" result if an "in process" result exists
        - the "released" result if a "released" result exists
        - a combined result if both - an "in process" and a "released" result exists
------------------------------------------------------------------------------------------------------------------------*/

define view I_ChmlCmplncCmplRqRslt

  // Take into account CRRs of the unpackaged product

  as select from I_ChmlCmplncInfo as UnpackagedProduct

  // use ChmlCmplncProdUUID to have the same association like in the lower select (no issue as info and prod UUID are equal here)

  association [0..*] to I_ChmlCmplncCmplRqRsltCombined as _Combined                on  _Combined.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID

  association [0..1] to I_ChmlCmplncInfo               as _ChmlCmplncInfo          on  _ChmlCmplncInfo.ChmlCmplncInfoUUID = $projection.ChmlCmplncProdUUID
{
      // UUID of unpackaged product

  key UnpackagedProduct.ChmlCmplncInfoUUID                                                                    as  ChmlCmplncInfoUUID,

      // as the UUID of packaged product does not exist we set the UUID of the unpackaged product instead

  key UnpackagedProduct.ChmlCmplncInfoUUID                                                                    as  ChmlCmplncProdUUID,

  key _Combined.CmplRqVersUUID,

      // CRR Info

      _Combined.ReldCmplRqRsltUUID,
      _Combined.CmplRqRsltProcessingStatus,

      case
        when _Combined.PrelimCmplRqRsltUUID is not null then _Combined.PrelimCmplRqRsltUUID
        when _Combined.ReldCmplRqRsltUUID is not null then _Combined.ReldCmplRqRsltUUID
      end                                                                                                     as  CmplRqRsltUUID,

      // If no released status is set, ne released version exists. So the value shall be "No released version exists".

      // --> Therefore we set the domain value to '03'

      case 
        when _Combined.CmplRqRsltReldCmplncSts is not null then _Combined.CmplRqRsltReldCmplncSts
        when _Combined.CmplRqRsltReldCmplncSts is null then '03'
      end as CmplRqRsltReldCmplncSts,

      -- Indicator that there is an in progress version
      cast(
        case
        when _Combined.PrelimCmplRqRsltUUID is not null
          then 'X'
        end as ehfnd_crr_has_prelim_version preserving type
      )                                                                                                       as  CmplRqRsltHasInProgressVersion,

      --Released On
      _Combined.ReleaseDate,

      --Released By
      _Combined.ReleasedByUser,

      _Combined,
      _ChmlCmplncInfo
}
-- Only for Unpackaged Product
where
       UnpackagedProduct.ChmlCmplncInfoType    = 'BU'
  and(
       UnpackagedProduct.MaterialIsSold        = 'X'
    or UnpackagedProduct.MaterialIsTransported = 'X'
    or UnpackagedProduct.MaterialIsProduced    = 'X'
  )

// Take into account CRRs of the packaged product(s)

union all 
select from I_ChmlCmplncInfo       as UnpackagedProduct
  join            I_ChmlCmplncProdAssgmt as PackagedProduct on PackagedProduct.ChmlCmplncProdUUID = UnpackagedProduct.ChmlCmplncInfoUUID

association [0..*] to I_ChmlCmplncCmplRqRsltCombined as _Combined       on _Combined.ChmlCmplncInfoUUID = $projection.ChmlCmplncInfoUUID
association [0..1] to I_ChmlCmplncInfo               as _ChmlCmplncInfo on _ChmlCmplncInfo.ChmlCmplncInfoUUID = $projection.ChmlCmplncProdUUID

{
      // UUID of packaged product

  key PackagedProduct.ChmlCmplncInfoUUID                                                                                  as  ChmlCmplncInfoUUID, // in case of a packaged product set UUID of the packaged product


      // UUID of unpackaged product

  key UnpackagedProduct.ChmlCmplncInfoUUID                                                                                as  ChmlCmplncProdUUID,

  key _Combined.CmplRqVersUUID,

      // CRR Info

      _Combined.ReldCmplRqRsltUUID,
      _Combined.CmplRqRsltProcessingStatus,

      case
        when _Combined.PrelimCmplRqRsltUUID is not null then _Combined.PrelimCmplRqRsltUUID
        when _Combined.ReldCmplRqRsltUUID is not null then _Combined.ReldCmplRqRsltUUID
      end                                                                                                                 as  CmplRqRsltUUID,

      // If no released status is set, ne released version exists. So the value shall be "No released version exists".

      // --> Therefore we set the domain value to '03'

      case 
        when _Combined.CmplRqRsltReldCmplncSts is not null then _Combined.CmplRqRsltReldCmplncSts
        when _Combined.CmplRqRsltReldCmplncSts is null then '03'
      end as CmplRqRsltReldCmplncSts,

      -- Indicator that there is an in progress version
      cast(
        case
        when _Combined.PrelimCmplRqRsltUUID is not null
          then 'X'
        end as ehfnd_crr_has_prelim_version preserving type
      )                                                                                                                   as  CmplRqRsltHasInProgressVersion,

      --Released On
      _Combined.ReleaseDate,

      --Released By
      _Combined.ReleasedByUser,

      _Combined,
      _ChmlCmplncInfo
}
-- Only for Unpackaged Product
where
       UnpackagedProduct.ChmlCmplncInfoType    = 'BU'
  and(
       UnpackagedProduct.MaterialIsSold        = 'X'
    or UnpackagedProduct.MaterialIsTransported = 'X'
    or UnpackagedProduct.MaterialIsProduced    = 'X'
  )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CHMLCMPLNCCMPLRQRSLTCOMBINED",
"I_CHMLCMPLNCINFO",
"I_CHMLCMPLNCPRODASSGMT"
],
"ASSOCIATED":
[
"I_CHMLCMPLNCCMPLRQRSLTCOMBINED",
"I_CHMLCMPLNCINFO"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/