@AbapCatalog: { sqlViewName: 'CSCHEDDSPT', compiler.compareFilter: true }
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Dispatched operations'
@ObjectModel: { semanticKey: ['OrderID'],
usageType: { dataClass: #TRANSACTIONAL,
sizeCategory: #XL,
serviceQuality: #D }
}
@VDM.viewType: #CONSUMPTION
@UI.presentationVariant: { requestAtLeast: [ 'ManufacturingOrder', 'PlannedOrder','OrderCategoryName','RequirementDateTime'
] }
define view C_SchedProdnDsptchdOps
as select from I_SchedProdnOperations
association [0..*] to I_ProductText as _Prdtext on $projection.Product = _Prdtext.Product
and _Prdtext.Language = $session.system_language
association [0..1] to I_SchedProdnOrderCategoryVH as _OrderCategory on $projection.OrderCategory = _OrderCategory.OrderCategory
and _OrderCategory.Language = $session.system_language
association [0..1] to I_OperationSetupGroupCatText as _OperationSetupGroupCatText on $projection.Plant = _OperationSetupGroupCatText.Plant
and $projection.OperationSetupGroupCategory = _OperationSetupGroupCatText.OperationSetupGroupCategory
and _OperationSetupGroupCatText.Language = $session.system_language
association [0..1] to I_OperationSetupGroupText as _OperationSetupGroupText on $projection.Plant = _OperationSetupGroupText.Plant
and $projection.OperationSetupGroup = _OperationSetupGroupText.OperationSetupGroup
and $projection.OperationSetupGroupCategory = _OperationSetupGroupText.OperationSetupGroupCategory
and _OperationSetupGroupText.Language = $session.system_language
{
@UI.hidden: true
key SimulationSessionID,
@UI.hidden: true
key CapacityRequirementItem as CapacityRequirementItem,
@UI.hidden: true
key CapacityRqmtItemCapacity,
@UI: { lineItem: { label: 'Order',
position: 10 ,
importance: #HIGH },
textArrangement: #TEXT_LAST
}
@EndUserText: {
label: 'Order',
quickInfo: 'Order Number'
}
@ObjectModel: {
text.element: ['OrderCategoryName'],
filter.enabled: false,
sort.enabled:false
}
key OrderID as OrderID,
@UI.hidden: true
@EndUserText: {
label: 'Order Category',
quickInfo: 'Order Category'
}
key I_SchedProdnOperations.OrderCategory as OrderCategory,
@UI.hidden: true
key ProductionVersion as ProductionVersion,
@UI.hidden: true
key WorkCenterInternalID as WorkCenterInternalID,
@UI.hidden: true
key CapacityRequirement as CapacityRequirement,
// OrderIDForUsrInterface,
@UI.hidden: true
WorkCenter as WorkCenter,
@UI.hidden: true
Plant,
@UI.hidden: true
MRPController,
// @Semantics.text: true
// @ObjectModel.filter.enabled: false
// _Prdtext[1:Language=$session.system_language].ProductName as MaterialName,
@UI.hidden:true
@Semantics.text: true
@ObjectModel.filter.enabled: false
@ObjectModel.sort.enabled: false
_Prdtext[1:Language=$session.system_language].ProductName as ProductName,
// @EndUserText: {
// label: 'Product',
// quickInfo: 'Product'
// }
// // @ObjectModel.text.element: ['MaterialName']
// Material as Material,
@UI: { lineItem: { label: 'Product',
position: 20 ,
importance: #HIGH },
textArrangement: #TEXT_LAST
}
@EndUserText: {
label: 'Product',
quickInfo: 'Product'
}
@ObjectModel: {
text.element: ['ProductName'],
filter.enabled: false,
sort.enabled: false
}
// @UI.hidden: true
Product,
@UI.hidden: true
@Semantics.text: true
_OrderCategory.OrderCategoryName as OrderCategoryName,
@UI.hidden: true
cast( BaseUnit as meins preserving type) as BaseUnit,
@UI: { lineItem: { label: 'Quantity',
position: 30,
importance: #HIGH }
}
@ObjectModel.filter.enabled: false
@ObjectModel.sort.enabled: false
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
@EndUserText: {
label: 'Quantity',
quickInfo: 'Quantity'
}
OrderPlannedTotalQty as OrderPlannedTotalQty,
@UI: { lineItem: { label: 'Operation',
position: 40,
importance: #HIGH }
}
@ObjectModel.filter.enabled: false
@ObjectModel.sort.enabled: false
@EndUserText: {
label: 'Operation',
quickInfo: 'Operation'
}
Operation as Operation,
@UI.hidden: true
@EndUserText.label: 'Status'
@EndUserText.quickInfo: 'Status'
OperationPlanningStatusCode as OperationPlanningStatusCode,
@UI: { lineItem: { label: 'Latest End',
position: 60,
importance: #HIGH }
}
@ObjectModel.filter.enabled: false
@ObjectModel.sort.enabled: false
@EndUserText: {
label: 'Latest End',
quickInfo: 'Latest End'
}
SchedldOrdEndDteTme as SchedldOrdEndDteTme,
@UI.hidden: true
UnitOfMeasure as UnitOfMeasure,
@UI: { lineItem: { label: 'Capacity Required',
position: 90,
importance: #HIGH }
}
@EndUserText.label: 'Capacity Required'
@EndUserText.quickInfo: 'Capacity Required'
@ObjectModel.filter.enabled: false
@ObjectModel.sort.enabled: false
@Semantics.quantity.unitOfMeasure: 'UnitOfMeasure'
cast (case
when RemainingCapReqExecutionDurn > 99999999999999
then fltp_to_dec(99999999999999.99 as pph_cfs_sch_required_cap)
else round(fltp_to_dec(RemainingCapReqExecutionDurn as abap.dec(16,3)), 2)
end as pph_cfs_sch_required_cap ) as RemainingCapReqExecutionDurn,
// @UI: { lineItem: { label: 'Operation End',
// position: 50,
// importance: #HIGH }
// }
// @ObjectModel.filter.enabled: false
// @ObjectModel.sort.enabled: false
// @EndUserText: {
// label: 'Operation End',
// quickInfo: 'Operation End'
// }
// @Semantics.timeZoneReference: 'PlantTimeZone'
// LtstSchedldExecEndDteTme as LtstSchedldExecEndDteTme,
@UI.hidden: true
OperationLatestEndDate as OperationLatestEndDate,
@UI.hidden: true
OperationLatestStartDate as OperationLatestStartDate,
//start
@UI.hidden: true
OperationLatestEndTime as OperationLatestEndTime,
@UI.hidden: true
OperationLatestStartTime as OperationLatestStartTime,
@UI: { lineItem: { label: 'Operation Start',
position: 70,
importance: #HIGH }
}
@ObjectModel.filter.enabled: false
@ObjectModel.sort.enabled: false
@EndUserText.label: 'Operation Start'
@EndUserText.quickInfo: 'Operation Start'
@Semantics.timeZoneReference: 'PlantTimeZone'
case
when OperationLatestStartTime >= '240000'
then cast(cast(concat(dats_add_days(OperationLatestStartDate,1,'NULL'),'000000')as abap.numc(15)) as timestamp)
when OperationLatestStartTime <= '240000'
then cast(dats_tims_to_tstmp(OperationLatestStartDate,
OperationLatestStartTime,
PlantTimeZone,$session.client,'NULL')as timestamp )
end as LtstSchedldExecStrtDteTme,
@UI: { lineItem: { label: 'Operation End',
position: 50,
importance: #HIGH }
}
@ObjectModel.filter.enabled: false
@ObjectModel.sort.enabled: false
@EndUserText: {
label: 'Operation End',
quickInfo: 'Operation End'
}
@Semantics.timeZoneReference: 'PlantTimeZone'
case
when OperationLatestEndTime >= '240000'
then cast(cast(concat(dats_add_days(OperationLatestEndDate,1,'NULL'),'000000')as abap.numc(15)) as timestamp)
when OperationLatestEndTime <= '240000'
then cast(dats_tims_to_tstmp(OperationLatestEndDate,
OperationLatestEndTime,
PlantTimeZone,$session.client,'NULL')as timestamp )
end as LtstSchedldExecEndDteTme,
//end
@UI: { lineItem: { label: 'Receipt Date',
position: 100,
importance: #HIGH }
}
@EndUserText.label: 'Receipt Date'
@EndUserText.quickInfo: 'Receipt Date'
@ObjectModel.filter.enabled: false
@ObjectModel.sort.enabled: false
SchedldOrdEndDteTme as ReceiptDate,
// @UI: { lineItem: { label: 'Operation Start',
// position: 70,
// importance: #HIGH }
// }
// @ObjectModel.filter.enabled: false
// @ObjectModel.sort.enabled: false
// @EndUserText.label: 'Operation Start'
// @EndUserText.quickInfo: 'Operation Start'
// @Semantics.timeZoneReference: 'PlantTimeZone'
// LtstSchedldExecStrtDteTme,
@UI: { lineItem: { label: 'Latest Start',
position: 80,
importance: #HIGH }
}
@ObjectModel.filter.enabled: false
@ObjectModel.sort.enabled: false
@EndUserText.label: 'Latest Start'
@EndUserText.quickInfo: 'Latest Start'
SchedldOrdStartDteTme,
@UI.hidden: true
// @ObjectModel: {virtualElement: true, virtualElementCalculatedBy: 'ABAP:CL_PPSCH_WRKLST_VIRTUAL_ELEMET', readOnly: true, filter.enabled: false}
LastChangeDateTime as LastChangeDateTime,
@UI.hidden: true
ManufacturingOrder,
@UI.hidden: true
PlannedOrder,
@UI: { lineItem: { label: 'Consumed Capacity',
position: 110,
importance: #HIGH }
}
@EndUserText.label: 'Consumed Capacity'
@ObjectModel.filter.enabled: false
@ObjectModel.sort.enabled: false
@EndUserText.quickInfo: 'Consumed Capacity'
@Semantics.quantity.unitOfMeasure: 'UnitOfMeasure'
cast (1 as pph_cfs_sch_consumed_cap ) as ConsumedCapacityDurn,
// cast( cast ( ' ' as abap.numc(1) ) as pph_cfs_sch_consumed_cap ) as ConsumedCapacityDurn,
/* -- Setup Group Key -- */
@UI: { lineItem: { label: 'Setup Group Key',
importance: #LOW,
exclude: true
}
}
@EndUserText: {
label: 'Setup Group Key',
quickInfo: 'Setup Group Key'
}
@ObjectModel.readOnly: true
@ObjectModel.text.element: ['OperationSetupGroupName']
@ObjectModel.filter.enabled: false
@ObjectModel.sort.enabled: false
OperationSetupGroup,
@Semantics.text :true
@UI.hidden:true
@ObjectModel.filter.enabled: false
@ObjectModel.sort.enabled: false
_OperationSetupGroupText.OperationSetupGroupName,
/* -- Setup Group Category -- */
@UI: {
lineItem: { label: 'Setup Group Category',
exclude: true,
importance: #LOW
}
}
@ObjectModel.readOnly: true
@EndUserText: {
label: 'Setup Group Category',
quickInfo: 'Setup Group Category'
}
@ObjectModel.text.element: ['OperationSetupGroupCatName']
@ObjectModel.filter.enabled: false
@ObjectModel.sort.enabled: false
OperationSetupGroupCategory,
@Semantics.text :true
@UI.hidden:true
@ObjectModel.filter.enabled: false
_OperationSetupGroupCatText.OperationSetupGroupCatName,
cast( '00000000000000' as timestamp ) as RequirementDateTime,
cast('' as pph_cfs_sch_bucket_type) as PlanningBucketType,
@UI: {
lineItem: { label: 'Plant Time Zone',
exclude: true,
importance: #LOW
}
}
@ObjectModel.readOnly: true
@EndUserText: {
label: 'Plant Time Zone',
quickInfo: 'Plant Time Zone'
}
@ObjectModel.filter.enabled: false
@ObjectModel.sort.enabled: false
@Semantics.timeZone: true
PlantTimeZone
}
where
OperationPlanningStatusCode = 'DSPT'
or OrderCategory = '30'
// (
// I_SchedWorklistOperation.OrderCategory = '1'
// and I_SchedWorklistOperation.OperationPlanningStatusCode = 'DSPT'
// )
// or(
// I_SchedWorklistOperation.OrderCategory = '10'
// and I_SchedWorklistOperation.OperationPlanningStatusCode = 'DSPT'
// )
// or(
// I_SchedWorklistOperation.OrderCategory = '30'
// )
// or(
// I_SchedWorklistOperation.OrderCategory = '40'
// and I_SchedWorklistOperation.OperationPlanningStatusCode = 'DSPT'
// )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_OPERATIONSETUPGROUPCATTEXT",
"I_OPERATIONSETUPGROUPTEXT",
"I_PRODUCTTEXT",
"I_SCHEDPRODNOPERATIONS",
"I_SCHEDPRODNORDERCATEGORYVH"
],
"ASSOCIATED":
[
"I_OPERATIONSETUPGROUPCATTEXT",
"I_OPERATIONSETUPGROUPTEXT",
"I_PRODUCTTEXT",
"I_SCHEDPRODNORDERCATEGORYVH"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/