system

System objects

beas 9.2 PL: 06

 

 

hmtoggle_plus1Windows, Forms

 

Property / Function

Read

Write

Description

system.windows.name

x

 

Return all names of active windows as dropdown value field

system.windows.id

x

 

Return all current internal id's with name as dropdown value field

system.window.x.....

x

 

 

system.window.current.x // return x position from current window

system.window.parent.x // return x position from parent window

system.window.artikel_browse.x // return x position from first instance of the window with same name

system.window.editing.x // return x position of this window

<system.window.editing.dw_1.item.itemcode.value> // return the value of this item

system.zoom

 

x

 

set the zoom-factor for all windows (not for current open windows)

 

beas works with the zoom-factor from sap-setup

you can manipulate this zoom-setting with this command.

 

tools=zoom=<factor>

 

example

 

system=zoom=120

 

beas works with the zoom-factor from sap-setup

you can manipulate this zoom-setting with this command.

 

if you set the zoom-factor only for current window:

window.zoom=<factor>

 

only for a datawindow

dw_1.modify=datawindow.zoom=<factor>

 

get current zoom:

message=<window.zoom>

system.design

x

 

current design gapp.is_design

signature, brightmorning, goldenthread, fiori

you can set this with

app.skinstyle=style

system.buttonstyle

x

 

1 = SAP Design

can have compatibility problems, if you created script with

windowevent click b1

Change this to 0, if you can't change the customized script

 

0 = old style

Action buttons not always on left side

Search button visible in some windows

system.designedit

 

x

 

system=designedit=[propertie]=[value]

 

set Design-Properties, example:

system=designedit=line_with=1

(not for current opened windows)

 

line_width=x

width-propertie of underline from textfield to column

line_shortcorrection=x

set correction-propertie

line_ycorrection=x

set y-correction-propertie

rectangle_width

width-propertie rectancle from column

font_height=x (fontsize=x)

set the font-height for text-fields

column_height=x

set the column-font-height

column_edit_height=x

set the editable column-font-height

tabsheet_zoom_percent=x%

set the %-factor for width of tabsheets

zoom=x

set the zoom-factor for all datawindows

 


hmtoggle_plus1User, Access and Language

 

Property / Function

Read

Write

Description

system.user

x

 

Current User Id (OUSR.U_NAME) gapp.is_sachb_id

system.pers_id

x

 

Current Personal Id (BEAS_PERS.PERS_ID) gapp.is_pers_id

system.usersign

x

 

Current internal User Id (OUSR.Internal_K) gapp.il_usersign

system.superuser

x

 

Return true, if use have admin rights gapp.ib_supervisor

system.portaluser

x

 

current beas Service Portal User gapp.is_portaluser

system.windowsuser

x

 

Current user which connected to windows gapp.is_windowuser

system.windows_language

x

 

return the current language from windows regional settings gapp.is_windows_language

system.authorization.load

 

x

 

After changing the authorization, you can reload the data in the internal authorization cache

 

system.authorization.load

 

see placeholder

<system.authorization.check=id>

 

alternative name

system.recht.load, system.access.load, system.zugriff.load

 

Compatibility mode: Follow commands working too

zugriff=load

 

gapp.ids_access

use object gapp.of_recht

system.authorization.check=id

x

 

 

check, if the user have authorization to this function

 

if <system.authorization.check=ART_EDIT> = 1 then

 messagebox=User have full access

end if

 

return values

1 = full access
2 = read access
-1 = no access

 

You can check all beas and sap authorization settings

if this a sap authorization, you must set the prefix "SAP:"

 

Example

if <system.authorization.check=SAP:Boy-Validation> = 1 then

 messagebox=User have full access to Boy-Validaton system

end if

 

alternative name

<system.recht.check=id>, <system.access.check=id>,
<system.zugriff.check=id>

 

Compatibility mode: Follow commands working too

<zugriff=id>

 

 

Open a form without permission - OVERWRITE window authorization:

 

If the user should access a form without permission you can deactivate the permission-management when opening the form:

openwindow=<windowname>=<parameter>=masterbef=zugriff=voll

 

 

system.license.[property]

x

 

 

<system.license.[property]>

 

Property

Function

basiccount

Count of basic licenses

terminalmode

1 = run in terminal mode license

demmomode

1 = demo is active

installationnumber

return the installation number

systemnumber

return the system number

database

return the licensed database name

licenseerror

return the last license error message

[license id]

Return 1, if user have the access to this license id,

Return -1, if user don't have access to this license id

 

Example:

BEAS_APS

BEAS_BASIC

BEAS_MTC

BEAS_PROJECT

BEAS_PCONFIG

BEAS_PCONFIGSALES

 

and so on

system.translation

 

x

 

system.translation=:init

loads the language-table (current language)

system.translation=:init=<sprache>

loads the specified language

system.translation=:$<phrase>

translates the specified phrase word by word

system.translation=<  >%%<substitute>

translates the substitute text. If there is no translation then uses the original text

system.translation=:check=<language>

checks if language is current. If not language gets current

system.translation=:on / :off

adjusts the options:

Debug=D=learning mode

Off=no initialisation

On=default

system.translation=:getsystem

gets the the current language of Windows and sets it as current BEAS-language. No activation

system.translation=:debug

activates the learning mode. All strange words get logged.

(compatiblity)



 

help-hinweis special behaviour

if a word starts with "<" then there is no translation (reserved as placeholder commmand)

 

 

help-beispiel Example

 

Individual words can be translated as follows: (POWERSCRIPT)

 

MyText = gapp.of_sprache("MyText")

 

or with BEASSCRIPT

 

<spr:MyText>

 

Example for translating a table (BEASSCRIPT)

 

..after retrieve

for=loop=1=<rowcount>

 setrow=<loop>

 sprache=<bez>

 setitem=bez=<sprache>

next

 

You can get the current language with <currentspr_id> (BEASSCRIPT):

 

meldung=Current language: <currentspr_id>

 

Change to an other language (BEASSCRIPT):

 

sprache:init E

 


hmtoggle_plus1System Functions and Variables

 

Property / Function

Read

Write

Description

system.betamodus

x

 

return true, if beta mode is active

gapp.of_mget("betamodus","N") J/N

system.common

x

 

return true, if common service is active

if gapp.of_common()=1=active / 0=not active

system.helponline

 

x

Open online help system

You can define the link

system.helponline=mychapter#myanker

system.databasetype

x

 

Return MSSQL or HANA - defined fix in the program self gapp.is_databasetype

system.debug

x

x

Return current Debug Level : messagebox=<system.debug> gapp.is_debug

As function follow functionality is available

Function

Description

on

activate the debug

system.debug=on

off

disable debug, but don't close it

close

close debug window

level=[0...2]

define debug level

In this way you can change the level inside your script

system.debug=level=2

.... my script

system.debug=level=1

html

return debug log as html in variable "<value>"

system.debug=html

messagebox=<value>

html=<variablename>

return debug log as html in variable "<variablename>"

system.debug=html=debughtml

messagebox=<debughtml>

htmlfile=<filename>

Create a debugfile in html format in the specified file

system.debug=htmlfile=c:\debug\debug.html

mirror

Create a mirror from main information of current window

in this way you can see "inside" of the function in this moment

system.debug=mirror

system.desingfolder

x

 

Folder from icons for current design gapp.is_pf_design

system.devmode

x

 

return true, if development mode is active gapp.ib_entwicklung

system.enablemenuitem.XXX

x

 

Enable a menuUID, this function works in both environment (beas standalone and beas into SAP)

system.eventname.x

x

 

 

<system.eventname.1> = Doubleclick

<system.eventname.2> = Form load and so on

system.exit[=true/false]

system.kill[=true/false]

 

x

system.exit --> try to close all windows and close application

system.exit=true --> asks if application should be closed

system.kill --> close application immediately  without closing the open windows

system.kill=true --> asks if application should be closed

system.form

system.window

x

x

 

system.windows.count -> return count of active windows

system.windows.id -> return dropdown value (name=id) from all current active windows

system.windows.dwname -> return dropdown value (name=name) from all current active windows

 

 

system.form.[name].setfocus

Window becomes the focus

Example

system.form.artikel_browse.setfocus



system.insidesap

x

 

Started inside SAP true / false gapp.is_beasgui true/false

system.project

x

 

Return current Project Name (for customizing) gapp.is_mandant

system.qualtitycontrol

x

 

truern true, if quality mode is active. You can set this in gapp.ib_qualitycontrol

beas.ini - CONNECT - qualitycontrol=y

system.servermodus

x

 

return true, if servermodus is activated. In this mode beas don't display any messages and don't open question or other modal forms.

 

you can set this with

app=servermodus=true/false gapp.il_servermode 0/1

system.location

x

x

current location (web app - print solution) gapp.is_location beas 9.3 PL 2

system.app_id

x

x

current running app id (web app - print solution) gapp.is_app_id beas 9.3 PL 2

system.session_id

x

x

web app session id gapp.is_session_id beas 9.3 PL 2

system.sessionname

x

x

Current Windows Session Name gapp.is_sessionname
return the station name, which beas is using for current session gapp.is_stationname

system.stationnameinfo

x

 

describe, in which way beas defined the stationname

system.systemtest

x

 

Startparameter requiret a systemtest gapp.is_systemtest "true"/"false"

system.store

x

x

 

beas can work with "public variables".

This are visible in every area, every window, in the complete task. If you close the beas application,  you lose all public variables.

They are only visible between definition and running time.

 

write a global variable (store in the system)

system.store.myvariable=<value>

 

read a setup variable

<system.store.myvariable>

 

you can work with variables on variable name to

setvar=test=myglobalvariable

system.store.<test>=<value>

 

this write your value in the global variable setting "myglobalvariable"

system.setup

x

x

 

beas have a setup table, in which all database related  settings saved. With this methode you can write and read every variable

 

write a setup variable

system.setup.myvariable=<value>

 

read a setup variable

<system.setup.myvariable>

 

you can work with variables on variable name to

setvar=mysetup=mysetting

system.setup.<mysetup>=<value>

 

this write your value in the database setting "mysetting"

 

Use internal cache system

if the variable is not a counter or setting, which you don't change every hour, then use the variable "<system.msetup>". This use the internal cache and it's really faster.

system.msetup

x

 

 

beas have a setup table, in which all database related  settings saved. With this methode you can write and read every variable

 

read a setup variable from internal cache

<system.msetup.myvariable>

 

you can write a setup variable with

system.setup.myvariable=<value>

 

if the variable not inside the cache, beas load it from the database

if you change a variable, the cache in current task is updated too, but not on other stations or other tasks.

 

beas make a refresh every hour.

 

use this only if the variable is not a counter or setting, which you don't change every hour.

system.counter=value

x

 

 

<system.counter=[value]>

 

create and read a counter for the defined value

 

example:

 

messagebox=<system.counter=mycounter1>

 

First execute: 1

Second execute: 2

Third execute: 3

 

return -1 in error case, example database error

 

Powerbuilder: ll_counter=gapp.of_counter(var)

beas 9.3 PL 2

system.terminalmodus

x

 

Return true if beas running as terminal gapp.is_terminalmodus "true"/"false"

system.window.[name]...

x

 

 

Return ItemCode from current active item master data window

if not active, system return nothing

<system.window.artikel_edit.dw_1.item.itemcode.value>

system.windowsuser

x

 

Current Name of Windows User gapp.is_widnowuser

system.hostname

x

 

Return the current host name beas 9.3 PL 3

system.ipaddress

x

 

Return own ip address beas 9.3 PL 3

hmtoggle_plus1Version Information

 

Property / Function

Read

Write

Description


 

 


system.versionnumber

x

 

Return Version as Number

Example: 92006000000 gl_version

system.versionview

x

 

Complete visible Version number with Demo/Beta/Hana  Information

Example:

9.2 (6.0) PL: 06 HF: 01 gapp.is_versionview

system.shortversion

x

 

Short Version text, gapp.is_shortversion

beas 9.2 PL 06 Build 0 = 92006000

system.version

x

 

return the Version gapp.is_version

system.wms_installed

x

 

The first time you read this variable (or is called internally by beas) we check if WMS is installed

 

Values:

WMS Installed: it contains 'Y'

WMS not installed: it contains 'N'

 

Example:

message=WMS Version: <system.wms_installed>

beas 9.3 PL 3

system.wms_version

x

 

The first time you read this variable (or is called internally by beas) we check if WMS is installed

 

Values:

WMS Installed: it contain the WMS version

WMS not installed: it contain 'n/a'

 

Example:

message=WMS Version: <system.wms_version>

beas 9.3 PL 3

hmtoggle_plus1Path

 

Property / Function

Read

Write

Description

system.homefolder

x

 

return the program home folder

normal: c\program file(x86)\beas software\beas\

system.defaultfolder

x

 

return the path of psr standard files gapp.is_pf_std

(normal program\)

if you need complete folder from psr file

<system.homefolder><system.defaultfolder>

gapp.os_pf_home

system.addonfolder

x

 

return the path for beas addons gapp.is_pf_addon

system.tempfolder

x

 

return the temp folder for beas gapp.is_pf_tmp2

system.logfolder

x

 

return path for debug logs and other logs gapp.is_pf_logpath

system.bitmapfolder

x

 

return the bitmap folder from beas for beas icons gapp.is_pf_bmp

system.programdatafolder

x

 

return the program data folder (%programdata%) gapp.is_pf_appdata

system.serverfolder

x

 

return the program server folder (b1_shr folder) gapp.is_serverfolder

system.sharedfolder

x

 

return B1_SHR or B1_SHF - related to database system gapp.is_sharedfolder

system.picturefolder

x

 

return SAP B1 picture folders

gapp.of_function(checkbitmappath") // set instance and checn, if valid

gapp.is_pf_picturefolder

system.sapfolder

x

 

return folder from SAP B1 Program folder

gapp.is_pf_sapfolder

system.programfilesfolder

x

 

return program files folder (c:\program files(x86)) gapp.is_pf_programfiles

system.excelpath

x

 

return excel path gapp.is_systemtree_excelpath

system.attachpath

x

 

return attachment path gapp.is_systemtree_attach

system.wordpath

x

 

return word path gapp.is_systemtree_word

system.projectfolder

x

 

return the current project folder gapp.is_pf_md

hmtoggle_plus1SQL Server

 

Property / Function

Read

Write

Description

system.sqlversion

x

 

return sql server version, example: 11 or 12 sqlca.ii_version

system.sqlversion_long

x

 

return the long version name sqlca.is_sqlversion

system.databasetype

x

 

return the database type MS-SQL or HANA sqlca.sqlserver

hmtoggle_plus1Global Program settings

 

Property / Function

Read

Write

Description

system.reservationsystem

x


return true, if reservation system is active

if gapp.of_mget("reservation_disable","N") <> "J" then return "N"

return "J"

system.itemspecweight

x


return true, if you can define the weight per item

Otherwise the weight is per material art (setting artikel_speggew)

if gapp.of_mget("artikel_spezgew","N")="J" then

 ls_wert="true"

else

 ls_wert="false"

end if

system.maincurrency

x


return the main currency value gapp.is_maincurrncy

system.companyname

x


return the name of current company gapp.is_system_cmpnyname

system.continvnt

x


Cont. Inventory System active? Y/N gapp.is_continvnt

hmtoggle_plus1Development System

 

 

system.source: administrate development help system

This object return information for all events and properties. Powerbuilder: It's in datastore gapp.ids_source

beas save all information in file sys_event_definitions.psr

 

Follow columns available

Column

Description

eventarea

 

Follow Areas available

Area

Description

event

Default events

beasmenu,workordermanagement, stockmanagement,qcmanagement, sales

Properties for logic Events

item

Properteies for item event

filter: Available for follow object types

Script: define value for this property

for writable properties

dd: = every input

dd:bmp = bitmap

dd:color = color

dd:display=value,display=value = choose list

dd:dir = file choose

 
Readable properties
return:value1,value2... List off values
da:value List of chooseable sub properties

form

Properties for window

window

Available windows for openwindow

in source you can define additional information

f: the file name of window

p:[name]=[Description]=[variable name] define arguments

Example:

f:fert_ftpos_browse.psr

p:DocEntry=Work order document Number BELNR_ID=str_parm.belnr_id

format

avialable column formats

system

Object "system"

dwx

Object dw_1...dw_7,dw_edit




eventid

the Event/Property from this area

eventname

Long description

description

Detail in HTML Format

Script

Additional information, see Area

Read

Only for Read commands

Write

Only for Write commands

Filter

Additional filter function

 

Property / Function

Read

Write

Description

reload

 

x

reload the help system: system.source.reload

filter

 

x

 

system.source.filter=myfilter

 

define, which entry you need from help system for next functions, example for function setvalues

setvalues

 

x

 

system.source.setvalues=<target-dw>=<taget-column>=eventid,eventname

 

Example

With this you see all datawindow property in field "object2" as dropdown

system.source.filter=eventarea="dwx" and write=1

system.source.setvalues=dw_1.object2,eventid,eventid

 

 

setdescription

 

x

 

system.source.setdescription=areaid=eventid=<newdescription>

 

use this only for internal development

internal object: ue_system_column

 

sys_column=edit

 

system=sys_column=edit=<dw_x>=name

 

edit

the command

dw_x

empty=dw_1, otherwise the datawindow dw_2,..dw_6

name

the name of the window

if empty, beas use the value from <sys_dynamicbrowsename>

if empty, beas use the datawindowname from datawindow or current template

 

you can set follow variables

sys_dwname

the datawindow name (if other as current dw name)

sys_template

the current template name. if you set this beas load the information from current tempalte

sys_columneditlocked

if true, then all fields only for view, but not for edit

beas delete the the variable after calling

sys_columnblocked

you can define the fields, which the use can't choose: *fieldname*;*fieldname*;...

beas delete the the variable after calling



design-reload

reload the design : system=design-reload

sys_usersetup

simple setup window

hmtoggle_plus1SAP Business One System Variablen

 

Direct access to all main SAP Business System Variablen (table OADM)

Use prefix "system.sap" - only Read

Example: <system.sap.direcrate>

 

compatibility: in older beas version you can use <sbodiapi.property>

 

directrate

 

userprodwip


useprodpl


continvnt

 

return, if continue stock system is active or not

if <system.sap.continvnt> = y then

 messagebox=active

end if

pricessys


negamount


levelwarn


warnbywhs


syscurrncy


maincurncy


adrsfromwh, adrfromwh


multibranch, branch


format,formate

reload sap formats  for numbers, price and so on (no result)