R_PRODSUBSTNPRDCSSRTP

CDS View

Product Substitution (Predecessors) TP

R_PRODSUBSTNPRDCSSRTP is a CDS View in S/4HANA. Product Substitution (Predecessors) TP. 3 CDS views read from this table.

CDS Views using this table (3)

ViewTypeJoinVDMDescription
A_ProdSubstnPredecessor view_entity projection CONSUMPTION Product Substitution Predecessor
A_ProdSubstnPredecessor_2 view_entity projection CONSUMPTION Product Substitution Predecessor
C_ProdSubstnPrdcssrTP view_entity projection CONSUMPTION Manage Substitutions (Predecessors) - Products
//@AbapCatalog: {

//  compiler.compareFilter: true,

//  preserveKey: true,

//  sqlViewName: 'RPRODSUBPRDTP'

//}

@AccessControl: {
  authorizationCheck: #MANDATORY,
  personalData.blocking: #NOT_REQUIRED
}
//@ClientHandling.algorithm: #SESSION_VARIABLE

@EndUserText.label: 'Product Substitution (Predecessors) TP'
@ObjectModel: {
  representativeKey: 'MDSubstnUUID',
  usageType: {
    dataClass: #TRANSACTIONAL,
    serviceQuality: #A,
    sizeCategory: #L
  }
}
@VDM: {
  lifecycle: {
    contract.type: #SAP_INTERNAL_API
  },
  viewType: #TRANSACTIONAL
}

/*+[hideWarning] { "IDS" : [ "CALCULATED_FIELD_CHECK" ]  } */
define view entity R_ProdSubstnPrdcssrTP 
  as select from R_MDSubstnTP
  association        to parent R_ProdSubstnTP as _Substitution              on $projection.MDSubstnMasterUUID = _Substitution.MDSubstnUUID

  association [1..1] to I_Product             as _Product                   on $projection.Product = _Product.Product
  association [1..1] to I_Product             as _SubstituteProduct         on $projection.SubstituteProduct = _SubstituteProduct.Product
  association [0..1] to I_Plant               as _Plant                     on $projection.Plant = _Plant.Plant
  association [1..1] to I_Indicator           as _ExitIndicator             on $projection.MDSubstnIsExit = _ExitIndicator.IndicatorValue
  association [1..1] to I_Indicator           as _LeadIndicator             on $projection.MDSubstnIsLeading = _LeadIndicator.IndicatorValue
  association [1..1] to I_Indicator           as _MDSubstnIsRlvtForATPProd  on $projection.MDSubstnIsRlvtForATPProd = _MDSubstnIsRlvtForATPProd.IndicatorValue
  association [1..1] to I_Indicator           as _MDSubstnIsRelevantForESPP on $projection.MDSubstnIsRelevantForESPP = _MDSubstnIsRelevantForESPP.IndicatorValue
{
  key MDSubstnUUID,

  key cast ( MDSubstnUUID as prod_substn_master_uuid preserving type ) as MDSubstnMasterUUID,

      @Consumption.hidden: true
      MDSubstnObjectType,

      @ObjectModel.foreignKey.association: '_Product'
      cast( MDObject as productnumber )                                as Product,

      @ObjectModel.foreignKey.association: '_SubstituteProduct'
      cast( MDSubstitute as md_substitute_product )                    as SubstituteProduct,

      @Consumption.hidden: true
      MDSubstnContextObjectType,

      @ObjectModel.foreignKey.association: '_Plant'
      cast( MDSubstnContextObject as werks_d )                         as Plant,

      @Consumption.hidden: true
      MDSubstnContextObjectType2,

      MDSubstnGroup,
      MDSubstnVersionValue,
      MDSubstnSet,

      @ObjectModel.foreignKey.association: '_ExitIndicator'
      MDSubstnIsExit,

      @ObjectModel.foreignKey.association: '_LeadIndicator'
      MDSubstnIsLeading,

      MDSubstnSequenceValue,
      MDSubstnConversionNumerator,
      MDSubstnConversionDenominator,
      MDSubstnConversionPercent,
      MDSubstnValidityStartDateTime,
      MDSubstnValidityStartDate,
      MDSubstnValidityStartTime,
      MDSubstnValidityEndDateTime,
      MDSubstnValidityEndDate,
      MDSubstnValidityEndTime,
      TimeZoneID,
      MDSubstnReason,
      MDSubstnStatus,
      MDSubstnIsRlvtForATPProd,

      @ObjectModel.foreignKey.association: '_MDSubstnIsRelevantForESPP'
      MDSubstnIsRelevantForESPP,

      CreatedByUser,
      CreationDateTime,
      LastChangedByUser,
      LastChangeDateTime,

      /* Associations */
      _MDObjectType,
      _ContextObjectTypeCode,
      _ContextObjectTypeCode2,
      _Product,
      _SubstituteProduct,
      _Plant,
      _Group,
      _ExitIndicator,
      _LeadIndicator,
      _TimeZone,
      _Reason,
      _Status,
      _MDSubstnIsRlvtForATPProd,
      _MDSubstnIsRelevantForESPP,
      _CreatedByUser,
      _LastChangedByUser,

      _Substitution
}
where
       MDSubstnObjectType         = 'Product'
  and  MDSubstnContextObjectType  = 'Plant'
  and(
       MDSubstnContextObjectType2 is initial
    or MDSubstnContextObjectType2 is null
  )