I_MasterRecipeHeaderTP

DDL: I_MASTERRECIPEHEADERTP SQL: IMRCHDRTP Type: view_entity TRANSACTIONAL

Master Recipe - Header

I_MasterRecipeHeaderTP is a Transactional CDS View that provides data about "Master Recipe - Header" in SAP S/4HANA. It reads from 2 data sources (I_MasterRecipeHeader, I_MasterRecipe) and exposes 37 fields with key fields MasterRecipeGroup, MasterRecipe, MasterRecipeInternalVersion. It has 5 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_MasterRecipeHeader plko from
I_MasterRecipe plkz inner

Associations (5)

CardinalityTargetAliasCondition
[0..*] I_MasterRecipeMaterialAssgmtTP _MatlAssgmt $projection.MasterRecipeGroup = _MatlAssgmt.MasterRecipeGroup and $projection.MasterRecipe = _MatlAssgmt.MasterRecipe and $projection.ValidityEndDate >= _MatlAssgmt.ValidityStartDate and $projection.ValidityStartDate <= _MatlAssgmt.ValidityEndDate -- to Operations
[0..*] I_MasterRecipeOperationTP _Operation $projection.MasterRecipeGroup = _Operation.MasterRecipeGroup and $projection.MasterRecipe = _Operation.MasterRecipe and $projection.ValidityEndDate >= _Operation.ValidityStartDate and $projection.ValidityStartDate <= _Operation.ValidityEndDate -- to root node
[0..1] I_MasterRecipeMaterialCount _MatlCount $projection.MasterRecipeGroup = _MatlCount.MasterRecipeGroup and $projection.MasterRecipe = _MatlCount.MasterRecipe
[0..1] I_ChangeMaster _ChangeMaster $projection.ChangeNumber = _ChangeMaster.ChangeNumber
[1..1] I_Plant _Plant $projection.Plant = _Plant.Plant

Annotations (8)

NameValueLevelField
AccessControl.authorizationCheck #CHECK view
EndUserText.label Master Recipe - Header view
ObjectModel.representativeKey MasterRecipeInternalVersion view
VDM.viewType #TRANSACTIONAL view
VDM.lifecycle.contract.type #SAP_INTERNAL_API view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.dataClass #MASTER view

Fields (37)

KeyFieldSource TableSource FieldDescription
KEY MasterRecipeGroup I_MasterRecipeHeader BillOfOperationsGroup
KEY MasterRecipe I_MasterRecipeHeader BillOfOperationsVariant
KEY MasterRecipeInternalVersion I_MasterRecipeHeader BOOInternalVersionCounter
IsMarkedForDeletion I_MasterRecipe IsMarkedForDeletion
BillOfOperationsDesc I_MasterRecipeHeader BillOfOperationsDesc
Plant I_MasterRecipeHeader Plant
BillOfOperationsUsage I_MasterRecipeHeader BillOfOperationsUsage
BillOfOperationsStatus I_MasterRecipeHeader BillOfOperationsStatus
ResponsiblePlannerGroup I_MasterRecipeHeader ResponsiblePlannerGroup
BillOfOperationsProfile I_MasterRecipeHeader BillOfOperationsProfile
MinimumLotSizeQuantity I_MasterRecipeHeader MinimumLotSizeQuantity
MaximumLotSizeQuantity I_MasterRecipeHeader MaximumLotSizeQuantity
BillOfOperationsUnit I_MasterRecipeHeader BillOfOperationsUnit
LongTextLanguageCode I_MasterRecipeHeader LongTextLanguageCode
PlainLongText I_MasterRecipeHeader PlainLongText
CreationDate I_MasterRecipeHeader CreationDate
CreatedByUser I_MasterRecipeHeader CreatedByUser
LastChangeDate I_MasterRecipeHeader LastChangeDate
LastChangedByUser I_MasterRecipeHeader LastChangedByUser
ValidityStartDate I_MasterRecipeHeader ValidityStartDate
ValidityEndDate I_MasterRecipeHeader ValidityEndDate
ChangeNumber I_MasterRecipeHeader ChangeNumber
ChangedDateTime _RcpTP ChangedDateTime
OperationReferenceQuantity I_MasterRecipeHeader OperationReferenceQuantity
OperationUnit I_MasterRecipeHeader OperationUnit
OpQtyToBaseQtyNmrtr I_MasterRecipeHeader OpQtyToBaseQtyNmrtr
OpQtyToBaseQtyDnmntr I_MasterRecipeHeader OpQtyToBaseQtyDnmntr
ChangeNumberDescription _ChangeMaster ChangeNumberDescription
PlantName _Plant PlantName
_MatlAssgmt _MatlAssgmt
_Operation _Operation
_RcpTP _RcpTP
_UsageText _UsageText
_StatusText _StatusText
_MatlCount _MatlCount
_ChangeMaster _ChangeMaster
_Plant _Plant
//@AbapCatalog.sqlViewName: 'IMRCHDRTP'

//@AbapCatalog.compiler.compareFilter: true

//@AbapCatalog.preserveKey: true

@AccessControl.authorizationCheck: #CHECK
//@ClientHandling.algorithm: #SESSION_VARIABLE

@EndUserText.label: 'Master Recipe - Header'
@ObjectModel.representativeKey: 'MasterRecipeInternalVersion'
@VDM:{ viewType: #TRANSACTIONAL, lifecycle.contract.type: #SAP_INTERNAL_API }
@ObjectModel.usageType: { serviceQuality: #C, sizeCategory: #M, dataClass: #MASTER }
define view entity I_MasterRecipeHeaderTP
  as select from I_MasterRecipeHeader as plko
    inner join   I_MasterRecipe       as plkz on  plko.BillOfOperationsType    = plkz.BillOfOperationsType
                                              and plko.BillOfOperationsGroup   = plkz.BillOfOperationsGroup
                                              and plko.BillOfOperationsVariant = plkz.BillOfOperationsVariant
  -- to Material Assignments
  association [0..*] to I_MasterRecipeMaterialAssgmtTP        as _MatlAssgmt   on  $projection.MasterRecipeGroup =  _MatlAssgmt.MasterRecipeGroup
                                                                               and $projection.MasterRecipe      =  _MatlAssgmt.MasterRecipe
                                                                               and $projection.ValidityEndDate   >= _MatlAssgmt.ValidityStartDate
                                                                               and $projection.ValidityStartDate <= _MatlAssgmt.ValidityEndDate
  -- to Operations
  association [0..*] to I_MasterRecipeOperationTP             as _Operation    on  $projection.MasterRecipeGroup =  _Operation.MasterRecipeGroup
                                                                               and $projection.MasterRecipe      =  _Operation.MasterRecipe
                                                                               and $projection.ValidityEndDate   >= _Operation.ValidityStartDate
                                                                               and $projection.ValidityStartDate <= _Operation.ValidityEndDate
  -- to root node
  association        to parent I_MasterRecipeNonHistoricHdrTP as _RcpTP        on  $projection.MasterRecipeGroup = _RcpTP.MasterRecipeGroup
                                                                               and $projection.MasterRecipe      = _RcpTP.MasterRecipe
  association        to I_BillOfOperationsStatusText          as _StatusText   on  $projection.BillOfOperationsStatus = _StatusText.BillOfOperationsStatus
                                                                               and _StatusText.Language               = $session.system_language
  association        to I_BillOfOperationsUsageText           as _UsageText    on  $projection.BillOfOperationsUsage = _UsageText.BillOfOperationsUsage
                                                                               and _UsageText.Language               = $session.system_language
  //Association for Product Count

  association [0..1] to I_MasterRecipeMaterialCount           as _MatlCount    on  $projection.MasterRecipeGroup = _MatlCount.MasterRecipeGroup
                                                                               and $projection.MasterRecipe      = _MatlCount.MasterRecipe

  association [0..1] to I_ChangeMaster                        as _ChangeMaster on  $projection.ChangeNumber = _ChangeMaster.ChangeNumber

  association [1..1] to I_Plant                               as _Plant        on  $projection.Plant = _Plant.Plant

{
      //I_MasterRecipeHeader

  key plko.BillOfOperationsGroup     as MasterRecipeGroup,
  key plko.BillOfOperationsVariant   as MasterRecipe,
  key plko.BOOInternalVersionCounter as MasterRecipeInternalVersion,
      plkz.IsMarkedForDeletion       as IsMarkedForDeletion, // DELKZ

      @Semantics.text: true
      plko.BillOfOperationsDesc,
      plko.Plant,
      plko.BillOfOperationsUsage,
      plko.BillOfOperationsStatus,
      plko.ResponsiblePlannerGroup,
      plko.BillOfOperationsProfile,
      @Semantics.quantity.unitOfMeasure: 'BillOfOperationsUnit'
      plko.MinimumLotSizeQuantity,
      @Semantics.quantity.unitOfMeasure: 'BillOfOperationsUnit'
      plko.MaximumLotSizeQuantity,
      //      @Semantics.unitOfMeasure: true

      plko.BillOfOperationsUnit,
      @Semantics.language: true
      plko.LongTextLanguageCode,
      @Semantics.text: true
      plko.PlainLongText,
      plko.CreationDate,
      plko.CreatedByUser,
      plko.LastChangeDate,
      plko.LastChangedByUser,
      @Semantics.businessDate.from: true
      plko.ValidityStartDate,
      @Semantics.businessDate.to: true
      plko.ValidityEndDate,
      plko.ChangeNumber,
      _RcpTP.ChangedDateTime, // From PLKZ


      // Default values of Activity

      @Semantics.quantity.unitOfMeasure: 'OperationUnit'
      plko.OperationReferenceQuantity,
      plko.OperationUnit,
      plko.OpQtyToBaseQtyNmrtr,
      plko.OpQtyToBaseQtyDnmntr,
      _ChangeMaster.ChangeNumberDescription,
      _Plant.PlantName,

      /* Associations */
      //I_MasterRecipeHeader

      _MatlAssgmt,
      _Operation,
      _RcpTP,
      _UsageText,
      _StatusText,
      _MatlCount,
      _ChangeMaster,
      _Plant
}
where
      plko.IsDeleted           <> 'X'
  and plko.IsImplicitlyDeleted <> 'X'