Beas Script

Production > Product Configurator > Beas Script

Top  Previous  Next
Expand/Collapse Toggles

This defines how a variable should receive its value, unless determining the value takes place through the default types of origin.

This can be

- a field from item or sales order table

- result of SQL statement

- a Beas or JBScript

 

With the Test-Button you can test the formula directly.

beas-script1

caft_herkunft_edit.psr

 

If the Type is Beas Script and the Origin Script is empty, you can choose "ItemCode","ORDR" "RDR1" or "BoMItemCode"

This allows you to create an SQL statement or insert the placeholder.

hmtoggle_plus1Details:

 

select

The result of the select statement is returned. Only one result may be returned. Placeholders can be inserted.

example : return the assembly
select <e_itemcode,dbstring> from "BEAS_DUMMY"

ORDR
RDR1

Information from Sales Order or Sales Order line. Only if linked at creation time to a Sales order.

itemcode.

Information from the assembly:

e.g. itemcode.u_beas_znr  (= drawing number)

bomItemCode

 

Bill of Material item code

e.g. bomItemCode.usertext

Beas 2020.06

e_

Access to a Beas variable. All master data information in the current BOM position or routing position is available as Beas variables:

See Pre-defined Beas variables

 

Beas Script

You can insert a complete Beas Script function. Return the result with

setvar=e_result="your result"

You've access to all Pre-defined Beas variables

Example

if <e_quantity> n> 5 then
  setvar=e_result="ABC"
else
  setvar=e_result="DEF"
end if

 

JBScript

You can insert JBScript. Define result in the return command

return "your result";

Example

if (e_quantity > 5 )
  return "ABC";
else
  return "DEF";

 

 

hmtoggle_plus1Pre-defined Beas 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 order  – 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

Work order number

e_belpos_id

Work order position

e_itemcode

Item number of the assembly

e_quantity

Quantity of the assembly (only work order and calculation)

e_info1

Assembly/BOM that is currently being broken down (only Work order and Pre calculation)

e_bomitemcode

Material number of the BOM position (identical with e_art1_id) Beas 2020.06

e_aktiv

Y/N: Should BOM/operation position be added?

e_BoMId

Bill of Material Id Beas 2020.06

e_RoutingId

RoutingId Beas 2020.06


Help URL: https://help.beascloud.com/beas202102/index.html?beas_script2.htm