pre cutover push

This commit is contained in:
Infineon\StieberD
2024-09-04 20:33:41 -07:00
parent 6ea6969f4b
commit 7762b129af
2072 changed files with 130000 additions and 95295 deletions

View File

@ -57,20 +57,20 @@ Subclass = SubclassInfo<1>
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
If Event EQ 'OLE' then
Transfer Event to OIEvent
Transfer Param1 to Event
Transfer Param2 to Param1
Transfer Param3 to Param2
Transfer Param4 to Param3
Transfer Param5 to Param4
Transfer Param6 to Param5
Transfer Param7 to Param6
Transfer Param8 to Param7
Transfer Event to OIEvent
Transfer Param1 to Event
Transfer Param2 to Param1
Transfer Param3 to Param2
Transfer Param4 to Param3
Transfer Param5 to Param4
Transfer Param6 to Param5
Transfer Param7 to Param6
Transfer Param8 to Param7
end
Type = Get_Property(CtrlEntId, 'TYPE')
If Type EQ 'RADIOBUTTON' then
Convert ' ' to '_' in CtrlEntID
Convert ' ' to '_' in CtrlEntID
end
GoToEvent Event for CtrlEntID
@ -83,103 +83,103 @@ Return EventFlow else EVENT_CONTINUE$
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Event WINDOW.CREATE(CreateParam)
SchedDetNGKey = CreateParam<3>
Set_Property(@Window, '@SCHEDULE_KEY_ID', SchedDetNGKey)
GoSub PopulateControls
SchedDetNGKey = CreateParam<3>
Set_Property(@Window, '@SCHEDULE_KEY_ID', SchedDetNGKey)
GoSub PopulateControls
Set_Property(@Window : '.DESCRIPTION', 'NEXT', @Window : '.NEW_QTY')
SRP_Show_Window(@Window, '', 'C', 'C', 1, '', False$, False$)
SRP_Show_Window(@Window, '', 'C', 'C', 1, '', False$, False$)
end event
Event WINDOW.CLOSE(CancelFlag)
end event
Event SAVE_BUTTON.CLICK()
GoSub UpdateWorkOrderDetails
ResponseData = ''
ReactorNo = Get_Property(@Window : '.REACTOR_NO', 'TEXT')
WorkOrder = Get_Property(@Window : '.WO_NO', 'TEXT')
StartDTM = Get_Property(@Window : '.SCHEDULE_START_DTM', 'INVALUE')
EndDTM = Get_Property(@Window : '.SCHEDULE_END_DTM', 'INVALUE')
Description = Get_Property(@Window : '.DESCRIPTION', 'INVALUE')
NewQty = Get_Property(@Window : '.NEW_QTY', 'TEXT')
If NewQty EQ '' then NewQty = Get_Property(@Window:'.SCHEDULE_WAFERS', 'INVALUE')
ResponseData = ReactorNo : @FM : WorkOrder : @FM : StartDTM : @FM : EndDTM : @FM : Description : @FM : NewQty
End_Dialog(@Window, ResponseData)
GoSub UpdateWorkOrderDetails
ResponseData = ''
ReactorNo = Get_Property(@Window : '.REACTOR_NO', 'TEXT')
WorkOrder = Get_Property(@Window : '.WO_NO', 'TEXT')
StartDTM = Get_Property(@Window : '.SCHEDULE_START_DTM', 'INVALUE')
EndDTM = Get_Property(@Window : '.SCHEDULE_END_DTM', 'INVALUE')
Description = Get_Property(@Window : '.DESCRIPTION', 'INVALUE')
NewQty = Get_Property(@Window : '.NEW_QTY', 'TEXT')
If NewQty EQ '' then NewQty = Get_Property(@Window:'.SCHEDULE_WAFERS', 'INVALUE')
ResponseData = ReactorNo : @FM : WorkOrder : @FM : StartDTM : @FM : EndDTM : @FM : Description : @FM : NewQty
End_Dialog(@Window, ResponseData)
end event
Event CLOSE_BUTTON.CLICK()
End_Dialog(@Window, '')
End_Dialog(@Window, '')
end event
Event OLE_SUBCLASS.OnOptionClick(CtrlId)
Send_Event(CtrlId, 'OPTIONS')
Send_Event(CtrlId, 'OPTIONS')
end event
Event OLE_SUBCLASS.OnComboClick(CtrlId)
Send_Event(CtrlId, 'LOSTFOCUS')
Send_Event(CtrlId, 'LOSTFOCUS')
end event
Event NEW_QTY.CHAR(VirtCode, ScanCode, CtrlKey, ShiftKey, AltKey)
Form_Services('CloseControlMessage', CtrlEntId)
GoSub EnableSaveButton
Form_Services('CloseControlMessage', CtrlEntId)
GoSub EnableSaveButton
end event
Event NEW_QTY.LOSTFOCUS(Flag, FocusID)
ValidQty = False$
NewQty = Get_Property(CtrlEntID, 'TEXT')
MinQty = Get_Property(@Window, '@MIN_QTY')
MaxQty = Get_Property(@Window, '@MAX_QTY')
Begin Case
Case NewQty EQ ''
Null
Case NewQty LE 0
Set_Property(CtrlEntID, 'FOCUS', True$)
Set_Property(CtrlEntID, 'SELECTION', 1 : @FM : 999)
Message = 'New quantity must greater than zero.'
Form_Services('DisplayControlMessage', Message, 'Invalid Quantity', CtrlEntID, 'VALIDATION', 'RGB(229,20,0)')
Case NewQty LT MinQty
Set_Property(CtrlEntID, 'FOCUS', True$)
Set_Property(CtrlEntID, 'SELECTION', 1 : @FM : 999)
Message = 'New quantity is below already processed quantity.'
Form_Services('DisplayControlMessage', Message, 'Invalid Quantity', CtrlEntID, 'VALIDATION', 'RGB(229,20,0)')
Case NewQty GT MaxQty
Set_Property(CtrlEntID, 'FOCUS', True$)
Set_Property(CtrlEntID, 'SELECTION', 1 : @FM : 999)
Message = 'New quantity exceeds the available quantity.'
Form_Services('DisplayControlMessage', Message, 'Invalid Quantity', CtrlEntID, 'VALIDATION', 'RGB(229,20,0)')
Case Otherwise$
ValidQty = True$
End Case
If ValidQty then GoSub UpdateWorkOrderDetails
ValidQty = False$
NewQty = Get_Property(CtrlEntID, 'TEXT')
MinQty = Get_Property(@Window, '@MIN_QTY')
MaxQty = Get_Property(@Window, '@MAX_QTY')
Begin Case
Case NewQty EQ ''
Null
Case NewQty LE 0
Set_Property(CtrlEntID, 'FOCUS', True$)
Set_Property(CtrlEntID, 'SELECTION', 1 : @FM : 999)
Message = 'New quantity must greater than zero.'
Form_Services('DisplayControlMessage', Message, 'Invalid Quantity', CtrlEntID, 'VALIDATION', 'RGB(229,20,0)')
Case NewQty LT MinQty
Set_Property(CtrlEntID, 'FOCUS', True$)
Set_Property(CtrlEntID, 'SELECTION', 1 : @FM : 999)
Message = 'New quantity is below already processed quantity.'
Form_Services('DisplayControlMessage', Message, 'Invalid Quantity', CtrlEntID, 'VALIDATION', 'RGB(229,20,0)')
Case NewQty GT MaxQty
Set_Property(CtrlEntID, 'FOCUS', True$)
Set_Property(CtrlEntID, 'SELECTION', 1 : @FM : 999)
Message = 'New quantity exceeds the available quantity.'
Form_Services('DisplayControlMessage', Message, 'Invalid Quantity', CtrlEntID, 'VALIDATION', 'RGB(229,20,0)')
Case Otherwise$
ValidQty = True$
End Case
If ValidQty then GoSub UpdateWorkOrderDetails
end event
Event DESCRIPTION.CHAR(VirtCode, ScanCode, CtrlKey, ShiftKey, AltKey)
GoSub EnableSaveButton
GoSub EnableSaveButton
end event
@ -188,9 +188,9 @@ end event
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
SelectAll:
Set_Property(CtrlEntId, 'SELECTION', 1 : @FM : 999)
Set_Property(CtrlEntId, 'SELECTION', 1 : @FM : 999)
return
@ -206,155 +206,152 @@ return
UpdateCustomerName:
WoNo = Get_Property(@Window : '.WO_NO', 'TEXT')
If WoNo NE '' then
WorkOrderDetail = Work_Order_Services('GetWorkOrderLogDetail', WONo)
CustNo = WorkOrderDetail<WO_LOG_CUST_NO$>
CompanyRow = Database_Services('ReadDataRow', 'COMPANY', CustNo)
CustName = CompanyRow<42>
end else
CustName = ''
end
Set_Property(@Window : '.CUSTOMER_NAME', 'TEXT', CustName)
WoNo = Get_Property(@Window : '.WO_NO', 'TEXT')
If WoNo NE '' then
WorkOrderDetail = Work_Order_Services('GetWorkOrderLogDetail', WONo)
CustNo = WorkOrderDetail<WO_LOG_CUST_NO$>
CompanyRow = Database_Services('ReadDataRow', 'COMPANY', CustNo)
CustName = CompanyRow<42>
end else
CustName = ''
end
Set_Property(@Window : '.CUSTOMER_NAME', 'TEXT', CustName)
return
UpdateReactorDetails:
ReactorNo = Get_Property(@Window : '.REACTOR_NO', 'TEXT')
If Index(ReactorNo, '/', 1) then
// EpiPro reactors formatted as such, "40/42". We must truncate the reactor number to the first reactor.
ReactorNo = Field(ReactorNo, '/', 1, 1)
Set_Property(@Window : '.REACTOR_NO', 'TEXT', ReactorNo)
end
ReactorDetails = Schedule_Services('GetReactorDetails', ReactorNo)
ReactorType = ReactorDetails<REACTOR_REACT_TYPE$>
Begin Case
Case ReactorType _EQC 'EPP' ; ReactorType = 'EpiPro'
Case ReactorType _EQC 'GAN' ; ReactorType = 'GaN'
End Case
Set_Property(@Window : '.REACTOR_TYPE', 'TEXT', ReactorType)
Set_Property(@Window : '.REACTOR_SIZE', 'TEXT', ReactorDetails<REACTOR_SUSC_POCKET_SIZE$>)
FutureEvents = Schedule_Services('GetScheduleEvents', Date() + 1, '', ReactorNo, '', False$)
Set_Property(@Window, '@FUTURE_EVENTS', FutureEvents)
ReactorNo = Get_Property(@Window : '.REACTOR_NO', 'TEXT')
If Index(ReactorNo, '/', 1) then
// EpiPro reactors formatted as such, "40/42". We must truncate the reactor number to the first reactor.
ReactorNo = Field(ReactorNo, '/', 1, 1)
Set_Property(@Window : '.REACTOR_NO', 'TEXT', ReactorNo)
end
ReactorDetails = Schedule_Services('GetReactorDetails', ReactorNo)
ReactorType = ReactorDetails<REACTOR_REACT_TYPE$>
Begin Case
Case ReactorType _EQC 'EPP' ; ReactorType = 'EpiPro'
Case ReactorType _EQC 'GAN' ; ReactorType = 'GaN'
End Case
Set_Property(@Window : '.REACTOR_TYPE', 'TEXT', ReactorType)
Set_Property(@Window : '.REACTOR_SIZE', 'TEXT', ReactorDetails<REACTOR_SUSC_POCKET_SIZE$>)
FutureEvents = Schedule_Services('GetScheduleEvents', Date() + 1, '', ReactorNo, '', False$)
Set_Property(@Window, '@FUTURE_EVENTS', FutureEvents)
return
UpdateWorkOrderDetails:
SchedDetNGKey = Get_Property(@Window, '@SCHEDULE_KEY_ID')
If SchedDetNGKey NE '' then
CurrDTM = Datetime()
SchedDetNGRec = Database_Services('ReadDataRow', 'SCHED_DET_NG', SchedDetNGKey)
WorkOrder = Get_Property(@Window : '.WO_NO', 'TEXT')
ReactNo = Get_Property(@Window : '.REACTOR_NO', 'TEXT')
WorkOrderDetail = Work_Order_Services('GetWorkOrderLogDetail', WorkOrder)
EpiPart = WorkOrderDetail<WO_LOG_EPI_PART_NO$>
TotalWafers = WorkOrderDetail<WO_LOG_WO_QTY$>
CurrEventQty = SchedDetNGRec<SCHED_DET_NG.EVENT_TOTAL_WFRS$>
RemainingWafers = Schedule_Services('GetEventRemainingWfrs', SchedDetNGKey)
// We need to add in any loaded wafers to the new min event quantity.
LoadedWafers = Schedule_Services('GetEventLoadedWfrQty', SchedDetNGKey)
ProcessedWfrQty = TotalWafers - RemainingWafers
NewEventMin = CurrEventQty - RemainingWafers + LoadedWafers
RemainingToSchedule = Schedule_Services('GetUnscheduledWfrQty', WorkOrder)
NewEventMax = RemainingToSchedule + CurrEventQty
If TotalWafers GT 0 then
Complete = (TotalWafers - RemainingWafers) / TotalWafers * 100
end else
Complete = 0
end
ReactorType = Get_Property(@Window : '.REACTOR_TYPE', 'TEXT')
MinutesPerWaferAdjusted = Epi_Part_Services('GetAdjustedWafersPerDayScheduler', EpiPart, ReactorType)
NewEventQty = Get_Property(@Window:'.NEW_QTY', 'TEXT')
StartDTM = SchedDetNGRec<SCHED_DET_NG.START_DTM$>
If ( (NewEventQty NE CurrEventQty) and (NewEventQty NE '') ) then
DurationEstimate = Schedule_Services('GetEventDuration', WorkOrder, (NewEventQty - ProcessedWfrQty))
EndDTM = CurrDTM + DurationEstimate
end else
EndDTM = SchedDetNGRec<SCHED_DET_NG.STOP_DTM$>
end
TotalRunTime = EndDTM - StartDTM
Set_Property(@Window, '@MIN_QTY', NewEventMin)
Set_Property(@Window, '@MAX_QTY', NewEventMax)
NewQtyLabel = 'New Qty (':NewEventMin:' - ':NewEventMax:'):'
If MinutesPerWaferAdjusted EQ '' then
Msg(@Window, 'Warning: ' : EpiPart : ' appears to be missing minutes per wafer values for ' : ReactorType)
end
end
If (SchedDetNGKey NE '') then
Set_Property(@Window : '.EPI_PART', 'TEXT', EpiPart)
Set_Property(@Window : '.TOTAL_WAFERS', 'TEXT', TotalWafers)
Set_Property(@Window : '.TOTAL_REMAINING', 'TEXT', RemainingWafers)
Set_Property(@Window : '.PERCENT_COMPLETE', 'TEXT', Oconv(Complete, 'MD0[ %]S'))
Set_Property(@Window : '.SCHEDULE_END_DTM', 'INVALUE', EndDTM)
RunTimeRounded = SRP_Math('ROUND', TotalRunTime, 1)
Set_Property(@Window : '.DAYS', 'DEFPROP', RunTimeRounded)
Set_Property(@Window : '.AVAILABLE_QTY', 'TEXT', RemainingToSchedule)
Set_Property(@Window : '.OPTIONS_NEW_QTY', 'TEXT', NewQtyLabel)
end else
Error_Services('DisplayError')
Set_Property(@Window : '.EPI_PART', 'TEXT', '')
Set_Property(@Window : '.TOTAL_WAFERS', 'TEXT', '')
Set_Property(@Window : '.TOTAL_REMAINING', 'TEXT', '')
Set_Property(@Window : '.SCHEDULE_WAFERS', 'TEXT', '')
Set_Property(@Window : '.PERCENT_COMPLETE', 'TEXT', '')
Set_Property(@Window : '.SCHEDULE_END_DTM', 'INVALUE', '')
Set_Property(@Window : '.DAYS', 'DEFPROP', '')
end
GoSub EnableSaveButton
SchedDetNGKey = Get_Property(@Window, '@SCHEDULE_KEY_ID')
If SchedDetNGKey NE '' then
CurrDTM = Datetime()
SchedDetNGRec = Database_Services('ReadDataRow', 'SCHED_DET_NG', SchedDetNGKey)
WorkOrder = Get_Property(@Window : '.WO_NO', 'TEXT')
ReactNo = Get_Property(@Window : '.REACTOR_NO', 'TEXT')
WorkOrderDetail = Work_Order_Services('GetWorkOrderLogDetail', WorkOrder)
EpiPart = WorkOrderDetail<WO_LOG_EPI_PART_NO$>
TotalWafers = WorkOrderDetail<WO_LOG_WO_QTY$>
CurrEventQty = SchedDetNGRec<SCHED_DET_NG.EVENT_TOTAL_WFRS$>
RemainingWafers = Schedule_Services('GetEventRemainingWfrs', SchedDetNGKey)
// We need to add in any loaded wafers to the new min event quantity.
LoadedWafers = Schedule_Services('GetEventLoadedWfrQty', SchedDetNGKey)
ProcessedWfrQty = TotalWafers - RemainingWafers
NewEventMin = CurrEventQty - RemainingWafers + LoadedWafers
RemainingToSchedule = Schedule_Services('GetUnscheduledWfrQty', WorkOrder)
NewEventMax = RemainingToSchedule + CurrEventQty
If TotalWafers GT 0 then
Complete = (TotalWafers - RemainingWafers) / TotalWafers * 100
end else
Complete = 0
end
ReactorType = Get_Property(@Window : '.REACTOR_TYPE', 'TEXT')
MinutesPerWaferAdjusted = Epi_Part_Services('GetAdjustedWafersPerDayScheduler', EpiPart, ReactorType)
NewEventQty = Get_Property(@Window:'.NEW_QTY', 'TEXT')
StartDTM = SchedDetNGRec<SCHED_DET_NG.START_DTM$>
If ( (NewEventQty NE CurrEventQty) and (NewEventQty NE '') ) then
DurationEstimate = Schedule_Services('GetEventDuration', WorkOrder, (NewEventQty - ProcessedWfrQty))
EndDTM = CurrDTM + DurationEstimate
end else
EndDTM = SchedDetNGRec<SCHED_DET_NG.STOP_DTM$>
end
TotalRunTime = EndDTM - StartDTM
Set_Property(@Window, '@MIN_QTY', NewEventMin)
Set_Property(@Window, '@MAX_QTY', NewEventMax)
NewQtyLabel = 'New Qty (':NewEventMin:' - ':NewEventMax:'):'
If MinutesPerWaferAdjusted EQ '' then
Msg(@Window, 'Warning: ' : EpiPart : ' appears to be missing minutes per wafer values for ' : ReactorType)
end
end
If (SchedDetNGKey NE '') then
Set_Property(@Window : '.EPI_PART', 'TEXT', EpiPart)
Set_Property(@Window : '.TOTAL_WAFERS', 'TEXT', TotalWafers)
Set_Property(@Window : '.TOTAL_REMAINING', 'TEXT', RemainingWafers)
Set_Property(@Window : '.PERCENT_COMPLETE', 'TEXT', Oconv(Complete, 'MD0[ %]S'))
Set_Property(@Window : '.SCHEDULE_END_DTM', 'INVALUE', EndDTM)
RunTimeRounded = SRP_Math('ROUND', TotalRunTime, 1)
Set_Property(@Window : '.DAYS', 'DEFPROP', RunTimeRounded)
Set_Property(@Window : '.AVAILABLE_QTY', 'TEXT', RemainingToSchedule)
Set_Property(@Window : '.OPTIONS_NEW_QTY', 'TEXT', NewQtyLabel)
end else
Error_Services('DisplayError')
Set_Property(@Window : '.EPI_PART', 'TEXT', '')
Set_Property(@Window : '.TOTAL_WAFERS', 'TEXT', '')
Set_Property(@Window : '.TOTAL_REMAINING', 'TEXT', '')
Set_Property(@Window : '.SCHEDULE_WAFERS', 'TEXT', '')
Set_Property(@Window : '.PERCENT_COMPLETE', 'TEXT', '')
Set_Property(@Window : '.SCHEDULE_END_DTM', 'INVALUE', '')
Set_Property(@Window : '.DAYS', 'DEFPROP', '')
end
GoSub EnableSaveButton
return
PopulateControls:
Set_Property(@Window, 'TEXT', 'Scheduler Actions - Modify Work Order Event')
Set_Property(@Window : '.REACTOR_NO', 'NEXT', @Window : '.SCHEDULE_START_DTM')
Set_Property(@Window : '.DESCRIPTION', 'NEXT', @Window : '.REACTOR_NO')
SchedDetNGKey = Get_Property(@Window, '@SCHEDULE_KEY_ID')
SchedDetRec = Schedule_Services('GetScheduleDetail', SchedDetNGKey)
WONo = SchedDetRec<SCHED_DET_NG.WO_NO$>
ReactorNo = SchedDetRec<SCHED_DET_NG.REACT_NO$>
StartDTM = SchedDetRec<SCHED_DET_NG.START_DTM$>
StopDTM = SchedDetRec<SCHED_DET_NG.STOP_DTM$>
EventWfrs = SchedDetRec<SCHED_DET_NG.EVENT_TOTAL_WFRS$>
Desc = SchedDetRec<SCHED_DET_NG.DESC$>
Set_Property(@Window : '.WO_NO', 'TEXT', WONo)
Set_Property(@Window : '.REACTOR_NO', 'TEXT', ReactorNo)
Set_Property(@Window : '.SCHEDULE_START_DTM', 'INVALUE', StartDTM)
Set_Property(@Window : '.SCHEDULE_END_DTM', 'INVALUE', StopDTM)
Set_Property(@Window : '.SCHEDULE_WAFERS', 'INVALUE', EventWfrs)
Set_Property(@Window : '.DESCRIPTION', 'INVALUE', Desc)
* GoSub UpdateScheduleDetails
GoSub UpdateReactorDetails
GoSub UpdateCustomerName
GoSub UpdateWorkOrderDetails
Set_Property(@Window : '.REACTOR_NO', 'FOCUS', True$)
Set_Property(@Window, 'TEXT', 'Scheduler Actions - Modify Work Order Event')
Set_Property(@Window : '.REACTOR_NO', 'NEXT', @Window : '.SCHEDULE_START_DTM')
Set_Property(@Window : '.DESCRIPTION', 'NEXT', @Window : '.REACTOR_NO')
SchedDetNGKey = Get_Property(@Window, '@SCHEDULE_KEY_ID')
SchedDetRec = Schedule_Services('GetScheduleDetail', SchedDetNGKey)
WONo = SchedDetRec<SCHED_DET_NG.WO_NO$>
ReactorNo = SchedDetRec<SCHED_DET_NG.REACT_NO$>
StartDTM = SchedDetRec<SCHED_DET_NG.START_DTM$>
StopDTM = SchedDetRec<SCHED_DET_NG.STOP_DTM$>
EventWfrs = SchedDetRec<SCHED_DET_NG.EVENT_TOTAL_WFRS$>
Desc = SchedDetRec<SCHED_DET_NG.DESC$>
Set_Property(@Window : '.WO_NO', 'TEXT', WONo)
Set_Property(@Window : '.REACTOR_NO', 'TEXT', ReactorNo)
Set_Property(@Window : '.SCHEDULE_START_DTM', 'INVALUE', StartDTM)
Set_Property(@Window : '.SCHEDULE_END_DTM', 'INVALUE', StopDTM)
Set_Property(@Window : '.SCHEDULE_WAFERS', 'INVALUE', EventWfrs)
Set_Property(@Window : '.DESCRIPTION', 'INVALUE', Desc)
* GoSub UpdateScheduleDetails
GoSub UpdateReactorDetails
GoSub UpdateCustomerName
GoSub UpdateWorkOrderDetails
Set_Property(@Window : '.REACTOR_NO', 'FOCUS', True$)
return
EnableSaveButton:
OrigDesc = Get_Property(@Window, '@ORIG_DESC')
NewDesc = Get_Property(@Window : '.DESCRIPTION', 'TEXT')
CurrQty = Get_Property(@Window : '.SCHEDULE_WAFERS', 'TEXT')
NewQty = Get_Property(@Window : '.NEW_QTY', 'TEXT')
MinQty = Get_Property(@Window, '@MIN_QTY', 'TEXT')
MaxQty = Get_Property(@Window, '@MAX_QTY', 'TEXT')
DescChange = (NewDesc NE OrigDesc)
QtyChange = ( (NewQty NE '') and (NewQty NE CurrQty) and (NewQty GT 0) and (NewQty LE MaxQty) and (NewQty GE MinQty) )
ButtonEnabled = (DescChange or QtyChange)
Set_Property(@Window : '.SAVE_BUTTON', 'ENABLED', ButtonEnabled)
OrigDesc = Get_Property(@Window, '@ORIG_DESC')
NewDesc = Get_Property(@Window : '.DESCRIPTION', 'TEXT')
CurrQty = Get_Property(@Window : '.SCHEDULE_WAFERS', 'TEXT')
NewQty = Get_Property(@Window : '.NEW_QTY', 'TEXT')
MinQty = Get_Property(@Window, '@MIN_QTY', 'TEXT')
MaxQty = Get_Property(@Window, '@MAX_QTY', 'TEXT')
DescChange = (NewDesc NE OrigDesc)
QtyChange = ( (NewQty NE '') and (NewQty NE CurrQty) and (NewQty GT 0) and (NewQty LE MaxQty) and (NewQty GE MinQty) )
ButtonEnabled = (DescChange or QtyChange)
Set_Property(@Window : '.SAVE_BUTTON', 'ENABLED', ButtonEnabled)
return