@AccessControl: {
authorizationCheck: #CHECK,
privilegedAssociations: [
'_CreatedByUser',
'_LastChangedByUser'
]
}
@EndUserText.label: 'Manage Substitutions - Products'
@Metadata.allowExtensions: true
@ObjectModel: {
representativeKey: 'MDSubstnUUID',
semanticKey: [ 'Product', 'SubstituteProduct' ],
usageType: {
dataClass: #TRANSACTIONAL,
serviceQuality: #C,
sizeCategory: #M
}
}
@Search.searchable: true
@VDM: {
usage.type: [ #TRANSACTIONAL_PROCESSING_SERVICE ],
viewType: #CONSUMPTION
}
define root view entity C_ProdSubstnTP
provider contract transactional_query
as projection on R_ProdSubstnTP
association [0..*] to C_ProdSubstnSet as _SubstitutionSet on $projection.MDSubstnObjectType = _SubstitutionSet.MDSubstnObjectType
and $projection.Product = _SubstitutionSet.Product
and $projection.MDSubstnContextObjectType = _SubstitutionSet.MDSubstnContextObjectType
and $projection.Plant = _SubstitutionSet.Plant
and $projection.MDSubstnContextObjectType2 = _SubstitutionSet.MDSubstnContextObjectType2
and $projection.MDSubstnGroup = _SubstitutionSet.MDSubstnGroup
and $projection.MDSubstnVersionValue = _SubstitutionSet.MDSubstnVersionValue
and $projection.MDSubstnSet = _SubstitutionSet.MDSubstnSet
association [0..*] to C_ProdSubstnExclsn as _SubstituteExclusion on $projection.MDSubstnObjectType = _SubstituteExclusion.MDSubstnObjectType
and $projection.SubstituteProduct = _SubstituteExclusion.Product
and $projection.MDSubstnContextObjectType = _SubstituteExclusion.MDSubstnContextObjectType
and $projection.Plant = _SubstituteExclusion.Plant
and $projection.MDSubstnContextObjectType2 = _SubstituteExclusion.MDSubstnContextObjectType2
and $projection.MDSubstnGroup = _SubstituteExclusion.MDSubstnGroup
and $projection.MDSubstnVersionValue = _SubstituteExclusion.MDSubstnVersionValue
{
key MDSubstnUUID,
MDSubstnObjectType,
@Consumption: {
semanticObject: 'Material',
valueHelpDefinition: [{ entity: { name: 'I_ProductStdVH', element: 'Product' } }]
}
@ObjectModel.text.element: ['ProductDescription']
Product,
_Product._Text.ProductName as ProductDescription : localized,
@ObjectModel.text.association: null
_Product.Product as Material,
@Consumption: {
semanticObject: 'Material',
valueHelpDefinition: [{ entity: { name: 'I_ProductStdVH', element: 'Product' } }]
}
@ObjectModel.text.element: ['SubstituteProductDescription']
SubstituteProduct,
_SubstituteProduct._Text.ProductName as SubstituteProductDescription : localized,
@ObjectModel.text.association: null
_SubstituteProduct.Product as MatlFilterAnlytlMod,
MDSubstnContextObjectType,
@Consumption: {
valueHelpDefinition: [{ entity: { name: 'I_PlantStdVH', element: 'Plant' } }]
}
@ObjectModel.text.element: ['PlantName']
Plant,
_Plant.PlantName,
_Plant.Plant as PlntFilterAnlytlMod,
MDSubstnContextObjectType2,
@Consumption: {
semanticObject: 'ProductSubstitutionGroup',
valueHelpDefinition: [{ entity: { name: 'C_ProdSubstnGrpVH', element: 'MDSubstnGroup' },
additionalBinding: [{ localElement: 'MDSubstnVersionValue', element: 'MDSubstnVersionValue' }] }]
}
@ObjectModel.text.element: ['MDSubstnGroupDescription']
MDSubstnGroup,
_Group._GroupText.MDSubstnGroupDescription : localized,
MDSubstnVersionValue,
@Feature: 'SW:PROD_SUBSTN_ENABLE_ESPP'
MDSubstnSet,
MDSubstnIsExit,
MDSubstnIsLeading,
MDSubstnSequenceValue,
MDSubstnConversionNumerator,
MDSubstnConversionDenominator,
@Feature: 'SW:PROD_SUBSTN_ENABLE_ESPP'
MDSubstnConversionPercent,
// @Consumption.filter.hidden: true
@Semantics.timeZoneReference: 'TimeZoneID'
MDSubstnValidityStartDateTime,
MDSubstnValidityStartDate,
MDSubstnValidityStartTime,
// @Consumption.filter.hidden: true
@Semantics.timeZoneReference: 'TimeZoneID'
MDSubstnValidityEndDateTime,
MDSubstnValidityEndDate,
MDSubstnValidityEndTime,
@Consumption: {
// valueHelpDefinition: [{ entity: { name: 'I_TimeZone', element: 'TimeZoneID' } }]
valueHelpDefinition: [{ entity: { name: 'C_MDSubstnTmznDfltIANACodeVH', element: 'TimeZoneIANACode'} }] //'TimeZoneID'
}
// @ObjectModel.text.element: ['TimeZoneText']
@Semantics.timeZone: true
TimeZoneID,
_TimeZone._TimeZoneText.TimeZoneText : localized,
@Consumption: {
semanticObject: 'ProductSubstitutionReason',
valueHelpDefinition: [{ entity: { name: 'C_ProdSubstnRsnVH', element: 'MDSubstnReason' } }]
}
@ObjectModel.text.element: ['MDSubstnReasonDescription']
MDSubstnReason,
_Reason._Text.MDSubstnReasonDescription : localized,
@Consumption: {
valueHelpDefinition: [{ entity: { name: 'I_MDSubstnSts', element: 'MDSubstnStatus' } }]
}
@ObjectModel.text.element: ['MDSubstnStatusDescription']
MDSubstnStatus,
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_PRODSUBSTN_VIRTUAL_ELEMENTS'
virtual MDSubstnStatusCriticality : abap.int1,
_Status._Text.MDSubstnStatusDescription : localized,
@Feature: 'SW:PROD_SUBSTN_ENABLE_ESPP'
MDSubstnIsRlvtForATPProd,
@Feature: 'SW:PROD_SUBSTN_ENABLE_ESPP'
MDSubstnIsRelevantForESPP,
@ObjectModel.text.element: ['CreatedByUserFullName']
CreatedByUser,
_CreatedByUser.FullName as CreatedByUserFullName,
CreationDateTime,
@ObjectModel.text.element: ['LastChangedByUserFullName']
LastChangedByUser,
_LastChangedByUser.FullName as LastChangedByUserFullName,
LastChangeDateTime,
@Consumption: {
valueHelpDefinition: [{ entity: { name: 'I_MDSubstnExclsnSts', element: 'MDSubstnExclsnSts' } }]
}
@EndUserText: {
label: 'Substitute Exclusion Status',
quickInfo: 'Substitute Exclusion Status'
}
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_PRODSUBSTN_VIRTUAL_ELEMENTS'
virtual MDSubstnExclsnSts : md_substn_status_text,
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_PRODSUBSTN_VIRTUAL_ELEMENTS'
virtual MDSubstnExclsnStsCritlty : abap.int1,
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_PRODSUBSTN_VIRTUAL_ELEMENTS'
virtual MDSubstnDfltGroupIsToBeConsdrd : md_substn_is_default_group,
@ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_PRODSUBSTN_VIRTUAL_ELEMENTS'
virtual IsCloudSystem : abap.char( 1 ),
/* Start - Lightweight Business switch: Enable eSPP fields in Hybrid & OP systems only*/
// [eSPP] Location Independent
@Feature: 'SW:PROD_SUBSTN_ENABLE_ESPP'
@Consumption: {
filter.hidden: true,
valueHelpDefinition: [{ entity: { name: 'I_SrvcPartsRelType', element: 'SrvcPartsSubstnRelshpCode' } }]
}
SrvcPartsSubstnRelshpCode,
@Feature: 'SW:PROD_SUBSTN_ENABLE_ESPP'
@Consumption: {
filter.hidden: true,
valueHelpDefinition: [{ entity: { name: 'I_SrvcPartsUseUpStr', element: 'SrvcPartsUseUpStrgy' } }]
}
SrvcPartsSubstnUseUpStrategy,
@Feature: 'SW:PROD_SUBSTN_ENABLE_ESPP'
@Consumption.filter.hidden: true
SrvcPartsSubstnUseUpDate,
@Feature: 'SW:PROD_SUBSTN_ENABLE_ESPP'
@Consumption: {
filter.hidden: true,
valueHelpDefinition: [{ entity: { name: 'I_SrvcPartsIntchgtyType', element: 'SrvcPartsIntchgtyGroupType' } }]
}
SrvcPartsIntchgtyGroupType,
@Feature: 'SW:PROD_SUBSTN_ENABLE_ESPP'
@Consumption: {
filter.hidden: true,
valueHelpDefinition: [{ entity: { name: 'I_SrvcPartsRepType', element: 'SrvcPartsSubstnReplacementCode' } }]
}
SrvcPartsSubstnReplacementCode,
// [eSPP] Location Dependent
@Feature: 'SW:PROD_SUBSTN_ENABLE_ESPP'
@Consumption.filter.hidden: true
SrvcPartsStockExhaustionDate,
@Feature: 'SW:PROD_SUBSTN_ENABLE_ESPP'
@Consumption.filter.hidden: true
SrvcPartsSuccessorProdPlndDate,
@Feature: 'SW:PROD_SUBSTN_ENABLE_ESPP'
@Consumption.filter.hidden: true
SrvcPartsStkExhaustionWrngDate,
@Feature: 'SW:PROD_SUBSTN_ENABLE_ESPP'
@Consumption.filter.hidden: true
SrvcPartsSuccessorProdRcptDate,
@Feature: 'SW:PROD_SUBSTN_ENABLE_ESPP'
@Consumption.filter.hidden: true
SrvcPartsReorganizationEndDate,
@Feature: 'SW:PROD_SUBSTN_ENABLE_ESPP'
@Consumption.filter.hidden: true
SrvcPartsProdSubstnFinalDate,
/* End - Lightweight Business switch: Enable eSPP fields in Hybrid & OP systems only*/
/* Associations */
@Consumption.filter.hidden: true
_MDObjectType,
@Consumption.filter.hidden: true
_ContextObjectTypeCode,
@Consumption.filter.hidden: true
_ContextObjectTypeCode2,
@Consumption.filter.hidden: true
_Product,
@Consumption.filter.hidden: true
_SubstituteProduct,
@Consumption.filter.hidden: true
_Plant,
@Consumption.filter.hidden: true
_Group,
@Consumption.filter.hidden: true
_ExitIndicator,
@Consumption.filter.hidden: true
_LeadIndicator,
@Consumption.filter.hidden: true
_TimeZone,
@Consumption.filter.hidden: true
_Reason,
@Consumption.filter.hidden: true
_Status,
@Consumption.filter.hidden: true
_MDSubstnIsRlvtForATPProd,
@Consumption.filter.hidden: true
_MDSubstnIsRelevantForESPP,
@Consumption.filter.hidden: true
_CreatedByUser,
@Consumption.filter.hidden: true
_LastChangedByUser,
@Consumption.filter.hidden: true
_SubstitutionSet,
@Consumption.filter.hidden: true
_SubstituteExclusion,
@Consumption.filter.hidden: true
_RelType,
@Consumption.filter.hidden: true
_UseUpStr,
@Consumption.filter.hidden: true
_IntType,
@Consumption.filter.hidden: true
_RepType,
@ObjectModel.filter.enabled: false
_Predecessors : redirected to composition child C_ProdSubstnPrdcssrTP,
@ObjectModel.filter.enabled: false
_Successors : redirected to composition child C_ProdSubstnSuccssrTP
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_MDSUBSTNGRP",
"I_MDSUBSTNGRPTEXT",
"I_MDSUBSTNRSN",
"I_MDSUBSTNRSNTEXT",
"I_MDSUBSTNSTS",
"I_MDSUBSTNSTSTEXT",
"I_PLANT",
"I_PRODUCT",
"I_PRODUCTTEXT",
"I_TIMEZONE",
"I_TIMEZONETEXT",
"I_USERCONTACTCARD",
"R_PRODSUBSTNTP"
],
"ASSOCIATED":
[
"C_PRODSUBSTNEXCLSN",
"C_PRODSUBSTNPRDCSSRTP",
"C_PRODSUBSTNSET",
"C_PRODSUBSTNSUCCSSRTP",
"I_INDICATOR",
"I_MDSUBSTNGRP",
"I_MDSUBSTNRSN",
"I_MDSUBSTNSTS",
"I_PLANT",
"I_PRODUCT",
"I_SAPOBJECTTYPE",
"I_SRVCPARTSINTCHGTYTYPE",
"I_SRVCPARTSRELTYPE",
"I_SRVCPARTSREPTYPE",
"I_SRVCPARTSUSEUPSTR",
"I_TIMEZONE",
"I_USERCONTACTCARD",
"R_PRODSUBSTNPRDCSSRTP",
"R_PRODSUBSTNSUCCSSRTP"
],
"BASE":
[
"R_PRODSUBSTNTP"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/