menu (sbo)

beasscript-logo-small

The SBO-Menu can be changed completely.

The best place for adding new menus is the beasmenu.src (in the project folder)

BEAS takes care of the menu-management.

 

Customize the menu with beasmenu.src

in this file you can define 2 functions:

function start

// is called BEFORE menu-painting. Do not add menus here

end

function poststart

beasgui=addmenu=parent=tools<tab>caption=myFunction<tab>command=openwindow=mywindow.psr

beasgui=addmenu=parent=3584<tab>caption=myServiceCall<tab>command=openwindow=myservicecallfunction.psr

beasgui=switchmenu=4369=TRUE=TRUE=beasgui=message=this function is disable

end

 

Alternatively you can create global functions:

 

global function menu6403

messagebox=Key F3 pressed!

// value        

// -1 = ignore SBO- and BEAS-Functions

//  1 = ignore Beas-function, call SBO-function

//  0 = go on

setvar=value=-1

end

 

 

 

Open SBO-Form

to open a sbo-Form, you have to ways:

menu=[menuid]=activate

or

object=ue_openwindow=[table]=[parameter]

More info see openwindow (sbo)

 

Details from commands

addmenu

adds a menu

Example:

beasgui=addmenu=help=About BEAS…=bmp\zahnrad.bmp=1=1=beasgui=info

// in Administration:

beasgui=addmenu=3328=My BEAS==1=1=beasgui=info

 

parent_id=x

Parent Entry-Id

File, Edit, View, Data, Goto, Modules, Tools, Window, Help
or SBO-Id, e. g. 3328 for administration-menu

menu_id=x

Current Entry-Id (Standard = automatic)

caption=x

Description

bitmap=x

bitmap

type=x

separatur, popup or string (Standard = String)

submenu

create as submenu (same as type=popup)

line

create as line (same as type=separator)



 

Example

 

// Main Menu

beasgui=addmenu=parent_id=3328<tab>menu_id=mybeas<tab>&

       caption=my beas entry<tab>menu

// Sub Menu

beasgui=addmenu=parent=mybeas<tab>menu_id=mybeas2<tab>caption=my own itemlist&

        <tab>command=tools=isql=select itemcode,itemname from oitm

 

old Version

beasgui=addmenu=<SBOMenu>=<caption>=<bitmap>=<submenu>=<step>=<command>

 

deleteallmenus

deletes all menus from SBO which were added by BEASGUI

beasgui=deleteallmenus

disablemenus

disables the specified menu

beasgui=disablemenu=<menuid>

Example:

beasgui= disablemenu =4369

enablemenu

enables the specified menu

beasgui=enablemenu=<menuid>

Example: beasgui=enablemenu=4369

getmenu

gets the menu-id from a menu

 

beasgui=getmenu=<parentmenu>=<menucaption>

The result is written to wert1.

Alternatively:

<beasgui:getmenu=<parentmenu>=<menucaption>>

This term is substituted directly with the corresponding value, e. g. setvar=menuid=<beasgui:getmenu=master data=article-list> returns in menuid the ID of the menu master data > article-list.

ATTENTION: You can only get IDs which were set by BEASGUI previously.

Example:

beasgui=getmenu=help=About BEAS…

removemenu=<wert1>

or

beasgui=removemenu=<beasgui:getmenu=help=About BEAS…>

 

removemenu

removes a Menüpunkt, so you can reuse the UniqueID.

beasgui=removemenu=<menuid>

Example:

beasgui=removemenu=<beasgui:getmenu=help=Test>

removeallmenus

removes all menus from SBO which were added by BEASGUI previously

beasgui=removeallmenus

switchmenu

changes the functionality of a SBO-menu. E. g. you can overwrite or extend the menu "production order" with the BEAS form.

beasgui=switchmenu=<menuuid>=<disabled>=<return>=<function>

Example:

beasgui=switchmenu=4369=TRUE=TRUE=beasgui=message=My Test

disable        overwrite SAP-functionality true=ja

return                overwrite BEAS-functionality true=ja

 

More commands

beasgui=menu=<menuid>=type ... returns the type of the menuitem (1...mt_string; 2...mt_popup; 3...mt_seperator)

beasgui=menu=<menuid>=checked ... returns 1 if the menu is checked, else 0

beasgui=menu=<menuid>=checked=1/0 ... sets the menu to 1…checked; 0...not checked

beasgui=menu=<menuid>=enabled ... returns 1 if the menu is enabled, else 0 (that may change the corresponding property but there seems to be no consequence. The menu stays still active and can be executed with a mouse-click)

beasgui=menu=<menuid>=enabled=1/0 ... sets the menu to 1…enabled; 0...disabled

beasgui=menu=<menuid>=image ... returns the path of the image

beasgui=menu=<menuid>=image=<imagepath> ... sets the image

beasgui=menu=<menuid>=string ... returns the text of the menu

beasgui=menu=<menuid>=string=<Text> ... sets the text of the menu

beasgui=menu=<menuid>=activate ... simulates a click on the menu