Production Variant production Variant generator be.as script - robinfeng/beashelp GitHub Wiki

beas 脚本


Navigation: Production > Variant production > Variant generator: help-zahnradbeas - script No contents entries on this page Contents This defines how a variable should receive its value, unless determining the value takes place through the default types of origin.

Determining the value is done either in an SQL instruction or in the beas script

The beginning of the origin script also determines the origin control:

select The result of the select statement is returned. Only one result may be returned. Placeholders can be inserted. [beas-script] In case of a multi-line beas COMMON-Script, the script may not begin with "SELECT". itemcode. Information from the assembly: e.g. itemcode.u_znr (= drawing number) rohitemcode. Information from the current BOM position: e.g. itemcode.usertext (= extra text) e_ Access to a beas variable. All master data information in the current BOM position or routing position is available as beas variables: e.g. e_pos_id, e_art1_id, e_udf1, e_aplatz_id etc.

Alternatively, a complex beasCOMMON script can be entered. However, this script must not begin with a select instruction. If this is required, a comment with // must first be inserted (in first line).

Example: Definition of a "workcenterid" variable

  1. Definition of origin. Name "workcenterid" with script "e_aplatz_id"
  2. Definition of variable, name "workcenterid", type "origin" – selection "workcenterid"

Now, if the variable "workcenterid" is added to the formula, the field aplatz_id of the operation is accessed directly. Naturally, this only works when the formula of a routing position is accessed.

Special variables The following additional beas variables are set:

e_docnum Order number (if a reference exists) - only available when creating a work order e_docentry Internal order number – table ordr - only available when creating a work order e_linenum Internal order line – table rdr1 – beginning with 0 - only available when creating a work order e_belnr_id Document number of the current work order e_belpos_id Doc. Position e_itemcode Item number of the assembly e_menge Quantity of the assembly e_menge_verbrauch_gesamt Calculated total quantity of the material e_info1 Assembly/BOM that is currently being broken down e_rohitemcode Material number of the BOM position (identical with e_art1_id) e_aktiv Y/N: Should BOM/operation position be added?