R_PRODSUBSTNTP
Product Substitution TP
R_PRODSUBSTNTP is a CDS View in S/4HANA. Product Substitution TP. 4 CDS views read from this table.
CDS Views using this table (4)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| A_ProdSubstn | view_entity | projection | CONSUMPTION | Product Substitution |
| A_ProdSubstn_2 | view_entity | projection | CONSUMPTION | Product Substitution |
| A_ProdSubstn_3 | view_entity | projection | CONSUMPTION | Product Substitution |
| C_ProdSubstnTP | view_entity | projection | CONSUMPTION | Manage Substitutions - Products |
//@AbapCatalog: {
// compiler.compareFilter: true,
// preserveKey: true,
// sqlViewName: 'RPRODSUBSTNTP'
//}
@AccessControl: {
authorizationCheck: #MANDATORY,
personalData.blocking: #NOT_REQUIRED,
privilegedAssociations: [
'_CreatedByUser',
'_LastChangedByUser'
]
}
//@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Product Substitution TP'
@ObjectModel: {
representativeKey: 'MDSubstnUUID',
usageType: {
dataClass: #TRANSACTIONAL,
serviceQuality: #A,
sizeCategory: #M
}
}
@ObjectModel.sapObjectNodeType.name: 'ProductSubstitution'
@VDM: {
lifecycle: {
contract.type: #SAP_INTERNAL_API
},
viewType: #TRANSACTIONAL
}
/*+[hideWarning] { "IDS" : [ "CALCULATED_FIELD_CHECK" ] } */
define root view entity R_ProdSubstnTP
as select from R_MDSubstnTP
left outer to one join I_SrvcPartsSubstnLocIndep as _LocIndep on _LocIndep.SrvcPartsSubstitutionUUID = R_MDSubstnTP.MDSubstnUUID
left outer to one join I_SrvcPartsSubstnLocDepdnt as _LocDepdnt on _LocDepdnt.SrvcPartsSubstitutionUUID = R_MDSubstnTP.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
association [0..1] to I_UserContactCard as _CreatedByUser on $projection.CreatedByUser = _CreatedByUser.ContactCardID
association [0..1] to I_UserContactCard as _LastChangedByUser on $projection.LastChangedByUser = _LastChangedByUser.ContactCardID
composition [0..*] of R_ProdSubstnPrdcssrTP as _Predecessors
composition [0..*] of R_ProdSubstnSuccssrTP as _Successors
{
key R_MDSubstnTP.MDSubstnUUID,
R_MDSubstnTP.MDSubstnObjectType,
@ObjectModel.foreignKey.association: '_Product'
cast( R_MDSubstnTP.MDObject as productnumber ) as Product,
@ObjectModel.foreignKey.association: '_SubstituteProduct'
cast( R_MDSubstnTP.MDSubstitute as md_substitute_product ) as SubstituteProduct,
R_MDSubstnTP.MDSubstnContextObjectType,
@ObjectModel.foreignKey.association: '_Plant'
cast( R_MDSubstnTP.MDSubstnContextObject as werks_d ) as Plant,
R_MDSubstnTP.MDSubstnContextObjectType2,
R_MDSubstnTP.MDSubstnGroup,
R_MDSubstnTP.MDSubstnVersionValue,
R_MDSubstnTP.MDSubstnSet,
@ObjectModel.foreignKey.association: '_ExitIndicator'
R_MDSubstnTP.MDSubstnIsExit,
@ObjectModel.foreignKey.association: '_LeadIndicator'
R_MDSubstnTP.MDSubstnIsLeading,
R_MDSubstnTP.MDSubstnSequenceValue,
R_MDSubstnTP.MDSubstnConversionNumerator,
R_MDSubstnTP.MDSubstnConversionDenominator,
R_MDSubstnTP.MDSubstnConversionPercent,
R_MDSubstnTP.MDSubstnValidityStartDateTime,
R_MDSubstnTP.MDSubstnValidityStartDate,
R_MDSubstnTP.MDSubstnValidityStartTime,
R_MDSubstnTP.MDSubstnValidityEndDateTime,
R_MDSubstnTP.MDSubstnValidityEndDate,
R_MDSubstnTP.MDSubstnValidityEndTime,
R_MDSubstnTP.TimeZoneID,
R_MDSubstnTP.MDSubstnReason,
R_MDSubstnTP.MDSubstnStatus,
@ObjectModel.foreignKey.association: '_MDSubstnIsRlvtForATPProd'
R_MDSubstnTP.MDSubstnIsRlvtForATPProd,
@ObjectModel.foreignKey.association: '_MDSubstnIsRelevantForESPP'
R_MDSubstnTP.MDSubstnIsRelevantForESPP,
R_MDSubstnTP.CreatedByUser,
R_MDSubstnTP.CreationDateTime,
R_MDSubstnTP.LastChangedByUser,
R_MDSubstnTP.LastChangeDateTime,
// eSPP Attributes for Location Independent
_LocIndep.SrvcPartsSubstnRelshpCode,
_LocIndep.SrvcPartsSubstnUseUpStrategy,
_LocIndep.SrvcPartsSubstnUseUpDate,
_LocIndep.SrvcPartsIntchgtyGroupType,
_LocIndep.SrvcPartsSubstnReplacementCode,
// eSPP Attributes for Location Dependent
_LocDepdnt.SrvcPartsStockExhaustionDate,
_LocDepdnt.SrvcPartsSuccessorProdPlndDate,
_LocDepdnt.SrvcPartsStkExhaustionWrngDate,
_LocDepdnt.SrvcPartsSuccessorProdRcptDate,
_LocDepdnt.SrvcPartsReorganizationEndDate,
_LocDepdnt.SrvcPartsProdSubstnFinalDate,
/* Associations */
R_MDSubstnTP._MDObjectType,
R_MDSubstnTP._ContextObjectTypeCode,
R_MDSubstnTP._ContextObjectTypeCode2,
_Product,
_SubstituteProduct,
_Plant,
R_MDSubstnTP._Group,
_ExitIndicator,
_LeadIndicator,
R_MDSubstnTP._TimeZone,
R_MDSubstnTP._Reason,
R_MDSubstnTP._Status,
_MDSubstnIsRlvtForATPProd,
_MDSubstnIsRelevantForESPP,
_CreatedByUser,
_LastChangedByUser,
_LocIndep._RelType,
_LocIndep._UseUpStr,
_LocIndep._IntType,
_LocIndep._RepType,
_Predecessors,
_Successors
}
where
R_MDSubstnTP.MDSubstnObjectType = 'Product'
and R_MDSubstnTP.MDSubstnContextObjectType = 'Plant'
and(
R_MDSubstnTP.MDSubstnContextObjectType2 is initial
or R_MDSubstnTP.MDSubstnContextObjectType2 is null
)