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
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