Create new visual objects (Button, Textfield, Column) in current form
in a beas form you can create buttons on different areas: Top, right and bottom side and inside the formula
Best event to create button: form_loaded Syntax
global function form_loaded create=button=text=ButtonText,name=ButtonName,Position=Area,{x,y,width,height} end global
Example to create Buttons in all areas
// ******* Event form_opened ******** global function form_loaded create=button=text=Pos0,name=mpos0,position=0 create=button=text=Pos1,name=mpos2,position=2 // Left create=button=text=Pos1-A,name=mpos1a,position=1 create=button=text=Pos1-B,name=mpos1b,position=1
create=button=text=PR,name=mpos1r,x=1700,y=30,height=66,width=180
end global
You can use most of additional properties:
For every button a function is needed, which is executed by click on button for Position 0-2 the main object is dw_master, if inside the form, then dw_1...7
global function dw_master_item_mpos2_click end global
Simple creation of this function 1. open the window with created buttons 2. open customizing script editor Crtl+DoubleClick on the Button -> beas open window for "New function" 3. click on "OK" -> beas create the correct function inside the script editor 4. insert your function
Example
global function dw_master_item_mpos2_click messagebox=Hello, this is my first function end global
|
only beas 9.3 PL 2 and later: With command
create=rightclick=name=my_object_name,text=displaytext,bitmap=bmp\bitmapname
The name of called function is
Example: global function form_loaded create=rightclick=text=Hello Boyum,name=boyum_hello,bitmap=bmp\active.png end global
global function dw_master_item_button_boyum_hello_click messagebox=clicked on Hello Boyum end global
|
A field has 2 parts: The input field need a reference to the database layer of the Report
In Script Editor you can see available fields from database layer
for create new fields you can use UDF5 ... UDF15
UDF1..4: This fields available. You can make this fields visible in Configuration Wizzard In many windows userfield1...x available. This fields are not linked with Database.
Best place to define new fields outside tab area is form_loaded
Syntax to create new field
global function form_loaded create=column=name=udf5,id=udf5,x=800,y=292,length=200 end global
name = field name id=udf5 = link to database layer Create a field on this defined position. You can fill it, beas load and save the value
Description of the field You can create this in one line together with the colum
global function form_loaded create=column=name=udf5,id=udf5,x=1000,y=292,length=220& ,text=BoyumTxt,x2=750,width2=220 end global
Field inside TAB Area
In many windows we've tab area inside the Datawindow Tab Area are not the Tab on top. The Tab area is always inside the Datawindow
Example Operatino Catalog - General / Extented / Tool Fields inside a Tab area are in same Datawindow, but in different cases Datawindow 2, 3 and so on
Name of the Tab object is "etab". In some windows we've tab objects inside main tab area with another name. Every tab-element have own name, example the first tab has name etab.stamm
You can see the object name and tab name in debug window if mouse over the tab name
This Tab objects created in form_load, form_loaded or other events.
global function etab_firstredraw end global
Use property "related" to define the position to another field
global function etab_firstredraw create=column=name=udf5,id=udf5,text=BoyumTxt,related=anzls end global
Attention: In this window we've empty areas, which not always empty
Alternative: Define position manually With tabobject, tabpage you can define the tab area create=column=name=udf5,id=udf5,text=BoyumTxt,tabobject=etab,tabpage=stamm,x=...y=...,x2=...,wdith2=...
Numeric fields, Date FieldsUserfields are always string fields and not numeric or date fields But it's possible to simulate numeric or date fields Concept: Define the type of field (beas 9.3 PL 2)
Example:
Operation catalog - new field Number field with 2 decimal places we need alignment=1 = right alignment type=#0.00 = numeric, 2 decimal places
global function etab_firstredraw // add new field, right alignment create=column=name=udf5,id=udf5,text=BoyumNum,related=anzls,alignment=1,type=#0.00 end global
as date field we need dropdown=date = Calendar type=date = replace input in correct date format
global function etab_firstredraw // add new field, right alignment create=column=name=udf5,id=udf5,text=BoyumDate,related=anzls,dropdown=date,type=date end global
|
|
Properties: [ use comma for seperation ]
|
Example Video:
Create Label for each line from a sap b1 receipt document
Function: Open material issue form from time receipt window
Create issue document from work order bill of material window