Beas common reference

Administration > Utility programs > beas Server management > beas common service > beas common interface > beas common reference

Top  Previous  Next
Expand/Collapse Toggles

List of available commands (commontyp)

 

Depending on the commontyp other parameters must be set.

For example: in commontyp "script" the executed script is deposited in the parameter textparameter. Other fields are not required.

 

commontyp

Description

script

Any script is executable with this command.

 

Example MSSQL:

insert into BEAS_COMMON_INPUT (commontyp,textparameter) values ('script','script line 1'+CHAR(13)+CHAR(10)+'script line 2')

 

Example HANA:

select coalesce(max("COUNTID"),0) +1 into :ll_countid from "BEAS_COMMON_INPUT"

insert into "BEAS_COMMON_INPUT" ("COUNTID","COMMONTYP","TEXTPARAMETER") values (<ll_countid>,'script','script line 1'||CHAR(13)||CHAR(10)||'script line 2')

 

The following values must be added in beas_common_input:

Field

Description

commontyp

"script"

textparameter

Executed script

Note: commands messagebox and question are not executed in server mode!

 

The following variables can be added:

Variable

Description

is_requestid

Note: Only readable variable

You set this with the insert command

 

insert into "BEAS_COMMON_INPUT" ("COUNTID","REQUESTID","COMMONTYP","TEXTPARAMETER") values (<nextNumber>,<requestId>,'script','script line 1'||CHAR(13)||CHAR(10)||'script line 2')

 

In this way you become an answer in BEAS_COMMON_OUTPIT with the requestid defined in <requestId> and variable is_requestid is defined with this value

is_stationid

Reply to this station-ID, which is defined in BEAS_COMMON_INPUT.StationId

is_answerid

Answer ID (only numbers)

If empty, no answer to beas_common_output

is_answertext

Answer text will only be added if is_answerid was set

is_commontyp

The commontyp to be added to the beas_common_output

is_parameter1

The parameter1 to be added to the beas_common_output

 

Example:

insert into BEAS_COMMON_INPUT (COMMONTYP,REQUESTID,TEXTPARAMETER) values ('script',1234,

 

-- Clear errortext variable

'setglobal=errortext='+char(13)+char(10)+

 

-- Execute custom script

'protocol=error<tab>area=BCI<tab>info=<today,yyyymmdd>_<now,hhmmss>'+char(13)+char(10)+

 

-- Define default values for answerid and answertext

'setvar=is_answerid=0'+char(13)+char(10)+

'setvar=is_answertext=Script successfully executed '+char(13)+char(10)+

 

-- Write errormessage to field answertext in case of error

'if <global:errortext> <>  then'+char(13)+char(10)+

' setvar=is_answerid=1'+char(13)+char(10)+

' setvar=is_answertext=<global:errortext>'+char(13)+char(10)+

'end if

post

Current possible:

 

See youtube beas service layer with beas common service

 

Example

Type: Receipt

 

{
"DocumentLines": [
  {"ItemCode": "RM_B",
   "WhsCode":"01",
   "BatchNumbers":[
       {"DistNumber":"BT-014","Quantity":2 },
       {"DistNumber":"BT-015","Quantity":5} 
           ]
   }
   ]
}


Help URL: https://help.beascloud.com/beas202102/index.html?common_reference.htm