With the Beas common interface every third application with every language can connect to Beas.
The interface itself is the current database and 2 tables.
Window syste_common_dashboard.psr
Table BEAS_COMMON_INPUT
In this table you can write your command to execute
If you define a request id, beas will write an answer in BEAS_COMMON_OUTPUT
Priority: Time critical functions may be granted higher priority. The beas common service always executes stack records with high priority first.
Structure of the table
|
|
COUNTID
|
Serial number – automatically generated (Type int identity) and it is not to be added
*In HANA version this field is NOT identity and therefore this field has to be filled, as well.
This query can be executed to return next CountID value:
select coalesce(max("COUNTID"),0) + 1 from "BEAS_COMMON_INPUT"
|
COMMONTYP
|
Define command for
|
PARAMETER1
|
post command, if COMMONTYP = json
example Issue, Receipt, Transfer ...
|
LOCALCOMMAND
|
0 = command to Server, 1 = command to the client "stationid". This parameter is optional. Normally it is not necessary
|
PARAMETER2...9
|
related to commontyp
|
TEXTPARAMETER
|
beas script or json string
if you work with json, insert only the json string, example
{
"DocumentLines": [
{"ItemCode": "po_baetman",
"WhsCode":"01",
"BatchNumbers":[
{"DistNumber":"BT-014","Quantity":2 },
{"DistNumber":"BT-015","Quantity":5}
]
}
]
}
More see beas service layer documentation
|
DATEPARM1..2, DECIMALPARM1..2
DocNum, LINENUMBER, LINENUMBER2
|
Not supported
|
STATIONID
|
Station ID on which the script must be executed.
|
REQUESTID
|
A unique request ID. If available, Beas creates an answer in BEAS_COMMON_OUTPUT with the same requestid
|
CLOSED
|
Status of this record
0 = new command, 1 = the command was executed
Attention
After some minutes beas will delete the line, if this is a closed line
|
UDF1...UDF4
|
Not supported in the future.
|
PERS_ID
|
Executed by Personnel Entry ...
|
PRIOR
|
Priority 0=normal, 2=high
|
PROGRAM_ID
|
WEB APP Program Id
|
WINDOWNAME
|
WEB APP App Id
|
SESSION_ID
|
WEB APP Session
|
LOCATION_ID
|
WEB APP Location Id
|
TimeLife
|
Time Life of this record.
|
STATIONNAME
|
Name of station, which sent this command.
|
|
Bidirectional working: Table BEAS_COMMON_OUTPUT
In this table you can read the answer from beas common service
If you defined a request id, you can read the answer which is marked with same Request id
Strucuture of the table BEAS_COMMON_OUTPUT
|
|
COUNTID
|
Serial number – automatically generated (Type int identity) and it is not to be added
*In HANA version this field is NOT identity and therefore this field has to be filled, as well.
This query can be executed to return next CountID value:
select coalesce(max("COUNDID"),0) + 1 from "BEAS_COMMON_INPUT"
|
COMMONTYP
|
Command type – depending on the executed command
|
ANSWERTYP (int)
|
Answer as number
|
ANSWERTEXT
|
Answer as text
|
PARAMETER1
|
Additional Return Value, for example docentry number
|
STATIONID
|
Response comes from Station "XY"
|
REQUERSTID
|
If the REQUESTID defined in BEAS_COMMON_INPUT
the system generate an entry after executing in BEAS_COMMON_OUTPUT with same REQEUSTID
Use this for bidirectional communication
In BeasScript you can read the RequestId in field is_requestid
|
CLOSED
|
0 = unreaded, 1 = answered
Attention: If the application reads the answer it must set the flag to 1 or must delete the entry
|
|
It is possible to execute every Beas script. Functions not possible are
"open window"
"questions"
"messageboxes"
and any other functions related to user interface as it is a service
Only the following line can be inserted in the program:
insert into BEAS_COMMON_INPUT (commontyp,textparameter) values ('script','[[the beas script]]')
To receive an answer, the answers must be defined in the script. See Beas common reference – Script
The field BEAS_COMMON_INPUT.REQUESTID must also be filled with an unique value (for example time stamp with milliseconds)
For testing and creating C# Core it is possible to use the Beas common service test window.
You can test this function with the Beas common test window.
you can open this in Beas manage server – click on marked icon or
Beas common dashboard – marked icon
This icon opens the Beas common service test.
With the script assistant it is possible to create lot of different scripts, e.g. create work order, create time receipt.
With "Convert script in C#" it is possible to create the SQL Statement for a C# application or other.
Insert this script in the application and replace the place holder:
|
Special web app use the common service for printing documents.
|
|
|
COUNTID
|
PrintRequest
|
Serial number – automatically generated (Type int identity) and it is not to be added
*In HANA version this field is NOT identity and therefore this field has to be filled, as well.
This query can be executed to return next CountID value:
select coalesce(max("COUNTID"),0) + 1 from "BEAS_COMMON_INPUT"
|
COMMONTYP
|
|
Print
|
PARAMETER1
|
ReportName
|
Crystal: Report Name
|
PARAMETER2
|
Title
|
Title of this Job
|
PARAMETER3
|
PrintType
|
Print Type
Crystal,RTF,Script
|
PARAMETER4
|
NumberOfCopies
|
Number of copies as Number. Empty=1. Only Crystal Print
|
PARAMETER8
|
Parameter
|
Print Variables in json format
{"Variable":"value",...}
max. 1024 chars
or Crystal Report Definitions with "crreport=x=y"
or "NumberOfCopies"=x
|
PARAMETER9
|
Text
|
RTF Text
|
TEXTPARAMETER
|
PreScript
|
beas script, which executing before printing starting
|
LOCATION_ID
|
LocationId
|
Define this, if you want to use Driver / Printer from this location
|
PROGRAM_ID
|
ProgramId
|
Define Program_id and windowname, if you want use default settings from this app
|
WINDOWNAME
|
AppId
|
|
|
Help URL: https://help.beascloud.com/beas202109/index.html?beas_common_interface.htm
|