CreateWorkOrderEnd

Executed after creation of complete work order

(not triggered, if the user create the work order manually)

 

Variable

Read

Write


e_WoDocEntry

x


Number of created work order

 

beasscript-logo-small

Example:

Follow function lock the work order after creation, if one of used Resource current not available

function CreateWorkOrderEnd
// lock workorder if resource with stillstand - message included
select count(*) into ll_count from "BEAS_FTAPL" where "BEAS_FTAPL"."BELNR_ID" = <e_WoDocEntry> &
  and "APLATZ_ID" in (select "APLATZ_ID" from "BEAS_APLATZ_STILLSTAND" where  &
  CAST(TO_VARCHAR("BEAS_APLATZ_STILLSTAND"."DATUM_BIS",'YYYYMMDD') AS CHAR(8))='20500101')
if <ll_count> n> 0 then
   "SQL"=update "BEAS_FTHAUPT" set "SPERRUNG"='J' where "BEAS_FTHAUPT"."BELNR_ID" = <e_WoDocEntry>
   message=info$msg1$One or more resources current not available. Work order will be locked.
end if
end function

 

 

Example: Print Work order directly after creation

see beasfunction / printworkorder

beasscript-logo-small

function CreateWorkOrderPositionEnd 

// We want to print current and all sub positions

 

 
beasfunction=PrintWorkorder=<e_WoDocEntry>=<e_WoLineNumber>=print==true
end function