I_STOCKLEVELPROPOSALTP
Transactional View for DD Proposed Stock Levels
I_STOCKLEVELPROPOSALTP is a CDS View in S/4HANA. Transactional View for DD Proposed Stock Levels. It contains 30 fields. 1 CDS views read from this table.
CDS Views using this table (1)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| C_StockLevelMgmtTP | view | from | CONSUMPTION | Manage Buffer Levels |
Fields (30)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | Material | Material | 1 |
| KEY | MRPArea | MRPArea | 1 |
| KEY | Plant | Plant | 1 |
| KEY | ProposalStartDate | ProposalStartDate | 1 |
| KEY | ProposalVersion | ProposalVersion | 1 |
| _BufMatPlant | _BufMatPlant | 1 | |
| BOMExplosionDate | BOMExplosionDate | 1 | |
| BOMUsageCode | BOMUsageCode | 1 | |
| ConsumptionCode | ConsumptionCode | 1 | |
| CurGreenZoneAdjustmentFctr | CurGreenZoneAdjustmentFctr | 1 | |
| CurRedZoneAdjustmentFctr | CurRedZoneAdjustmentFctr | 1 | |
| CurYellowZoneAdjustmentFctr | CurYellowZoneAdjustmentFctr | 1 | |
| MaterialBaseUnit | BaseUnit | 1 | |
| MRPController | MRPController | 1 | |
| MRPGroup | MRPGroup | 1 | |
| OriglProposedGreenZone | OriglProposedGreenZone | 1 | |
| OriglProposedRedZone | OriglProposedRedZone | 1 | |
| OriglProposedYellowZone | OriglProposedYellowZone | 1 | |
| PrevGreenZoneAdjustmentFctr | PrevGreenZoneAdjustmentFctr | 1 | |
| PrevRedZoneAdjustmentFctr | PrevRedZoneAdjustmentFctr | 1 | |
| PrevYellowZoneAdjustmentFctr | PrevYellowZoneAdjustmentFctr | 1 | |
| ProcurementType | ProcurementType | 1 | |
| ProposedGreenZone | ProposedGreenZone | 1 | |
| ProposedRedZone | ProposedRedZone | 1 | |
| ProposedYellowZone | ProposedYellowZone | 1 | |
| PurchasingGroup | PurchasingGroup | 1 | |
| ReplenishmentLeadTimeCode | ProposedMatlLeadTimeCode,ReplenishmentLeadTimeCode | 1 | |
| StockLevelProposalID | StockLevelProposalID | 1 | |
| StockLevelProposalStatus | StockLevelProposalStatus | 1 | |
| VariabilityCode | ProposedMatlVariabilityCode,VariabilityCode | 1 |
@VDM.viewType: #TRANSACTIONAL
@AbapCatalog.sqlViewName: 'IDDSTKLVLPRPSLTP'
@AbapCatalog.compiler.compareFilter: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #CHECK
@ObjectModel: {
modelCategory: #BUSINESS_OBJECT,
compositionRoot: true,
transactionalProcessingEnabled: true,
draftEnabled: true,
writeDraftPersistence: 'DDSTKPRPSLTP_D',
createEnabled: true,
updateEnabled: true,
deleteEnabled: true,
semanticKey: ['Material', 'Plant', 'MRPArea' ,'ProposalStartDate', 'ProposalVersion']
// representativeKey: ['Material', 'Plant', 'MRPArea','ProposalStartDate']
}
@ObjectModel.usageType: {serviceQuality: #C, sizeCategory: #L, dataClass: #TRANSACTIONAL}
@EndUserText.label: 'Transactional View for DD Proposed Stock Levels'
define view I_StockLevelProposalTP
as select from I_StockLevelProposal as StockProposal
// association [0..1] to I_ConsumptionText as _ConsumptionText on $projection.ConsumptionCode = _ConsumptionText.ConsumptionCode
// and _ConsumptionText.Language = $session.system_language
// association [0..1] to I_VariabilityText as _VarText on $projection.VariabilityCode = _VarText.VariabilityCode
// and _VarText.Language = $session.system_language
// association [0..1] to I_ReplenishmentLeadTimeText as _ReplnmtText on $projection.ReplenishmentLeadTimeCode = _ReplnmtText.ReplenishmentLeadTimeCode
// and _ReplnmtText.Language = $session.system_language
// association [0..1] to I_ProcurementTypeText as _ProcmtText on $projection.ProcurementType = _ProcmtText.ProcurementType
// and _ProcmtText.Language = $session.system_language
// association [0..1] to I_BOMUsageText as _BOMUsgText on $projection.BOMUsageCode = _BOMUsgText.BOMUsageCode
// and _BOMUsgText.Language = $session.system_language
// association [0..1] to I_SOSTypeText as _SOSText on $projection.SOSType = _SOSText.SOSType
// and _SOSText.Language = $session.system_language
{
@ObjectModel.readOnly: true
key StockProposal.Material,
@ObjectModel.readOnly: true
key StockProposal.Plant,
@ObjectModel.readOnly: true
key StockProposal.MRPArea,
@Semantics.businessDate.to: true
@ObjectModel.readOnly: true
key StockProposal.ProposalStartDate,
@ObjectModel.readOnly: true
key StockProposal.ProposalVersion,
@ObjectModel.readOnly: true
StockProposal.ProposalEndDate,
@ObjectModel.readOnly: true
StockProposal.StockLevelProposalID,
@ObjectModel.readOnly: true
StockProposal.MaterialGroup,
@ObjectModel.readOnly: true
StockProposal.PurchasingGroup,
@ObjectModel.readOnly: true
StockProposal.ConsumptionCode,
//@ObjectModel.readOnly: true
//_ConsumptionText.ConsumptionDescription as ConsumptionDescription,
@ObjectModel.readOnly: true
@Semantics.amount.currencyCode: 'Currency'
StockProposal.ConsumptionValue,
@ObjectModel.readOnly: true
@Semantics.currencyCode: true
StockProposal.Currency,
@ObjectModel.readOnly: true
StockProposal.VariabilityCode,
//@ObjectModel.readOnly: true
//_VarText.VariabilityDescription as VariabilityDescription,
@ObjectModel.readOnly: true
StockProposal.VariabilityQuantity,
@ObjectModel.readOnly: true
StockProposal.VariabilityUnit,
@ObjectModel.readOnly: true
StockProposal.ReplenishmentLeadTimeCode,
//@ObjectModel.readOnly: true
//_ReplnmtText.ReplenishmentLeadTimeDesc as ReplenishmentLeadTimeDesc,
@ObjectModel.readOnly: true
StockProposal.ProcurementType,
//@ObjectModel.readOnly: true
//_ProcmtText.ProcurementTypeDescription as ProcurementTypeDescription,
@ObjectModel.readOnly: true
StockProposal.ReplenishmentLeadTimeValue,
@ObjectModel.readOnly: true
StockProposal.BOMUsageCode,
//@ObjectModel.readOnly: true
//_BOMUsgText.BOMUsageDescription as BOMUsageDescription,
@ObjectModel.readOnly: true
StockProposal.BOMUsageValue,
@ObjectModel.readOnly: true
StockProposal.IndividualLeadTime,
// @ObjectModel.enabled:#('EXTERNAL_CALCULATION')
// StockProposal.DecoupledLeadTime * StockProposal.YellowZoneAdjustmentFactor as DecoupledLeadTime,
@ObjectModel.readOnly: true
StockProposal.DecoupledLeadTime,
@ObjectModel.readOnly: true
StockProposal.SourceOfSupply,
@ObjectModel.readOnly: true
StockProposal.SOSType,
//@ObjectModel.readOnly: true
//_SOSText.SOSTypeDescription as SOSTypeDescription,
@ObjectModel.readOnly: true
StockProposal.LeadTimeFactor,
@ObjectModel.readOnly: true
StockProposal.VariabilityFactor,
@ObjectModel.readOnly: true
StockProposal.StockLevelProposalStatus,
@ObjectModel.readOnly: true
StockProposal.ProposalStatusChangeDate,
@ObjectModel.readOnly: true
StockProposal.IsMinOrderQtyConsidered,
@ObjectModel.readOnly: true
StockProposal.MinimumOrderQuantity,
@ObjectModel.readOnly: true
StockProposal.MinOrderQtyUnit,
@ObjectModel.readOnly: true
StockProposal.PrevRedZoneAdjustmentFctr,
@ObjectModel.readOnly: true
StockProposal.PrevYellowZoneAdjustmentFctr,
@ObjectModel.readOnly: true
StockProposal.PrevGreenZoneAdjustmentFctr,
@ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
StockProposal.CurRedZoneAdjustmentFctr,
// @ObjectModel.enabled:#('EXTERNAL_CALCULATION')
@ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
StockProposal.CurYellowZoneAdjustmentFctr,
@ObjectModel.readOnly: 'EXTERNAL_CALCULATION'
StockProposal.CurGreenZoneAdjustmentFctr,
@ObjectModel.readOnly: true
StockProposal.BillOfMaterialUUID,
@ObjectModel.readOnly: true
StockProposal.BOMExplosionDate,
@ObjectModel.readOnly: true
StockProposal.CreatedByUser,
@ObjectModel.readOnly: true
StockProposal.LastChangedByUser,
@ObjectModel.readOnly: true
StockProposal.CreationDateTime,
@ObjectModel.readOnly: true
StockProposal.LastChangeDateTime,
//.MaterialName,
//StockProposal.PlantName,
//StockProposal.MRPAreaText,
// @ObjectModel.readOnly: true
//StockProposal.ProposalStatusDescription,
//@ObjectModel.readOnly: true
//StockProposal.IsMinOrdQtyConsideredDesc,
/* @ObjectModel.readOnly: true
division((StockProposal.DecoupledLeadTime * _StockProposalDets.AverageDailyUsage * StockProposal.PrevYellowZoneAdjustmentFctr),1,3) as ProposedYellowZone,
@ObjectModel.readOnly: true
division((StockProposal.DecoupledLeadTime * _StockProposalDets.AverageDailyUsage* StockProposal.VariabilityFactor * StockProposal.PrevRedZoneAdjustmentFctr),1,3) as ProposedRedZone,
@ObjectModel.readOnly: true
division((StockProposal.DecoupledLeadTime * _StockProposalDets.AverageDailyUsage * StockProposal.LeadTimeFactor * StockProposal.PrevGreenZoneAdjustmentFctr),1,3) as ProposedGreenZone,
//for draft calculations
@ObjectModel.readOnly: true
division((StockProposal.DecoupledLeadTime * _StockProposalDets.AverageDailyUsage * StockProposal.PrevYellowZoneAdjustmentFctr),1,3) as OriglProposedYellowZone,
@ObjectModel.readOnly: true
division((StockProposal.DecoupledLeadTime * _StockProposalDets.AverageDailyUsage* StockProposal.VariabilityFactor * StockProposal.PrevRedZoneAdjustmentFctr),1,3) as OriglProposedRedZone,
@ObjectModel.readOnly: true
division((StockProposal.DecoupledLeadTime * _StockProposalDets.AverageDailyUsage * StockProposal.LeadTimeFactor * StockProposal.PrevGreenZoneAdjustmentFctr),1,3) as OriglProposedGreenZone,
*/
/*division((_CalcZone.ProposedRedZone),1,3) as ProposedRedZone,
division((_CalcZone.ProposedYellowZone),1,3) as ProposedYellowZone,
case
when _CalcZone.ProposedGreenZone > _CalcZone.ProposedGreenZoneMOQ and _CalcZone.ProposedGreenZone > _CalcZone.ProposedGreenZoneOrderCycle
then division((_CalcZone.ProposedGreenZone * StockProposal.PrevGreenZoneAdjustmentFctr),1,3)
when _CalcZone.ProposedGreenZoneOrderCycle > _CalcZone.ProposedGreenZoneMOQ and _CalcZone.ProposedGreenZoneOrderCycle > _CalcZone.ProposedGreenZone
then division((_CalcZone.ProposedGreenZoneOrderCycle * StockProposal.PrevGreenZoneAdjustmentFctr),1,3)
else division((_CalcZone.ProposedGreenZoneMOQ * StockProposal.PrevGreenZoneAdjustmentFctr),1,3)
end as ProposedGreenZone,
//for draft calculations
division((_CalcZone.ProposedRedZone),1,3) as OriglProposedRedZone,
division((_CalcZone.ProposedYellowZone),1,3) as OriglProposedYellowZone,
case
when _CalcZone.ProposedGreenZone > _CalcZone.ProposedGreenZoneMOQ and _CalcZone.ProposedGreenZone > _CalcZone.ProposedGreenZoneOrderCycle
then division((_CalcZone.ProposedGreenZone * StockProposal.PrevGreenZoneAdjustmentFctr),1,3)
when _CalcZone.ProposedGreenZoneOrderCycle > _CalcZone.ProposedGreenZoneMOQ and _CalcZone.ProposedGreenZoneOrderCycle > _CalcZone.ProposedGreenZone
then division((_CalcZone.ProposedGreenZoneOrderCycle * StockProposal.PrevGreenZoneAdjustmentFctr),1,3)
else division((_CalcZone.ProposedGreenZoneMOQ * StockProposal.PrevGreenZoneAdjustmentFctr),1,3)
end as OriglProposedGreenZone,
*/
@ObjectModel.readOnly: true
ProposedRedZone,
@ObjectModel.readOnly: true
ProposedYellowZone,
@ObjectModel.readOnly: true
ProposedGreenZone,
@ObjectModel.readOnly: true
OriglProposedRedZone,
@ObjectModel.readOnly: true
OriglProposedYellowZone,
@ObjectModel.readOnly: true
OriglProposedGreenZone,
@Semantics.quantity.unitOfMeasure: 'AvgDailyUsageUnit'
@ObjectModel.readOnly: true
StockProposal.AverageDailyUsage,
@ObjectModel.readOnly: true
@Semantics.unitOfMeasure: true
AvgDailyUsageUnit,
@ObjectModel.readOnly: true
@Semantics.unitOfMeasure: true
StockProposal.MaterialBaseUnit,
@ObjectModel.readOnly: true
StockProposal.MRPGroup,
@ObjectModel.readOnly: true
StockProposal.MRPController,
//_Material,
//_Plant,
//_MRPArea
_StatusText,
_MinOrdQtyConsText,
_ConsumptionText,
_VarText,
_ReplnmtText,
_ProcmtText,
_BOMUsgText,
_SOSText,
_BufMatPlant,
_MatMRPArea
}