CreateWorkOrderPositionComplete

Executed  after creating a new work order position and after time calculation.

The Position, Routing and Bill of Materialis saved in the database

This event is called only for main level, not for sub positions

 

Variable

Read

Write


e_WoDocEntry

x


Number of created work order

e_WoLineNumber

x


Line Number

e_Project

x


Project Number

e_ItemCode

x


Item code from this work order position

e_Refresh

x


In refresh mode the work order will be created in parallel for synchronization the changes. But this work order is not saved in database. It's only temporally.
With this property you can check, if this is called in refresh mode.

 
true=in refresh mode
false=in creation mode

 

 

Idea: After creation of the work order the system has to print directly the work order document

Best solution: Beas User Events - CreateWorkOrderPositionComplete

This is called for every new main work order position

For printing you must read all sub position: bsl - WorkorderPos/GetSubPositions

 

 

beasscript-logo-small

workordermanagement.src:
 
function CreateWorkOrderPositionComplete 
// Use BSL for get Work order positions
instance bsl b
b.get=WorkorderPos/GetSubPositions(<e_WoDocEntry>,<e_WoLineNum>) 
// Read positions
setvar=e_positions=<b.value>
[loop]
// Get next Work order position
tools=token=e_positions=,
setvar=e_line=<value>
if <e_line> = "" then
  goto=exitloop
end if
// preview work order
beasfunction=PrintWorkorder=<e_WoDocEntry>=<e_line>
goto=loop
[exitloop]
// Destroy
destroy=b
end function