messagebox

Displays a message box or message  in the foot line.

 

messagebox=<typ>$$<text>

 

Error message in Tool bar

BeasScript: messagebox=error$$Hello World

JBScript: messagebox("error","Hello World");

 

message-error

 

Info message in Tool bar

BeasScript: messagebox=info$$Hello World

JBScript: messagebox("info","Hello World");

message-info

Ok message in Tool bar

BeasScript: messagebox=ok$$Hello World

JBScript: messagebox("ok","Hello World");

 

message-ok

OK message

BeasScript: messagebox=ok$ok

JBScript: messagebox("ok","ok","");

 

message-okok

Simple popup message

BeasScript: messagebox=hello world

JBScript: messagebox("hello world");

 

message-simple

Messagebox with Placeholder

Beas Script:

string ls_name

ls_name=James Bond

messagebox=Hello <ls_name> Today is <today,dddd dd mmmm yyyy>, <now,hh:mm am/pm>

 

JBScript

messagebox("","","Hello <ls_name> Today is <today,dddd dd mmmm yyyy>, <now,hh:mm am/pm>",

   {"ls_name"="James Bons"});

 

message-placeholder

Question

Simple Variant: use command question

BeasScript:

question=Is this correct?=yesfunction()=nofunction()

function yesfunction

messagebox=Thank you

end function

function nofunction

messagebox=Sorry. Next time i'll be better

end function

 

JBScript:

 

question-message

 

 

Extended Messagebox

In follow variant you can create a complex messagebox

Beas Script

messagebox=<typ>$popup=true<tab><parameter><tab><parameter><tab> ....

messagebox({"popup"=true,"parameter"="...","parameter"="..."})

 

 

message-extented

You have many properties. Use the Script assistant to generate the source code

message-assistant

 

 

hmtoggle_plus1Properties

 

Follow properties are available

 

Property

Description

type

First Parameter is the type of window

messagebox=<type>$<properties>

 

 

Type

Description

error

Error message in foot-line (popup=false)

or with ERROR Icon (popup=true)

sql

SQL message

(SQL-Code and SQL-Errtext) in foot line

info

Blue message in foot-line (pupup=false)

Or with INFO Icon (popup=true)

ok

ok message in the foot line (popup=false)
or with OK Icon (popup=true)

question

With a Yes / No Question.

Insert automatically Button 1 and Button 2

 

Return value beas Script

if <messagereturnvalue> n= 1 then

 // yes script

end if

if <messagereturnvalue> n= -1 then

 // no script

end if

 

Example

 

messagebox=question$id=**<tab>&

text=Can i help you<tab>&

modal=true<tab>popup<tab>&

title=Question Message

 

if <messagereturnvalue> n= 1 then

 // Script clicking first button

end if

if <messagereturnvalue> n= -1 then

 // Script for second button

end if

 

message-question

 

Return value PowerScript

No  = -1, Yes = 1

questino-no

Like Question but default = No

text

Return the translated Text in variable value

none

Remove existing message into SBO status bar. This type only applies to SBO status bar.

It is mandatory to set a value into test

message=None$XXX

id=xx

Id of Message

Use this, to define unique ID (Better support) and for translation in other language

text

Errortext of Message

 

Line Feed

Normal text: <cr_lf>, html: <br />)

 

if you insert the placeholder <body> then beas will display the text in html-format

if you don't set a <html> beas will insert <html> at begin and end of the string

if you don't set a <style> between <html> and <body> then beas will insert a standard-style

 

Example

message=info$text=<body>hello<linefeed>world</body>

 

popup=true

Use a separat Window for output the Message

Standard: off

if you set the placeholder "<body>" in the text, beas will be set the popup-Value to true

shared

Display Message and continue the program

otherwise the current program is waiting (modal - only for current window)

noalert


title

Title of the popup window

button1 ... button4

Set button 1 (the second button)

with button1command you can set the function to execute

linefeeds=<linefeed>

 

You need command "form.close" to close the message

 

Example

messagebox=info$popup=true<tab>text=Button Click Test<tab>&

button1=Hello world<tab>&

button1command=message=click on hello world<linefeed>form.close

topic

Link to help (topic id)

only beas own documentation. For link to another documentation or internet pages, use button command

setup

link to configuration wizzard

bitmap

Bitmap of the left top side

Error: bmp/gfx/big_cancel

info:   bmp/gfx/big_ok

question: bmp/gfx/big_question

 

Example

messagebox=info$bitmap=bmp\gfx\big_advertising.png<tab>&

popup=true<tab>text=Hello, important message!

 

message-bitmap

yes / no

set value for messagereturnaction

 

Example Beas Script

messagebox=question$popup=true<tab>text=Is this ok<tab>yes=yesanswer<tab>no=nowanswer

messagebox=Answer =  <messagereturnaction> : <messagereturnvalue>

 

Result is

Button Yes: yesanswer :  1
Button No:   noanswer : -1

yestext

notext

you can overwrite the text for button "OK" and  "Cancel"

 

messagebox=question$popup=true<tab>text=Is this ok<tab>yestext=All ok<tab>notext=Not ok

readcheck=id

Use this, if you give the user the possibility to ignore this message in future

The id must be unique and can be same number as id property

 

Beas Script: messagebox=info$popup=true$text=This is my warning message$readcheck=beas0001

JBScript: messagebox("info",{"popup"=true,"text"="This is my warning message","readcheck"="beas0001"});

 

message-readid

 

if the User click on "do not show anymore", then beas don't open the message again

This is user-database related.

 

If you want that the User see all messages again:

- open SAP User - Setup

- choose the User

- right click

- show disabled messages

message-user

 

Info

Don't use beas as prefix. Use own company name as prefix for the id

 

 

 

hmtoggle_plus1Working with HTML Messages

 

if keyword "<html>" or "<body> inside the message text, beas display the text in an internet explorer window

if you don't define <body>, beas use HTML Standard format
if you define only <body>, beas use own CSS Style

 

messagebox=info$popup=true<tab>text=<body>Hello world</body>

 

message-html1

 

You can use every html style and can create html tables

 

// Define First line of HTML ad variable htmltext

// with #define we don't need the & sign for define next row.

// it's simple to define in this way

#define htmltext

<i>Hello</i>, this is a <b>good</b> example<br />

<small>I like this type of messages</small>

<table border=2>

<tr><td>ItemCode</td><td>Description</td></tr>

#end

 

// Create a datastore and read first 10 items

// add this with table attributes to the variable htmltext

declare=d=ue_datastorevalues

d.select top 10 "ItemCode","ItemName" from "OITM" order by "ItemCode"

for ll_loop=1 to <d.rowcount>

 d.setrow=<ll_loop>

 addvar=htmltext=<tr><td><d.itemcode></td><td><d.itemname></td></tr>

next

destroy=d

// add end of table

addvar=htmltext=</table>

// and display this. Use keyword <body>

messagebox=info$popup=true<tab>text=<body><htmltext></body>

 

message-html2

 

Working with pictures

 

In Background we don't have a WEB Server. All is files based

We need always full path form local system or complete network path

 

Attribute to display pictures

<img src="pic_trulli.jpg">

 

setvar=htmltext=&

Example with picture<br/>&

<img src="<system.homefolder>bmp\gfx\big_time.png">

 

messagebox=info$popup=true<tab>text=<body><htmltext></body>

 

message-html3

 

hmtoggle_plus1Translation concept

 

With the message id  you can define every message as unique id

In translation system you can define the translation per language and id

 

Standard messages:

in file [homefolder]\program\language_e.src you can find the complete translation table

in area "M:[id]" you can see the message id's and on right side the Text

 

Example: M:feinb1 = Item <art_id> does not exist!
 
You can use it with

string art_id

art_id=Sofa001

messagebox=info$feinb1$

 

But for better reading of source code

messagebox=info$feinb1$Item <art_id> does not exist

 

Own translation

 

For customizing multilanguage you can define own translation table

AddOn Administration (beas) -> Edit -> Language -> Edit Message -> Define Language, Meessage No and Message text

 

message-translation

 

Now you can use it
As example we use german text and user interface is current english

 

string ls_itemcode

ls_itemcode=Sofa001

messagebox=info$id=beas0001<tab>popup<tab>text=Verwende nicht den Artikel <ls_itemcode>

 

message-translation-example

 

or as simple variant - in bottom line

 

messagebox=info$beas0001$Verwende nicht den Artikel <ls_itemcode>

 

hmtoggle_plus1Message with Protocol

 

with (properties) after message type you can define additional log entries

 

message=error(propertie,propertie2)$messageid$message

 

shortprotocol

beas create a short protocoll in extra / system / protocoll and a short version in help/suport

longprotocol

beas create a short protocoll in extra / system / protocoll and a long version in help/suport

errorprotocol

beas create a protocoll as error-protocoll in help/support / report

 

Example

messagebox=error(shortprotocol)$$This is my next with copy in shortprotocol

 

hmtoggle_plus1Powerbuilder

 

Examples

gapp.of_meldung(„BEASMELDUNG",[messagenumber^Text],[datawindow],[{Placeholder,Value}])

gapp.of_meldung(„BEASMELDUNG",[messagenumber^Text],[{Placeholder=Value}])

 

Place holders shall be transferred as following:

{„Placeholdertext=Value","Placeholdertext=Value"}

e.g.

gapp.of_meldung(„BEASMELDUNG","messagenumber^Works from <fromdate>  to<todate>",{"fromdate="+string(idw.vd[1]),"todate="+string(idw.bd[1])})

 

With  TAB

gapp.of_meldung(„info","popup=true~ttext=hello world")

gapp.of_meldung("info","id=12345"+char(9)+"text=hello world")

gapp.of_meldung("error","id=12345<tab>text=hello world<tab>popup=true")

gapp.of_meldung("info","text=<body>this is my html-text</body>")