For more complex processes and calculations related to variant configuration, it is also possible to change properties of field positions using Beas-script.
Proposal Picking is pending to be processed for work order.
You can also append BOM or routing items. There is no need to start from a maximum list and turning items inactive at runtime.
This function is useful in cases where decisions are made to add BOM items or routing positions.
Clicking on the icon in front of the input field "position", the Beas editor window opens, to enter Beas-script.
Note:
In versions before Beas 2020.11 the script function was only working on main item level.
For sub-assemblies the system ignored the script.
|
|
|
<itemcode.[fieldname]>
|
Field from assembly item master data, table "OITM"
HANA: Field Name must be added correctly.
Example: Wrong: itemname, Correct ItemName
|
<oitm.ItemName>
|
<bom_itemcode.[fieldname|>
|
Field from material item master data, table "OITM". You can use this only in a Bill of materials – script
HANA: Field Name must be added correctly.
Example: Wrong: itemname, Correct ItemName
|
<bom_itemcode.ItemName>
|
<ordr.[fieldname]>
<rdr1.[fieldname]>
|
Field from sales order if a link exists.
HANA: Field Name must be added correctly.
Example: Wrong: docnum, Correct DocNum
Note:
This is only working, if the document is saved
Example: If you create a Calculation from Sales order, then the system can read the information only, if the order is added/updated.
|
<ordr.DocNum>
<rdr1.U_myduf>
|
<parameter.[parametername]>
|
Field from configurator if a link to a configuration exists.
If no entry found: – the link to a work order parameter if work order exists.
If no entry found: – item parameter (Item master data – parameters)
|
<parameter.length>
|
<productconfiguration>
|
The Id of current product configuration.
|
<productconfiguration>
|
<variant>
|
The Id of current variant (A ...Z).
|
<variant>
|
|
Only for scripts which will be deposited directly behind an item.
Functions are part of the object "variant". This identification has to be indicated accordingly.
Example: variant.addbom=itemcode=A1001<tab>pos_id=40<tab>sortid=40<tab>pos_text=40<tab>quantity=1
Note: Separation of the parameters with "<tab>" possible since beas 9.1 PL: 08.
|
|
|
addbom
|
Add a bom position, properties
|
variant=addbom=itemcode<tab>quantity=4
|
addrouting
|
Add a routing position
|
variant=addrouting=aplatz_id=A001
|
addparallelressource
|
Add a parallel resource or tool
|
variant=addparallelressource=wkz_id=T001
|
|
Nearly all attributes of a routing position with the object "variant" can be accessed via the Beas Script:
|
|
pos_id
|
BOM position
|
pos_text
|
BOM sequence
(Text for Routing position)
|
sortid
|
Sorting ID for BOM position
|
itemcode, art1_id
|
Item
|
itemname
|
Description
|
quantity, menge_lager, menge_verbrauch
|
Quantity
|
quantity_by, menge_je
|
Quantity per
|
roundingtype, round_type
|
Rounding-Type
|
roundingdec, round_dec
|
Mach+Labor Time/unit / Processing time
|
routingposition, aplanpos_id
|
Routing position
|
length, abm1
|
Length
|
width, abm2
|
Width /OD
|
height, abm3
|
Height /ID
|
additionaltext, usertext
|
Additional Text
|
warehouse, whscode
|
Warehouse
|
aktiv
|
Active flag
|
udf1 .... udf15
|
User defined field 1 - 15
|
|
Nearly all attributes of a routing position with the object "variant" can be accessed via the Beas Script:
|
|
resource_id, ressource, aplatz_id, resource
|
Resource
|
operation, ag_id
|
Operation
|
pos_id
|
Routing position
|
pos_text
|
Operation sequence
(Text for Routing position)
|
sortid
|
Sorting ID for Routing position
|
agtyp, agtype, type
|
Type
|
description, bez
|
Description
|
clockmandatory
|
Clock Mandatory
|
setup_calculation, traplatz
|
setting up time
|
setup_scheduling, tr2aplatz
|
Setup time capacity
|
time, teaplatz
|
Mach+Labor Time/unit / Processing time
|
costelement, timetype_id
|
Cost Element
|
timefor, menge_je
|
Time for .. finished part
|
timein, menge_zeitje
|
Time in .. (min=1, hour=60)
|
usefaktor, nutzen, usefactor
|
Use factor
|
worksteps, anzahl
|
Work steps
|
idletime, tl
|
Idle time
|
overlapptime, ueblgrz
|
Overlap limit
|
scrapfactor, ausschussfaktor
|
Scrap factor
|
qcinspectionplan, qs_id
|
QC inspection plan
|
payslips, lohnscheine, anzls
|
Number of payslips
|
activ, aktiv, active, aktivformel
|
Operation active
|
udf1 ... udf15
|
User defined field 1 - 15
|
feedback_unit, rm_me_id
|
Confirm in units
|
feedback_factor, rm_faktor
|
Factor for Assembly
|
external_itemcode, external_price
|
For external Routing position: The non warehouse item for Purchase order and the price
beas 9.3 PL2 HF1
|
|
Following attributes can be accessed with the object "variant" via the Beas Script:
|
|
ressource, ressource_id, resource, aplatz_id, wkz_id
|
Resource
|
activ, aktiv, active
|
Parallel resource active
|
alternativ, alternatively, alternative
|
Set Alternative resource
|
zusatzinfo, description
|
Description
|
costelement, timetype_id, kostenart
|
Cost element
|
anteil, zeitreservierung, timereservation
|
Time reservation
|
|
All attributes of the object "variant" can be accessed via the script if the script is deposited directly in the BOM position or routing position.
English is supported, but it is recommended to use the field names.
Example for BOM – Additional information:
variant.description=this is my description
The most important characteristics are listed in the script-Editor right and can be changed here.
To access on existing values, use the field name "e_", e.g.
Routing – Resource: <e_aplatz_id>
|
Using the simple variant configuration (Variants from A to Z) using Beas-script simple decision can be programmed:
Example 1:
In case that variant "A" was selected, a BOM item with item number "test003" is added.
if <variant> = A then
variant.addbom=itemcode=test003,pos_id=40,sortid=40,pos_text=40,quantity=1,quantity_by=1,warehouse=01
end if
Example 2:
In case that variant "B" was selected, a routing position with defined resource "1102" and with times is added.
if <variant> = B then
variant.addrouting=resource=1102,pos_id=20,sortid=20,pos_text=20,description=2.Position,traplatz=10,time=15,type=operation
end if
If variables from Product configurator are needed, use them as in the following example
Examples:
In parameter "length" of the product configuration the length of a part was defined. Depending no the length a BOM item is to be added:
if <parameter.length> n> 1000 then
variant.addbom=itemcode=material001,pos_id=60,sortid=60,pos_text=60,quantity=2
end if
The field contents can be set directly on the position level of a BOM position.
setvar=v_itemcode=printer_08
setvar=v_quantity=4
...
variant.art1_id=<v_itemcode>
variant.quantity=<v_quantity>
// set position of BOM to inactive
variant.aktiv=N
This is also possible for the operations on position level.
variant.bez=Carton Type A
// set position of operation inactive. Note: Routings must be set active/inactive via "setvar=e_aktivformel"
// set direct inactive
setvar=e_aktivformel=N
or
// set with parameter (e.g. "pos_active") from corresponding configuration
setvar=e_aktivformel=<parameter.pos_active>
|
The scripts will be considered at:
- Create Work Order
- Create Precalculation
No consideration at:
- MRP / Order Recommendation
- Item structure view, Structure reports.
|
You can set all fields which are available in the BOM.
The following fields (not definable in the BOM item master) are additionally available:
price
itemname
|
Decimal numbers are transferred in the national system (Windows Regional settings).
The following problems :
Decimal separator = Comma: Comma is also a parameter separator. The variable must be defined before.
setvar=lc_price=5,5
variant.addbom=itemcode=material001,quantity=<lc_price>
Different regional settings: If working with different regional settings, do the following: Enter a decimal variable in a string variable and then transfer the string variable. Thus the correct regional format will be defined at the conversion.
decimal lc_quantity
lc_quantity=2.34
setvar=ls_quantity=<lc_quantity,#0.000000>
variant.addbom=itemcode=AB123T,pos_id=11, pos_id=11,sortid=11,pos_text=11,quantity=<ls_quantity>,quantity_by=1,warehouse=01
|
Help URL: https://help.beascloud.com/beas202106/index.html?scriptvariants.htm
|