C_StockLevelMgmtTP

DDL: C_STOCKLEVELMGMTTP SQL: CSTKLVLMGMTTP Type: view CONSUMPTION Package: ODATA_PP_DD_STLM

Manage Buffer Levels

C_StockLevelMgmtTP is a Consumption CDS View that provides data about "Manage Buffer Levels" in SAP S/4HANA. It reads from 2 data sources (also, I_StockLevelProposalTP) and exposes 100 fields with key fields MRPArea, Plant, Material, ProposalStartDate, ProposalVersion. It has 12 associations to related views. Part of development package ODATA_PP_DD_STLM.

Data Sources (2)

SourceAliasJoin Type
also filter inner
I_StockLevelProposalTP StockProposal from

Associations (12)

CardinalityTargetAliasCondition
[1..1] P_MRPAreaByAreaOfRespy _SDMAreaOfResponsibility $projection.MRPArea = _SDMAreaOfResponsibility.MRPArea and $projection.MRPController = _SDMAreaOfResponsibility.MRPController and _SDMAreaOfResponsibility.UserID = $session.user
[1..1] P_StockLevelMngNumFields _CalFields $projection.Material = _CalFields.Material and $projection.Plant = _CalFields.Plant and $projection.MRPArea = _CalFields.MRPArea ------------------------------ -- Object Page Facets -- -------------------------------
[1..*] C_MaterialDailyDemand _MaterialDailyDemand $projection.Material = _MaterialDailyDemand.Material and $projection.Plant = _MaterialDailyDemand.Plant and $projection.MRPArea = _MaterialDailyDemand.MRPArea
[1..*] C_ProposedBufferMatlBOM _ProposedBOM $projection.Material = _ProposedBOM.Material and $projection.Plant = _ProposedBOM.Plant and $projection.MRPArea = _ProposedBOM.MRPArea
[1..*] C_ProdBufPrflAndClassfctn _BufferClassifications $projection.Material = _BufferClassifications.Material and $projection.Plant = _BufferClassifications.Plant and $projection.MRPArea = _BufferClassifications.MRPArea ------------------------------ -- Dropdown Filters -- -------------------------------
[1..1] C_MatlConsumptionIndValHelp _MatlConsumptionIndValHelp $projection.ConsumptionCode = _MatlConsumptionIndValHelp.ConsumptionCode
[1..1] C_MatlLeadTimeIndValHelp _MatlLeadTimeIndValHelp $projection.ReplenishmentLeadTimeCode = _MatlLeadTimeIndValHelp.ReplenishmentLeadTimeCode
[1..1] C_MatlVariabilityIndValHelp _MatlVariabilityIndValHelp $projection.VariabilityCode = _MatlVariabilityIndValHelp.VariabilityCode
[1..1] C_MatlBOMUsageIndValHelp _MatlBOMUsageIndValHelp $projection.BOMUsageCode = _MatlBOMUsageIndValHelp.BOMUsageCode
[1..1] C_StockLevelProposalStatus _StockProposalStatus $projection.StockLevelProposalStatus = _StockProposalStatus.StockLevelProposalStatus
[1..1] C_MaterialProcurementTypeVH _MaterialProcurementTypeVH $projection.ProcurementType = _MaterialProcurementTypeVH.ProcurementType
[1..1] C_MatlPrpslAdjmtFctrIsAppld _AdjustmentFactor $projection.matlprpsladjmtfctrisapplied = _AdjustmentFactor.MatlPrpslAdjmtFctrIsApplied

Annotations (24)

NameValueLevelField
AbapCatalog.sqlViewName CSTKLVLMGMTTP view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Manage Buffer Levels view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XXL view
Search.searchable true view
UI.headerInfo.description.label Material ID view
UI.headerInfo.description.type #STANDARD view
UI.headerInfo.description.value MaterialName view
UI.headerInfo.title.label Material Description view
UI.headerInfo.title.type #STANDARD view
UI.headerInfo.title.value Material view
UI.headerInfo.typeNamePlural Buffers view
UI.headerInfo.typeName Buffer view
ObjectModel.compositionRoot true view
ObjectModel.draftEnabled true view
ObjectModel.transactionalProcessingDelegated true view
ObjectModel.createEnabled false view
ObjectModel.updateEnabled true view
ObjectModel.deleteEnabled false view

Fields (100)

KeyFieldSource TableSource FieldDescription
KEY MRPArea I_StockLevelProposalTP MRPArea
KEY Plant I_StockLevelProposalTP Plant
KEY Material I_StockLevelProposalTP Material Product
KEY ProposalStartDate I_StockLevelProposalTP ProposalStartDate
KEY ProposalVersion I_StockLevelProposalTP ProposalVersion
UserID _SDMAreaOfResponsibility UserID
MaterialName
PlantName
MRPAreaText _SDMAreaOfResponsibility MRPAreaText
BaseUnit I_StockLevelProposalTP MaterialBaseUnit
StockLevelProposalID I_StockLevelProposalTP StockLevelProposalID
StockLevelProposalStatus I_StockLevelProposalTP StockLevelProposalStatus
ProposalStatusDescription
CurrentRedZone _CalFields CurrentRedZone Current
OriglProposedRedZone I_StockLevelProposalTP OriglProposedRedZone Proposed
PrevRedZoneAdjustmentFctr I_StockLevelProposalTP PrevRedZoneAdjustmentFctr Adjustment Factor On Proposal
RedZoneDifference _CalFields RedZoneDifference Change
ProposedRedZone I_StockLevelProposalTP ProposedRedZone Adjust Current to
CurRedZoneAdjustmentFctr I_StockLevelProposalTP CurRedZoneAdjustmentFctr Adjustment Factor
CurrentYellowZone _CalFields CurrentYellowZone Current
OriglProposedYellowZone I_StockLevelProposalTP OriglProposedYellowZone Proposed
PrevYellowZoneAdjustmentFctr I_StockLevelProposalTP PrevYellowZoneAdjustmentFctr Adjustment Factor On Proposal
YellowZoneDifference _CalFields YellowZoneDifference Change
ProposedYellowZone I_StockLevelProposalTP ProposedYellowZone Adjust Current to
CurYellowZoneAdjustmentFctr I_StockLevelProposalTP CurYellowZoneAdjustmentFctr Adjustment Factor
CurrentGreenZone _CalFields CurrentGreenZone Current
OriglProposedGreenZone I_StockLevelProposalTP OriglProposedGreenZone Proposed
PrevGreenZoneAdjustmentFctr I_StockLevelProposalTP PrevGreenZoneAdjustmentFctr Adjustment Factor On Proposal
GreenZoneDifference _CalFields GreenZoneDifference Change
ProposedGreenZone I_StockLevelProposalTP ProposedGreenZone Adjust Current to
CurGreenZoneAdjustmentFctr I_StockLevelProposalTP CurGreenZoneAdjustmentFctr Adjustment Factor
MaxStockDifference _CalFields MaxStockDifference
MaxStockDeviationRate _CalFields MaxStockDeviationRate Max Stock Deviation
UnitOfMeasure _CalFields UnitOfMeasure
CurrentAverageDailyUsage _CalFields CurrentAverageDailyUsage
ProposedAverageDailyUsage _CalFields ProposedAverageDailyUsage
AvgDailyUsageDifference _CalFields AvgDailyUsageDifference
AvgDailyUsageDeviationRate _CalFields AvgDailyUsageDeviationRate
CurrentVariabilityFactor _CalFields CurrentVariabilityFactor
ProposedVariabilityFactor _CalFields ProposedVariabilityFactor
VariabilityFactorDeviationRate _CalFields VariabilityFactorDeviationRate
VariabilityFactorDifference _CalFields VariabilityFactorDifference
CurrentLeadTime _CalFields CurrentLeadTime
ProposedLeadTime _CalFields ProposedLeadTime
LeadTimeDifference _CalFields LeadTimeDifference
LeadTimeDeviationRate _CalFields LeadTimeDeviationRate
CurrentLeadTimeFactor _CalFields CurrentLeadTimeFactor
ProposedLeadTimeFactor _CalFields ProposedLeadTimeFactor
LeadTimeFactorDifference _CalFields LeadTimeFactorDifference
LeadTimeFactorDeviationRate _CalFields LeadTimeFactorDeviationRate
DifferenceInDays _CalFields DifferenceInDays
MaterialGroup Product Group
MRPController I_StockLevelProposalTP MRPController
PurchasingGroup I_StockLevelProposalTP PurchasingGroup
MRPGroup I_StockLevelProposalTP MRPGroup
MatlPrpslAdjmtFctrIsApplied _CalFields MatlPrpslAdjmtFctrIsApplied Adjustment Factor Exists
NormalizedCurrentGreenZone _CalFields NormalizedCurrentGreenZone
NormalizedCurrentYellowZone _CalFields NormalizedCurrentYellowZone
NormalizedCurrentRedZone _CalFields NormalizedCurrentRedZone
NormalizedProposedGreenZone _CalFields NormalizedProposedGreenZone
NormalizedProposedYellowZone _CalFields NormalizedProposedYellowZone
NormalizedProposedRedZone _CalFields NormalizedProposedRedZone
MRPAreaCategory
HorizonDaysInPast _CalFields HorizonDaysInPast
AvgDailyUsageHorizonEndDate _CalFields AvgDailyUsageHorizonEndDate
AvgDailyUsageHorizonStartDate _CalFields AvgDailyUsageHorizonStartDate
ProposedMaterialBufferProfile _CalFields ProposedMaterialBufferProfile
ProposedMatlBufferProfileText _CalFields ProposedMatlBufferProfileText
BOMUsageCode I_StockLevelProposalTP BOMUsageCode
BOMUsageDescription
ConsumptionCode I_StockLevelProposalTP ConsumptionCode
ConsumptionDescription
VariabilityCode I_StockLevelProposalTP VariabilityCode
VariabilityQuantity _CalFields VariabilityQuantity
VariabilityDescription _CalFields VariabilityDescription
ReplenishmentLeadTimeCode I_StockLevelProposalTP ReplenishmentLeadTimeCode
ReplenishmentLeadTimeValue _CalFields ReplenishmentLeadTimeValue
ReplenishmentLeadTimeDesc _CalFields ReplenishmentLeadTimeDesc
ProcurementType I_StockLevelProposalTP ProcurementType Procurement Type
ProcurementTypeDescription _CalFields ProcurementTypeDescription
CurrentMatlVariabilityCode _CalFields CurrentMatlVariabilityCode
ProposedMatlVariabilityCode I_StockLevelProposalTP VariabilityCode
ProposedMatlVariabilityQty _CalFields ProposedMatlVariabilityQty
ProposedMatlVariabilityUnit _CalFields ProposedMatlVariabilityUnit
CurrentMatlLeadTimeCode _CalFields CurrentMatlLeadTimeCode
ProposedMatlLeadTimeCode I_StockLevelProposalTP ReplenishmentLeadTimeCode
ProposedMatlLeadTime _CalFields ProposedMatlLeadTime
BOMExplosionDate I_StockLevelProposalTP BOMExplosionDate
BufLvlProposalHorizonStartDate _CalFields BufLvlProposalHorizonStartDate
_MatlConsumptionIndValHelp _MatlConsumptionIndValHelp
_MatlLeadTimeIndValHelp _MatlLeadTimeIndValHelp
_MatlVariabilityIndValHelp _MatlVariabilityIndValHelp
_MatlBOMUsageIndValHelp _MatlBOMUsageIndValHelp
_StockProposalStatus _StockProposalStatus
_MaterialProcurementTypeVH _MaterialProcurementTypeVH
_AdjustmentFactor _AdjustmentFactor
_MaterialDailyDemand _MaterialDailyDemand
_ProposedBOM _ProposedBOM
_BufferClassifications _BufferClassifications
_BufMatPlant I_StockLevelProposalTP _BufMatPlant
@AbapCatalog.sqlViewName: 'CSTKLVLMGMTTP'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Manage Buffer Levels'
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #CONSUMPTION


@ObjectModel.usageType: { dataClass:  #MIXED, serviceQuality: #D , sizeCategory: #XXL }

@Search.searchable: true
@ObjectModel.semanticKey:  [ 'MRPArea' ,  'Plant' , 'Material' ]
@UI.headerInfo: {
    description: { label: 'Material ID', type: #STANDARD, value: 'MaterialName' },
    title: { label: 'Material Description', type: #STANDARD, value: 'Material' },
    typeNamePlural: 'Buffers',
    typeName: 'Buffer'
}

@ObjectModel: {
    compositionRoot: true,
    draftEnabled:true,
    transactionalProcessingDelegated:true,
    createEnabled: false,
    updateEnabled: true,
    deleteEnabled: false
}


define view C_StockLevelMgmtTP
  as select from I_StockLevelProposalTP as StockProposal

  ----------------------------------------------------------------------------------------------------------------
  -- inner join also as filter for area of responsibility. Is needed for every selection                        --
  ----------------------------------------------------------------------------------------------------------------

  association [1..1] to P_MRPAreaByAreaOfRespy    as _SDMAreaOfResponsibility   on    $projection.MRPArea             = _SDMAreaOfResponsibility.MRPArea
                                                                                  and $projection.MRPController       = _SDMAreaOfResponsibility.MRPController
                                                                                  and _SDMAreaOfResponsibility.UserID = $session.user
  // All Calculations for this view are obtained from this association.

  association [1..1] to P_StockLevelMngNumFields    as _CalFields                 on  $projection.Material = _CalFields.Material
                                                                                  and $projection.Plant    = _CalFields.Plant
                                                                                  and $projection.MRPArea  = _CalFields.MRPArea
                                                                                  
                                                                                  
  
  

 
  ------------------------------
  -- Object Page Facets      --
  -------------------------------

  //Buffer Schedule Facet : Planning and Performance View

//  association [1..*] to C_MaterialBufferLevelChart  as _MaterialBufferLevelChart  on  $projection.Material = _MaterialBufferLevelChart.Material

//                                                                                  and $projection.Plant    = _MaterialBufferLevelChart.Plant

//                                                                                  and $projection.MRPArea  = _MaterialBufferLevelChart.MRPArea



// association [1..*] to Z_MaterialBufferLevelTable  as _MaterialBufferLevelTable  on  $projection.Material = _MaterialBufferLevelTable.Material

//                                                                                  and $projection.Plant    = _MaterialBufferLevelTable.Plant

//                                                                                  and $projection.MRPArea  = _MaterialBufferLevelTable.MRPArea

//

  // ADU Facet : Demand Data

  association [1..*] to C_MaterialDailyDemand       as _MaterialDailyDemand       on  $projection.Material = _MaterialDailyDemand.Material
                                                                                  and $projection.Plant    = _MaterialDailyDemand.Plant
                                                                                  and $projection.MRPArea  = _MaterialDailyDemand.MRPArea

// association [1..*] to Z_MaterialDailyDemandTable       as _MaterialDailyDemandTable       on  $projection.Material = _MaterialDailyDemandTable.Material

//                                                                                  and $projection.Plant    = _MaterialDailyDemandTable.Plant

//                                                                                  and $projection.MRPArea  = _MaterialDailyDemandTable.MRPArea


// Lead Time Facet : Longest Path in BOM

  association [1..*] to C_ProposedBufferMatlBOM     as _ProposedBOM               on  $projection.Material = _ProposedBOM.Material
                                                                                 and $projection.Plant    = _ProposedBOM.Plant
                                                                                 and $projection.MRPArea  = _ProposedBOM.MRPArea

  // Classifications Facet : Current and Proposed Buffer Profile and Classifications

  association [1..*] to C_ProdBufPrflAndClassfctn   as _BufferClassifications     on  $projection.Material = _BufferClassifications.Material
                                                                                  and $projection.Plant    = _BufferClassifications.Plant
                                                                                  and $projection.MRPArea  = _BufferClassifications.MRPArea

  ------------------------------
  -- Dropdown Filters      --
  -------------------------------

  association [1..1] to C_MatlConsumptionIndValHelp as _MatlConsumptionIndValHelp on  $projection.ConsumptionCode = _MatlConsumptionIndValHelp.ConsumptionCode
  association [1..1] to C_MatlLeadTimeIndValHelp    as _MatlLeadTimeIndValHelp    on  $projection.ReplenishmentLeadTimeCode = _MatlLeadTimeIndValHelp.ReplenishmentLeadTimeCode
  association [1..1] to C_MatlVariabilityIndValHelp as _MatlVariabilityIndValHelp on  $projection.VariabilityCode = _MatlVariabilityIndValHelp.VariabilityCode
  association [1..1] to C_MatlBOMUsageIndValHelp    as _MatlBOMUsageIndValHelp    on  $projection.BOMUsageCode = _MatlBOMUsageIndValHelp.BOMUsageCode
  association [1..1] to C_StockLevelProposalStatus  as _StockProposalStatus       on  $projection.StockLevelProposalStatus = _StockProposalStatus.StockLevelProposalStatus
  association [1..1] to C_MaterialProcurementTypeVH as _MaterialProcurementTypeVH on  $projection.ProcurementType = _MaterialProcurementTypeVH.ProcurementType
  association [1..1] to C_MatlPrpslAdjmtFctrIsAppld as _AdjustmentFactor          on  $projection.matlprpsladjmtfctrisapplied = _AdjustmentFactor.MatlPrpslAdjmtFctrIsApplied




  //Important for Draft 2.0

  //It is necessary for all fields in this view to have the annotation @ObjectModel.readOnly:true , except for those which are editable .

{


        
        @Consumption.valueHelpDefinition: [{entity:{name:'C_MRPAreaValHelp' , element: 'MRPArea'}}]
        @ObjectModel:{
        readOnly: true,
        text.element:  [ 'MRPAreaText' ]
        }
        @UI: {
        textArrangement: #TEXT_LAST,
        fieldGroup: [{ position:'20' , qualifier: 'plantDetails' }]}

        @Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.8 }
  key   StockProposal.MRPArea,
        @Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.8 }
        @UI:{
         selectionField: [ { position: 50 } ] ,
         lineItem: [{ position:20, importance: #HIGH}],
         textArrangement: #TEXT_LAST,
         fieldGroup: [{ position:'10' , qualifier: 'plantDetails' }]
          }
        @ObjectModel:{
        text.element:  [ 'PlantName' ],
        readOnly: true
        }
        @Consumption.valueHelpDefinition: [{entity:{name:'C_PlantByAreaOfRespyVH' , element: 'Plant'}}]
  key   StockProposal.Plant,
        @UI:{
        selectionField: [ { position: 30 } ] ,
        lineItem: [{position:10,   importance: #HIGH}],
        textArrangement: #TEXT_LAST
        
        }
        @Consumption:{
        valueHelpDefinition: [{entity:{name:'C_BufferedMaterialValHelp' , element: 'Product'}}],
        semanticObject: 'Material' //Annotation to Provide SmartLink

        }
        @ObjectModel:{
        text.element:  [ 'MaterialName' ],
        readOnly: true
        }
        @EndUserText.label: 'Product'
        @Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.8 }
 
  key   StockProposal.Material,
        @UI.hidden: true
        @ObjectModel.readOnly: true
        @Semantics.businessDate.from: true
  key   StockProposal.ProposalStartDate                                               as   ProposalStartDate,

        @UI.hidden: true
        @ObjectModel.readOnly: true
    
  key   StockProposal.ProposalVersion,


        //To apply Inner Join on Area of Responisibility; Not relevant for UI

        @UI.hidden: true
        @ObjectModel.readOnly: true
        _SDMAreaOfResponsibility.UserID,
        @Semantics.text: true
        @UI.hidden: true
        @ObjectModel.readOnly: true
        @Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.8 }
        StockProposal._BufMatPlant._Material._Text[1:Language=$session.system_language].ProductName                                   as   MaterialName,

        @Semantics.text: true
        @UI.hidden: true
        @ObjectModel.readOnly: true
        @Search: { defaultSearchElement: true, ranking: #MEDIUM, fuzzinessThreshold: 0.8 }
        StockProposal._BufMatPlant._Plant.PlantName,

        @Semantics.text: true
        @UI.hidden: true
        @ObjectModel.readOnly: true
        @Search: { defaultSearchElement: true, ranking: #LOW, fuzzinessThreshold: 0.8 }
        _SDMAreaOfResponsibility.MRPAreaText,

        @ObjectModel.readOnly: true
        @Consumption.filter.hidden: true
        @Semantics.unitOfMeasure: true
        StockProposal.MaterialBaseUnit                                      as   BaseUnit,
        
        @ObjectModel.readOnly: true
        @Consumption.filter.hidden: true
        @UI.hidden: true
        StockProposal.StockLevelProposalID,
        @ObjectModel.readOnly: true
        @UI.selectionField.position: '10'
        @UI.textArrangement: #TEXT_ONLY
        @Consumption:{
        valueHelp: '_StockProposalStatus',
        filter.selectionType: #SINGLE
        }
        StockProposal.StockLevelProposalStatus,
        @ObjectModel.readOnly: true
        @UI.hidden: true
        StockProposal._StatusText.ProposalStatusDescription,
      

        //Buffer Zone Details


        //RED ZONE

        @ObjectModel.readOnly: true
        @Semantics.quantity.unitOfMeasure: 'BaseUnit'
        @EndUserText.label: 'Current'
        @UI.fieldGroup:     { qualifier: 'RedZoneLevels',  position: 10, importance: #HIGH }
        _CalFields.CurrentRedZone                                                     as   CurrentRedZone,
        //         @UI.fieldGroup:     { qualifier: 'RedZoneLevels',  position: 20, importance: #HIGH }

        //        @EndUserText.label: 'Adjustment Factor On Current'

        //        @Consumption.filter.hidden: true

        //        @ObjectModel.readOnly: true

        //        StockProposal.CurRedZoneAdjustmentFctr as RedZoneAdjustmentFactor,

        @ObjectModel.readOnly: true
        @Semantics.quantity.unitOfMeasure: 'BaseUnit'
        @UI.fieldGroup:     [{ qualifier: 'RedZoneInfo',  position: 10, importance: #HIGH },
        { qualifier: 'RedZoneLevels',  position: 30, importance: #HIGH }]
        @EndUserText.label: 'Proposed  '
        @Consumption.filter.hidden: true
        StockProposal.OriglProposedRedZone,
        @UI.fieldGroup:     { qualifier: 'RedZoneLevels',  position: 40, importance: #HIGH }
        @EndUserText.label: 'Adjustment Factor On Proposal'
        @Consumption.filter.hidden: true
        @ObjectModel.readOnly: true
        StockProposal.PrevRedZoneAdjustmentFctr,

        @ObjectModel.readOnly: true
        @EndUserText.label: 'Change '
        @UI.fieldGroup:     [{ qualifier: 'RedZoneInfo', position: 20, importance: #HIGH  },
        { qualifier: 'RedZoneLevels',  position: 50, importance: #HIGH }]
        @Semantics.quantity.unitOfMeasure: 'BaseUnit'
        _CalFields.RedZoneDifference,
        @ObjectModel.readOnly: true
        @Semantics.quantity.unitOfMeasure: 'BaseUnit'
        @UI.fieldGroup:     [
         { qualifier: 'RedZoneLevels',  position: 60, importance: #HIGH }]
        @EndUserText.label: 'Adjust Current to'
        StockProposal.ProposedRedZone,
        @UI.fieldGroup:     { qualifier: 'RedZoneLevels',  position: 70, importance: #HIGH }
        @EndUserText.label: 'Adjustment Factor'
        @Consumption.filter.hidden: true
        StockProposal.CurRedZoneAdjustmentFctr,

        //YELLOW ZONE

        @ObjectModel.readOnly: true
        @Semantics.quantity.unitOfMeasure: 'BaseUnit'
        @EndUserText.label: 'Current '
        @UI.fieldGroup:     { qualifier: 'YellowZoneLevels',  position: 10, importance: #HIGH }
        _CalFields.CurrentYellowZone                                                  as   CurrentYellowZone,
        //         @UI.fieldGroup:     { qualifier: 'YellowZoneLevels',  position: 20, importance: #HIGH }

        //        @EndUserText.label: 'Adjustment Factor On Current'

        //        @Consumption.filter.hidden: true

        //        @ObjectModel.readOnly: true

        //        StockProposal.CurYellowZoneAdjustmentFctr as YellowZoneAdjustmentFactor,

        @ObjectModel.readOnly: true
        @Semantics.quantity.unitOfMeasure: 'BaseUnit'
        @UI.fieldGroup:     [{ qualifier: 'YellowZoneInfo',  position: 10, importance: #HIGH },
        { qualifier: 'YellowZoneLevels',  position: 30, importance: #HIGH }]
        @EndUserText.label: 'Proposed  '
        @Consumption.filter.hidden: true
        StockProposal.OriglProposedYellowZone,
        @UI.fieldGroup:     { qualifier: 'YellowZoneLevels',  position: 40, importance: #HIGH }
        @EndUserText.label: 'Adjustment Factor On Proposal'
        @Consumption.filter.hidden: true
        @ObjectModel.readOnly: true
        StockProposal.PrevYellowZoneAdjustmentFctr,

        @ObjectModel.readOnly: true
        @EndUserText.label: 'Change  '
        @UI.fieldGroup:     [{ qualifier: 'YellowZoneInfo', position: 20, importance: #HIGH  },
        { qualifier: 'YellowZoneLevels',  position: 50, importance: #HIGH }]
        @Semantics.quantity.unitOfMeasure: 'BaseUnit'
        _CalFields.YellowZoneDifference,
        @ObjectModel.readOnly: true
        @Semantics.quantity.unitOfMeasure: 'BaseUnit'
        @UI.fieldGroup:     [
        { qualifier: 'YellowZoneLevels',  position: 60, importance: #HIGH }]
        @EndUserText.label: 'Adjust Current to'
        StockProposal.ProposedYellowZone,
        @UI.fieldGroup:     { qualifier: 'YellowZoneLevels',  position: 70, importance: #HIGH }
        @EndUserText.label: 'Adjustment Factor'
        @Consumption.filter.hidden: true
        StockProposal.CurYellowZoneAdjustmentFctr,

        //GREEN ZONE

        @ObjectModel.readOnly: true
        @Semantics.quantity.unitOfMeasure: 'BaseUnit'
        @UI.fieldGroup:     { qualifier: 'GreenZoneLevels',  position: 10, importance: #HIGH }
        @EndUserText.label: 'Current'

        _CalFields.CurrentGreenZone                                                   as   CurrentGreenZone,
        //        @UI.fieldGroup:     { qualifier: 'GreenZoneLevels',  position: 20, importance: #HIGH }

        //        @EndUserText.label: 'Adjustment Factor On Current'

        //        @Consumption.filter.hidden: true

        //        @ObjectModel.readOnly: true

        //        StockProposal.CurGreenZoneAdjustmentFctr as GreenZoneAdjustmentFactor,


        @ObjectModel.readOnly: true
        @Semantics.quantity.unitOfMeasure: 'BaseUnit'
        @UI.fieldGroup:     [{ qualifier: 'GreenZoneInfo', position: 10, importance: #HIGH },
        { qualifier: 'GreenZoneLevels',  position: 30, importance: #HIGH }]
        @EndUserText.label: 'Proposed  '
        @Consumption.filter.hidden: true
        StockProposal.OriglProposedGreenZone,
        @UI.fieldGroup:     { qualifier: 'GreenZoneLevels',  position: 40, importance: #HIGH }
        @EndUserText.label: 'Adjustment Factor On Proposal'
        @Consumption.filter.hidden: true
        @ObjectModel.readOnly: true
        StockProposal.PrevGreenZoneAdjustmentFctr,


        @ObjectModel.readOnly: true
        @EndUserText.label: 'Change  '
        @UI.fieldGroup:    [ { qualifier: 'GreenZoneInfo', position: 20, importance: #HIGH },
        { qualifier: 'GreenZoneLevels',  position: 50, importance: #HIGH }]
        @Semantics.quantity.unitOfMeasure: 'BaseUnit'
        _CalFields.GreenZoneDifference,

        @ObjectModel.readOnly: true
        @Semantics.quantity.unitOfMeasure: 'BaseUnit'
        @UI.fieldGroup:     [
        { qualifier: 'GreenZoneLevels',  position: 60, importance: #HIGH }]
        @EndUserText.label: 'Adjust Current to'
        StockProposal.ProposedGreenZone,

        @UI.fieldGroup:     { qualifier: 'GreenZoneLevels',  position: 70, importance: #HIGH }
        @EndUserText.label: 'Adjustment Factor'
        @Consumption.filter.hidden: true
        StockProposal.CurGreenZoneAdjustmentFctr,


        @ObjectModel.readOnly: true
        @Semantics.quantity.unitOfMeasure: 'BaseUnit'
        _CalFields.MaxStockDifference,
        @ObjectModel.readOnly: true
        @UI:{
        selectionField.position: '20'    }
        @Semantics.quantity.unitOfMeasure: 'UnitOfMeasure'
        @EndUserText.label: 'Max Stock Deviation'
        _CalFields.MaxStockDeviationRate,
        @ObjectModel.readOnly: true
        @Semantics.unitOfMeasure: true
        @Consumption.filter.hidden: true
        _CalFields.UnitOfMeasure,

        @ObjectModel.readOnly: true
        @Semantics.quantity.unitOfMeasure: 'BaseUnit'
        @UI.hidden: true
        _CalFields.CurrentAverageDailyUsage                                           as   CurrentAverageDailyUsage,
        @ObjectModel.readOnly: true
        @Semantics.quantity.unitOfMeasure: 'BaseUnit'
        @UI.hidden: true
        _CalFields.ProposedAverageDailyUsage,
        @ObjectModel.readOnly: true
        @Semantics.quantity.unitOfMeasure: 'BaseUnit'
        @UI.hidden: true
        _CalFields.AvgDailyUsageDifference,
        @ObjectModel.readOnly: true
        @UI.dataPoint.title: 'Average Daily Usage Change'
        @Semantics.quantity.unitOfMeasure: 'UnitOfMeasure'
        _CalFields.AvgDailyUsageDeviationRate,
        

        @ObjectModel.readOnly: true
        _CalFields.CurrentVariabilityFactor                                           as   CurrentVariabilityFactor,
        @ObjectModel.readOnly: true
        _CalFields.ProposedVariabilityFactor                                          as   ProposedVariabilityFactor,
        @ObjectModel.readOnly: true
        @Semantics.quantity.unitOfMeasure: 'UnitOfMeasure'
        _CalFields.VariabilityFactorDeviationRate,

        @ObjectModel.readOnly: true
        @UI.hidden: true
        @Semantics.quantity.unitOfMeasure: 'UnitOfMeasure'
        _CalFields.VariabilityFactorDifference,


        @ObjectModel.readOnly: true
        _CalFields.CurrentLeadTime                                                    as   CurrentLeadTime,
        @ObjectModel.readOnly: true
        _CalFields.ProposedLeadTime                                                   as   ProposedLeadTime,
        @ObjectModel.readOnly: true
        _CalFields.LeadTimeDifference,
        @ObjectModel.readOnly: true
        @UI.dataPoint.title: 'Decoupled Lead Time Change'
        @Semantics.quantity.unitOfMeasure: 'UnitOfMeasure'
        _CalFields.LeadTimeDeviationRate,


        @ObjectModel.readOnly: true
        @Consumption.filter.hidden: true
        _CalFields.CurrentLeadTimeFactor,
        @ObjectModel.readOnly: true
        @Consumption.filter.hidden: true
        _CalFields.ProposedLeadTimeFactor                                             as   ProposedLeadTimeFactor,
        @ObjectModel.readOnly: true
        @Consumption.filter.hidden: true
        _CalFields.LeadTimeFactorDifference,
        @UI.dataPoint.title: 'Decoupled Lead Time Change'
        @ObjectModel.readOnly: true
        @Consumption.filter.hidden: true
        @Semantics.quantity.unitOfMeasure: 'UnitOfMeasure'
        _CalFields.LeadTimeFactorDeviationRate,

        @ObjectModel.readOnly: true
        @UI.hidden: true
        _CalFields.DifferenceInDays,

        @Consumption.valueHelpDefinition: [{entity:{name:'C_MM_MaterialGroupValueHelp' , element: 'MaterialGroup'}}]
        @ObjectModel.readOnly: true
        @EndUserText.label: 'Product Group'
        @UI.selectionField.position: '40'
        StockProposal._BufMatPlant._Material.ProductGroup                                              as   MaterialGroup,


        @ObjectModel.readOnly: true

        StockProposal.MRPController,

        @ObjectModel.readOnly: true
        @Consumption.valueHelpDefinition: [{entity:{name:'C_PurchasingGroupValueHelp' , element: 'PurchasingGroup'}}]

        StockProposal.PurchasingGroup,

        // @UI.selectionField.position: '50'

        @ObjectModel.readOnly: true
        @Consumption.valueHelpDefinition: [{entity:{name:'C_MRPGroupValHelp' , element: 'MRPGroup'}}]
        StockProposal.MRPGroup,

        @ObjectModel.readOnly: true
        @Consumption.valueHelp: '_AdjustmentFactor'
        @Consumption.filter.selectionType: #SINGLE
        @EndUserText.label: 'Adjustment Factor Exists'
        @EndUserText.quickInfo: 'Does Adjustment Factor Exist for this Item'
        _CalFields.MatlPrpslAdjmtFctrIsApplied,

        // Fields for Micro Chart

        @ObjectModel.readOnly: true
        @UI.hidden: true
        _CalFields.NormalizedCurrentGreenZone,
        @ObjectModel.readOnly: true
        @UI.hidden: true
        _CalFields.NormalizedCurrentYellowZone,
        @ObjectModel.readOnly: true
        @UI.hidden: true
        _CalFields.NormalizedCurrentRedZone,

        @ObjectModel.readOnly: true
        @UI.hidden: true
        _CalFields.NormalizedProposedGreenZone,
        @ObjectModel.readOnly: true
        @UI.hidden: true
        _CalFields.NormalizedProposedYellowZone,
        @ObjectModel.readOnly: true
        @UI.hidden: true
        _CalFields.NormalizedProposedRedZone,

        @ObjectModel.readOnly: true
        @Consumption.filter.hidden: true
        StockProposal._MatMRPArea._MRPArea.MRPAreaCategory,
        //Horizon Data for Demand Data Chart

        @ObjectModel.readOnly: true
        @UI.hidden: true
        _CalFields.HorizonDaysInPast,
        @ObjectModel.readOnly: true
        @UI.hidden: true
        _CalFields.AvgDailyUsageHorizonEndDate,
        @ObjectModel.readOnly: true
        @UI.hidden: true
        _CalFields.AvgDailyUsageHorizonStartDate,



        

        //Classifications


        @ObjectModel.readOnly: true
        @UI:{dataPoint.title: 'Buffer Profile'}
        @ObjectModel.text.element:  [ 'ProposedMatlBufferProfileText' ]
        @Consumption.filter.hidden: true
        _CalFields.ProposedMaterialBufferProfile,
        @ObjectModel.readOnly: true
        @UI.hidden: true
        _CalFields.ProposedMatlBufferProfileText,

        //Current Values of Indicators



        //        @ObjectModel.readOnly: true

        //        @UI.hidden: true

        //        _Product.Currency,


        @UI.selectionField.position: '100'
        @Consumption.valueHelp: '_MatlBOMUsageIndValHelp'
        @ObjectModel:{ readOnly: true,
        text.element:  [ 'BOMUsageDescription' ] }// Required for Code & Text in Value Helps

        @UI.textArrangement: #TEXT_LAST
        StockProposal.BOMUsageCode, //PQR Indicator

        //        @ObjectModel.readOnly: true

        //        @UI.hidden: true

        //        _CalFields.BOMUsageValue,

        @ObjectModel.readOnly: true
        @UI.hidden: true
        StockProposal._BOMUsgText.BOMUsageDescription,

        @Consumption.valueHelp: '_MatlConsumptionIndValHelp'
        @UI.selectionField.position: '70'
        @ObjectModel: {readOnly: true,
        text.element:  [ 'ConsumptionDescription' ]}// Required for Code & Text in Value Helps

        @UI.textArrangement: #TEXT_LAST

        StockProposal.ConsumptionCode, //ABC Indicator

        //        @ObjectModel.readOnly: true

        //        @UI.hidden: true

        //        _CalFields.ConsumptionValue,

        @ObjectModel.readOnly: true
        @UI.hidden: true
        StockProposal._ConsumptionText.ConsumptionDescription,

        @UI.selectionField.position: '90'
        @Consumption.valueHelp: '_MatlVariabilityIndValHelp'
        @ObjectModel: {readOnly: true,
        text.element:  [ 'VariabilityDescription' ] }// Required for Code & Text in Value Helps

        @UI.textArrangement: #TEXT_LAST
        StockProposal.VariabilityCode, //XYZ Indicator

        @ObjectModel.readOnly: true
        @UI.hidden: true
        _CalFields.VariabilityQuantity,
        @ObjectModel.readOnly: true
        @UI.hidden: true
        _CalFields.VariabilityDescription,


        @UI.selectionField.position: '80'
        @Consumption.valueHelp: '_MatlLeadTimeIndValHelp'
        @ObjectModel: {readOnly: true,
        text.element:  [ 'ReplenishmentLeadTimeDesc' ]}// Required for Code & Text in Value Helps

        @UI.textArrangement: #TEXT_LAST
        StockProposal.ReplenishmentLeadTimeCode, //EFG Indicator

        @ObjectModel.readOnly: true
        @UI.hidden: true
        _CalFields.ReplenishmentLeadTimeValue,
        @ObjectModel.readOnly: true
        @UI.hidden: true
        _CalFields.ReplenishmentLeadTimeDesc,
        @ObjectModel.readOnly: true
        @UI.selectionField.position: '60'
        @UI.textArrangement: #TEXT_LAST
        @Consumption.valueHelp: '_MaterialProcurementTypeVH'
        @EndUserText.label: 'Procurement Type'
        StockProposal.ProcurementType,
        @ObjectModel.readOnly: true
        @UI.hidden: true
        _CalFields.ProcurementTypeDescription,



        
        //Proposed Values of Indicators

        
        @ObjectModel.readOnly: true
        @UI.hidden: true
        _CalFields.CurrentMatlVariabilityCode,
        @ObjectModel.readOnly: true
        @UI.hidden: true
        StockProposal.VariabilityCode as  ProposedMatlVariabilityCode,
        @ObjectModel.readOnly: true
        @UI.hidden: true
        _CalFields.ProposedMatlVariabilityQty,
        @ObjectModel.readOnly: true
        @UI.hidden: true
        _CalFields.ProposedMatlVariabilityUnit,
//        @ObjectModel.readOnly: true

//        @UI.hidden: true

//        _CalFields.ProposedMatlVariabilityDesc,


        @ObjectModel.readOnly: true
        @UI.hidden: true
        _CalFields.CurrentMatlLeadTimeCode,
        @ObjectModel.readOnly: true
        @UI.hidden: true
        StockProposal.ReplenishmentLeadTimeCode as ProposedMatlLeadTimeCode,
        @ObjectModel.readOnly: true
        @UI.hidden: true
        _CalFields.ProposedMatlLeadTime,
//        @ObjectModel.readOnly: true

//        @UI.hidden: true

//        _CalFields.ProposedMatlLeadTimeDesc,

        
        @ObjectModel.readOnly: true
        @UI.hidden: true
        StockProposal.BOMExplosionDate,
        @ObjectModel.readOnly: true
        @UI.hidden: true
        _CalFields.BufLvlProposalHorizonStartDate,


        
        
        @Consumption.filter.hidden: true
        _MatlConsumptionIndValHelp,
        @Consumption.filter.hidden: true
        _MatlLeadTimeIndValHelp,
        @Consumption.filter.hidden: true
        _MatlVariabilityIndValHelp,
        @Consumption.filter.hidden: true
        _MatlBOMUsageIndValHelp,
        @Consumption.filter.hidden: true
        _StockProposalStatus,
        _MaterialProcurementTypeVH,
        _AdjustmentFactor,
        //_MaterialBufferLevelChart,

        //_MaterialBufferLevelTable,

        _MaterialDailyDemand,
        //_MaterialDailyDemandTable,

        _ProposedBOM,
        @Consumption.filter.hidden: true
        _BufferClassifications,
        
        @Consumption.filter.hidden: true
        StockProposal._BufMatPlant
        
}

where
  StockProposal.ProposalEndDate = '99991231'