bom_additem
|
object=ue_api_wo=bom_additem=<belnr_id>=<belpos_id>=<itemcode>=<qty>
qty in using-unit (menge_verbrauch)
return in "<e_pos_id>" the new pos_id
You cannot add a phantom item to a work order material list (incl. existing routings)!
|
|
bom_close
|
Example:
object=ue_api_wo=bom_close=<belnr_id>=<belpos_id>=<pos_id>
|
|
bom_quantity
|
if the quantity of an assembly or Bill of material position has changed, the total quantity must be calculated.
For a complete work order
wo.bom_quantity=x
For work order position
wo.bom_quantity=x=y
For Bill of Material position
wo.bom_quantity=x=y=z
|
|
bom_reopen
|
Example
object=ue_api_wo=bom_reopen=<belnr_id>=<belpos_id>=<pos_id>
|
|
bom_replaceitem
|
setvar=ls_newitemcode=[new itemcode]
declare=mywo=ue_api_wo
mywo=bom_replaceitem=<ll_belnr_id>=<ll_belpos_id>=<ll_pos_id>=<ls_newitemcode>
You cannot replace a material in a work order position with a phantom item or assembly!
|
|
bomcandelete=belnr_id,belpos_id,pos_id
|
Beas checks all sub-assembly from this position and the BoM-Position itself. Return in Value "value" "1"=can delete , -1 cannot delete
object=ue_api_wo=bomcandelete=<belnr_id>=<belpos_id>=<pos_id>
messagebox=<value>
|
|
checkrelease
|
object=ue_api_wo=checkrelease=fttyp=..<tab>itemcode=...
if <return> = success then
// all ok
else
messagebox=error$<value>
end if
Properties
fttyp
|
Beas work order type beas_fttyp
|
itemcode
|
assembly item code
|
stlitemcode
|
ID of used Bill of materials. empty=same as itemcode
|
routingid
|
ID of Routing plan. empty = same as itemcode
|
deliverydate
|
Date of delivery. empty=today
|
version
|
Version of assembly. Empty = does not check version
|
Return
failure = error. In "value" you've the error message
success = all ok
|
|
closeposition
|
declare=mywo=ue_api_wo
mywo=closeposition=<str_parm.belnr_id>=<str_parm.belpos_id>
Before closing, all necessary tests would be conducted.
There must be no open feedback.
A "Close" under certain circumstances CANNOT be undone.
|
|
copy_wopos
|
object=ue_api_wo=<from-belnr_id>=<from-belpos_id>=<to-belnr_id>
insert this position in at last in work order <to-belnr_id>
beas9.0-000-001-007
|
|
copy_workorder
|
object=ue_api_wo=<belnr_id>
messagebox=<value>
display -1 = error otherwise the new number
|
|
deleteworkorder
|
It is not necessary to load this.
object=ue_api_wo=deleteworkorder=<belnr_id>
if <return> = -1 then
// error handling
end if
|
|
delposition
|
Example: Delete a Work order-Position
declare=mywo=ue_api_wo
mywo=delposition=<belnr_id>=<belpos_id>=0
All necessary tests would be conducted before erasing.
If position is complete or feedback exists, no cancellation is possible.
beas delete all eraseable sub-Positionen and close the rest. In this case base close the actual position and clear the WIA-Accounts.
If the assembly has sub-groups with feedback, a cancellation is not possible.
The script workordermanagement:delstl() will be called. Is this a failure, a cancellation is not possible.
The script workordermanagement:delpos() will be called. Is this a failure, a cancellation is not possible.
Delete BoM-Position
declare=mywo=ue_api_wo
mywo=delposition=<belnr_id>=<belpos_id>=<pos_id>
You can check the deleteability of this position with "bomcandelete"
You cannot delete a phantom item (because you will not no the contents of this item)!
|
|
ftpos_refresh
|
declare=mywo=ue_api_wo
mywo=ftpos_refresh=<str_parm.belnr_id>=<str_parm.belpos_id>
Manufacturing assembly will be removed and re-imported. Working consequences, where feedback exists will not be deleted (depending on the option).
Whether an upgrade is possible, is dependent on other settings. If the assembly or production order is closed, no update is possible.
|
|
ftzuordnung=<parameter>
|
Parameter with tab
belnr_id,belpos_id
|
Check work order ...
|
receipt
|
Check for this receipt-document
|
distnumber
|
The distnumber of the receipt-document.
Works only with batches!
|
issue
|
checks only for this issue-document (optional)
|
getissue
|
Gets the issue-document automatically (examle for backflushing-procress) ... get the last issue-docentry which is created 4 min before the receipt document.
|
beas9.9-000-003-000
Example: create link for all work orders in the past
destroy=lds
declare=lds=ue_datastorevalues
lds=select "BEAS_FTPOS"."BELNR_ID"+0 as "BELNR_ID","BEAS_FTPOS"."BELPOS_ID"+0 as "BELPOS_ID" &
from "BEAS_FTPOS" &
inner join "OITM" on "OITM"."ItemCode"="BEAS_FTPOS"."ItemCode" and & ("OITM"."ManBtchNum"='Y' or "OITM"."ManSerNum"='Y')
for ll_loop=1 to <lds.rowcount>
lds.setrow=<ll_loop>
object=ue_api_wo=ftzuordnung=belnr_id=<lds.belnr_id><tab>belpos_id=<lds.belpos_id>
next
destroy=lds
|
|
|
getbomquantitysql
|
This part sequence requires the tables "beas_ftpos" and "beas_ftstl"
declare=mywo=ue_api_wo
select "BEAS_FTSTL"."POS_ID",<mywo.getquantitysql> as "Quantity" from "BEAS_FTSTL","BEAS_FTPOS" where "BEAS_FTSTL"."BELNR_ID"="BEAS_FTPOS"."BELNR_ID" and "BEAS_FTSTL"."BELPOS_ID"="BEAS_FTPOS"."BELPOS_ID"
|
|
getsubassembly=belnr_id,belpos_id,pos_id
|
object=ue_api_wo=getsubassemlby=<belnr_id>=<belpos_id>=<pos_id>
messagebox=<value>
Returns as example: "20,30,40"
Example: print all work orders automatically after work order creation.
userevent workordermanagement
function CreateWorkOrderPositionEnd
object=ue_api_wo=getsubassembly=<e_WoDocEntry>=<e_WoLineNumber>
setvar=e_positions=<value>
[loop]
tools=token=e_positions=,
if <value> = "" then
goto=exitloop
end if
beasfunction=PrintWorkorder=<e_WoDocEntry>=<value>=print==true
goto=loop
[exitloop]
end function
|
|
gettimesql
|
The partial sequence required the tables beas_ftapl,beas_ftpos and beas_ftapl
declare=mywo=ue_api_wo
select "BEAS_FTSTL"."POS_ID",<mywo.gettimesql> as wotime from
"BEAS_FTAPL" inner join "BEAS_FTPOS" on "BEAS_FTAPL"."BELNR_ID"="BEAS_FTPOS"."BELNR_ID" and "BEAS_FTAPL"."BELPOS_ID"="BEAS_FTPOS"."BELPOS_ID" left outer join "BEAS_APLATZ" on "BEAS_FTAPL"."APLATZ_ID"="BEAS_APLATZ"."APLATZ_ID"
where "BEAS_FTAPL"."BELNR_ID"=<str_parm.belnr_id> and "BEAS_FTAPL"."BELPOS_ID"=<str_parm.belpos_id>
select beas_ftstl.pos_id,<mywo.gettimesql> as wotime from
beas_ftapl inner join beas_ftpos on beas_ftapl.belnr_id=beas_ftpos.belnr_id and beas_ftapl.belpos_id=beas_ftpos.belpos_id left outer join beas_aplatz on beas_ftapl.aplatz_id=beas_aplatz.aplatz_id
where beas_ftapl.belnr_id=<str_parm.belnr_id> and beas_ftapl.belpos_id=<str_parm.belpos_id>
|
|
inventoryaudit
|
wo=inventoryaudit=docnumber=posnumber=routingnumber
if <value> = -1 then
message=info$<valuetext>
end if
Executes an Material
Executes inventory audit for the work sequence.
Return value will be stored in "value"
-1 Inventory not enough
1 Inventory OK
If return value is -1 so the reason will be stored in Variable <valuetext>.
|
|
|
|
loadworkorder
|
Load work order in memory and allows to change properties on work order level or add / change work order positions on position level
Add Line to existing work order
declare=wo=ue_api_wo
wo=loadworkorder=1411
wo.line.add
wo.line.itemcode=FP
wo.line.quantity_ve=5
wo.line.belpos_id=100
wo.line.save
destroy=wo
Change quantity in existing work order
declare=wo=ue_api_wo
wo=loadworkorder=1411
wo.line.gotobelpos_id=10
wo.line.quantity_ve=15
wo.line.save
// Now we must calculate total quantity in BoM
wo.bom_quantity=1411=10
destroy=wo
|
|
opcandelete=belnr_id,belpos_id,pos_id
|
returns in value: -1 = you can't delete, 1 = you can delete
beas check beas_arbzeit,beas_ftstmp,pch1,por1
object=ue_api_wo=opcandelete=<belnr_id>=<belpos_id>=<pos_id>
messagebox=<value>
|
|
refreshschema=belnr_id=belpos_id
|
This method deletes the current schema on BEAS_FTPOS_SCHEMA and inserts the updated selected schema.
object=ue_api_wo=refreshschema=<belnr_id>=<belpos_id>
|
|
reset / new
|
Deletes all instances, inserts new entries
|
residualquantity=belnr_id=belpos_id=pos_id=pos2_id
|
object=ue_api_wo=residualquantity=<belnr_id>=<belpos_id>=<pos_id>=<pos2_id>
messagebox=Residual Quantity = <value,#0.000000>
|
|
routing_close
|
object=ue_api_wo=routing_close=<belnr_id>=<belpos_id>=<pos_id>
|
|
routing_reopen
|
object=ue_api_wo=routing_reopen=<belnr_id>=<belpos_id>=<pos_id>
|
|
set
|
For set make a load.
You can set various properties in a Work order (beas 9.1 PL: 08)
declare=mywo=ue_api_wo
mywo=set=prior_id=1050=10=high
if <return> = -1 then
messagebox=you can not set the priority!
end if
destroy=mywo
Settigs for creation or refresh:
Function
|
Description
|
validdate=<date>
|
sets valid date to check BoM/routing valid date
you must set it before creating a work order (beas 9.1 PL 8)
|
capacityautomatic=true/false
|
Performs capacity planning automatically after refresh or save (standard = true)
|
settings for existing work orders
Function
|
Description
|
prior_id=<belnr_id>=<belpos_id>=<value>
|
sets the prior_id
|
apsstatus=<belnr_id>=<belpos_id>=<value>
|
sets planned 1=planned, 0=unplanned
|
sperrung=<belnr_id>=<belpos_id>=<value>
|
locks the work order J=locked, N=unlock
|
starttime,startzeit,startzeit_struktur
=<belnr_id>=<belpos_id>=<value>
|
Sets the "startzeit_struktur" work order.
Date must be always equal or greater than today. If date is earlier than today, the system will assign <today> date.
|
deliverydate, lieferdatum
=<belnr_id>=<belpos_id>=<value>
|
Sets the delivery date information in the work order position
|
fix, freeze
|
Sets all routing positions and all sub-positions of this work order position to freeze (1) or unfreeze (0)
// freeze all routing position from this
// work order position and his sub structure
object=ue_api_wo=set=freeze=<belnr_id>=<belpos_id>=1

|
|
|
updateworkorder
|
wo=loadworkorder=<belnr_id>
// changes
wo=updateworkorder
|
|
wipclear=belnr_id=
belpos_id
|
Example:
You found an error in the account-settings. we want to make an automatic correction for all closed work orders.
In this script you can open the work order, call the wipclear-function and close the position.
destroy=lds
declare=lds=ue_datastorevalues
lds=select "BELNR_ID","BELPOS_ID","ABGKZ_DATE" from "BEAS_FTPOS" where "ABGKZ"='J'
for ll_loop=1 to <lds.rowcount>
lds.setrow=<ll_loop>
select "ABGKZ" from "BEAS_FTHAUPT" where "BELNR_ID"=<lds.belnr_id.value>
setvar=ls_abgkz=<wert1>
if <ls_abgkz> = J then
sql=update "BEAS_FTHAUPT" set "ABGKZ"='N' where "BELNR_ID"=<lds.belnr_id.value>
end if
sql=update beas_ftpos set abgkz='N' where belnr_id=<lds.belnr_id.value> &
and belpos_id=<lds.belpos_id.value>
setvar=e_date=<lds.abgkz_date,yyyy/mm/dd>
object=ue_api_wo=wipclear=<lds.belnr_id.value>=<lds.belpos_id.value>
sql=update "BEAS_FTPOS" set "ABGKZ"='J' where "BELNR_ID"=<lds.belnr_id.value> &
and "BELPOS_ID"=<lds.belpos_id.value>
if <ls_abgkz> = J then
sql=update "BEAS_FTHAUPT" set "ABGKZ"='J' where "BELNR_ID"=<lds.belnr_id.value>
end if
next
|
|
kapa_recalcorder
|
object=ue_fert_struktur_browse=kapa_recalcorder=<belnr_id>=<belpos_id>
|
|
|
|