P_RecipeOverview

DDL: P_RECIPEOVERVIEW SQL: PRCPOVERVIEW Type: view CONSUMPTION Package: VDM_PLMB_RCP

Private view for the Recipe Overview

P_RecipeOverview is a Consumption CDS View that provides data about "Private view for the Recipe Overview" in SAP S/4HANA. It reads from 1 data source (I_RecipeForKeyDate) and exposes 42 fields with key field RecipeUUID. It has 2 associations to related views. Part of development package VDM_PLMB_RCP.

Data Sources (1)

SourceAliasJoin Type
I_RecipeForKeyDate I_RecipeForKeyDate from

Parameters (1)

NameTypeDefault
P_KeyDate sydate

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_CalendarDate _ValidFromDate _ValidFromDate.CalendarDate = $projection.RecipeValidityStartDate
[0..1] I_CalendarDate _SessionDate _SessionDate.CalendarDate = $session.system_date

Annotations (8)

NameValueLevelField
AbapCatalog.preserveKey true view
AbapCatalog.sqlViewName PRCPOVERVIEW view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.lifecycle.contract.type #NONE view
VDM.viewType #CONSUMPTION view
VDM.private true view

Fields (42)

KeyFieldSource TableSource FieldDescription
KEY RecipeUUID RecipeUUID
RecipeUniqueID RecipeUniqueID
Recipe Recipe
RecipePrimaryOutputInternalID RecipePrimaryOutputInternalID
RecipeAlternativeNumber RecipeAlternativeNumber
RecipeVersionNumber RecipeVersionNumber
RecipeCreatedByUser RecipeCreatedByUser
RecipeCreationDateTime RecipeCreationDateTime
RecipeLastChangedByUser RecipeLastChangedByUser
RecipeLastChangeDateTime RecipeLastChangeDateTime
RecipeType RecipeType
RecipePurpose RecipePurpose
RecipeStatus RecipeStatus
RecipeStatusSchema RecipeStatusSchema
RcpFmlaUUID RcpFmlaUUID
RecipeProcessUUID RecipeProcessUUID
RecipePropertySpecInternalID RecipePropertySpecInternalID
RecipeIsDeleted RecipeIsDeleted
RecipeIsArchived RecipeIsArchived
RecipeValidityStartDate RecipeValidityStartDate
RecipeValidityEndDate RecipeValidityEndDate
RecipeValidityMinQuantity RecipeValidityMinQuantity
RecipeValidityMaxQuantity RecipeValidityMaxQuantity
RecipeValidityUnit RecipeValidityUnit
RecipeAuthorizationGroup RecipeAuthorizationGroup
RcpValidityStartDateYearWeek
RcpValidityStartDateWeek
_AuthorizationGroup _AuthorizationGroup
_CreatedByUser _CreatedByUser
_FormulaForKeyDate _FormulaForKeyDate
_LastChangedByUser _LastChangedByUser
_LogAccMObjectTypeActive _LogAccMObjectTypeActive
_LogAccMObjectUserAuthzn _LogAccMObjectUserAuthzn
_LogAccMObjSecureIDAssgmt _LogAccMObjSecureIDAssgmt
_Plant _Plant
_PrimaryOutputSpecification _PrimaryOutputSpecification
_RecipeDescription _RecipeDescription
_RecipePurpose _RecipePurpose
_RecipeStatus _RecipeStatus
_RecipeType _RecipeType
_ValidFromDate _ValidFromDate
_SessionDate _SessionDate
@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName: 'PRCPOVERVIEW'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE

@VDM.lifecycle.contract.type: #NONE
@VDM.viewType: #CONSUMPTION
@VDM.private: true

define view P_RecipeOverview
  with parameters
    @Environment.systemField: #SYSTEM_DATE
    P_KeyDate : sydate
  as select from I_RecipeForKeyDate( P_KeyDate: $parameters.P_KeyDate )
  association [0..1] to I_CalendarDate as _ValidFromDate on _ValidFromDate.CalendarDate = $projection.RecipeValidityStartDate
  association [0..1] to I_CalendarDate as _SessionDate   on _SessionDate.CalendarDate = $session.system_date
{
      //I_RecipeForKeyDate

  key RecipeUUID,
      RecipeUniqueID,
      Recipe,
      RecipePrimaryOutputInternalID,
      RecipeAlternativeNumber,
      RecipeVersionNumber,
      RecipeCreatedByUser,
      RecipeCreationDateTime,
      RecipeLastChangedByUser,
      RecipeLastChangeDateTime,
      RecipeType,
      RecipePurpose,
      RecipeStatus,
      RecipeStatusSchema,
      RcpFmlaUUID,
      RecipeProcessUUID,
      RecipePropertySpecInternalID,
      RecipeIsDeleted,
      RecipeIsArchived,
      RecipeValidityStartDate,
      RecipeValidityEndDate,
      RecipeValidityMinQuantity,
      RecipeValidityMaxQuantity,
      RecipeValidityUnit,
      RecipeAuthorizationGroup,

      cast
      (
        case
        when
          _ValidFromDate.YearWeek >= _SessionDate.YearWeek
        then 'X'
        else ''
        end
      as boole_d preserving type
      )
                               as RcpIsValidFromSessionYearWeek,

      cast( _ValidFromDate.YearWeek as /plmb/rcp_valid_from_year_week preserving type)
                               as RcpValidityStartDateYearWeek,

      cast( _ValidFromDate.CalendarWeek  as /plmb/rcp_valid_from_week preserving type)
                               as RcpValidityStartDateWeek,

      /* Associations */
      //I_RecipeForKeyDate

      _AuthorizationGroup,
      _CreatedByUser,
      _FormulaForKeyDate,
      _LastChangedByUser,
      _LogAccMObjectTypeActive,
      _LogAccMObjectUserAuthzn,
      _LogAccMObjSecureIDAssgmt,
      _Plant,
      _PrimaryOutputSpecification,
      _RecipeDescription,
      _RecipePurpose,
      _RecipeStatus,
      _RecipeType,

      //I_CalendarDate

      _ValidFromDate,
      _SessionDate
}
where
  RecipeIsDeleted <> 'X'