beasguievents

beasscript-logo-small  

 

The BEASGUI supports the expansion of SAP Business One windows.

To add e.g. new buttons or fields can be deposited for each FormType a source file with BEASSCRIPT.

The file is set in the program path or the project path, and the file name must have the following format:

 

sbo_xxx.src        … xxx corresponds to the SAP Business One specific FormType

 

The FormType can be determined if the debug mode is activated in SAP Business One, and the corresponding window is opened.

The appropriate FormType will be displayed in the status bar if the mouse pointer is over the form.

 

beasguievents are ONLY executed for pure SAP Forms.

Beas windows in the SAP environment have their own events (see Userevents / Systemevents).

 

The following events can be defined:

 

Overwriting of the SAP Events

Each event has a Preevent.

Does the Preevent returnsa Success, though the SAP standard and all following AddOns are ignored.

 

Example: Click on OK button.

It is used the preitempressed-Event.

 

windowevent preitempressed 1

if <currentuser> = "olli" then

 // cancel Update

 return false

end if

return no_action

 

 

Overwriting of the BEAS Extensions

Beas inserts several scripts.

These may not be deleted or changed.

If a project directory is activated, so custom-made extensions can be inserted.

The extensions will be executed here AFTER the BeasScript.

 

If the command "OVERWRITE" is inserted, the BeasScript is "overwritten" and only the custom-made script will be used.

 

The custom-made script is executed BEFORE the system script.

ATTENTION: If a "return" was inserted, the system specific script will NOT more be executed.

 

The custom-made script begins with "EXTENSION", so the custom-made script will be executed AFTER the system script.

If the system script ends with a RETURN, however, the custom-made script will not be executed, because it will be simply appended.

 

For example (in extended scripts):

The print icon should have default behavior as in SAP.

 

help-hinweisAll form events will only be called if you are NOT in preview or search mode!

Not affected by it are e.g. application menu and menu events.

 

windowevent print

overwrite

return NO_ACTION

 

 

Overview Events

 

open "view" - "System-Informatino"

insert in "Filter" "windowevent" (do not click on Button "Filter"!)

now you can see all Filter, which triggered from SAP to be.as

 

debugwindow

 

 

Example: change quantity in sales quotation   (Grid 38, Coll 11)

windowevent itemchanged 38 11

messagebox=new item=<item=38.col.1.value>, new Qty: <item=38.col.11.value>

end event

 

Example for right click: see Example in Create Right Click Entry