Next to standard events you can add own events. Example: change of customer data, project, assembly posting etc. Some basic knowledge of BeasScript is necessary.
How to:
With an event (in Beas script use windowsevent) the event system can be called up.
The event system is called:
tools=createevent=<Ereignisname>=<filter>=<basetyp>=<baseref1>=<baseref2>=<baseref3>
|
|
createevent
|
Function, controlling the event system.
|
Filter
|
Additional filter condition.
|
basetyp
|
Arbitrary delimitation e.g. for I item Item, C for customer. This command makes certain that messages are unique (Option: each message only once).
It may be left empty.
Important: Max. 1 character.
|
baseref1
|
Reference (e.g. customer order, item number, document number etc.)
Type "String", can also save numbers.
|
baseref2
|
Second reference – e.g. work order item number. Only number.
|
baseref3
|
Third reference – e.g. operation. Only number.
|
This event is now available. Under Administration - Events a new activity definition can be created and the event can be entered under "events".
To make it more easy to use, create an XML file in the project directory in which the event is defined.
In this file, the name of the event, the description and template for new creation is saved directly.
Example customer change
1. Call SAP Business One Business partners.
2. Change business partner, open the debug screen, save changes.
Now all events are set and the variables are displayed.
3. Open customized extensions.
4. Enter the following script with the given information.
windowevent update
setvar=e_cardcode=<businesspartnerparams_cardcode>
tools=createevent=cardcodechange==C=<businesspartnerparams_cardcode>
end event
Now an activity definition can be created for the event "cardcodechange"
For further simplification of this event can be made permanently available.
For this, in the project directory a file event.xml is created.
Configuration must be the same as the file in c:\program files\beas software\beas\program\event.xml
Important: in the area of event definition no comment lines or empty row may be added.
Important areas
|
|
info
|
Info on this file
|
events
|
Selection list of available events
Configuration:
Event name=Event ID
Event name may be arbitrarily long
Event ID may only have 20 characters at most. Only this is saved in activity definition
|
<eventkennung>
|
In this area the event itself is defined. Example:
<cardcodechange>....</cardcodechange>
|
Definition of an event
The following settings affect the screen Administration - Events.
|
|
eventinfo
|
Text information on this event.
|
key
|
Additional key for filter (activates the field event key). The name of the filter or field is defined here
<key>Milestone</key>
|
eventkey2 ... eventkey6
|
Enables up to 5 additional entry fields for definitions
<eventkey2>Alarm Days</eventkey2>
|
setupdisplayscript
|
Additional possibility do manipulate the definition window.
Example:
A drop-down list in key field for mile stones
post=item.eventkey.dropdown.select= milestone from beas_milestone order by milestone
To manipulate the list of recipients, a global function ca be defined, which is called when the recipient page is opened.
The following script adds entries to the selection list of recipients
global function user_getuser
dw_1.item.senduser1.dropdown.addvalues=<spr:Projektleiter> 1=-10
dw_1.item.senduser1.dropdown.addvalues=<spr:Projektleiter> 2=-11
global end
Example:
<cardcodechange>
<setupdisplayscript>
messagebox=hello world
</setupdisplayscript>
</cardcodechange>
|
|
info
|
The given text is displayed in each tab, in which scripts can be executed. For example the available variables can be displayed.
<info>e_cardcode = cardcode from changed user</info>
|
new
|
All variables available in this window can be set.
Example 1:
<new><sendas>1</sendas></new>
Set up the message to be created as Beas message
Example 2:
Area for item change
<new>
<eventname>itemchange</eventname>
<key1name>Bearbeiten</key1name>
<key1visible>1</key1visible>
<key1script>openwindow=artikel_edit.psr=s_parm1:<basestring></key1script>
<key1setclose>1</key1setclose>
<key1bitmap>bmp\zoom.bmp</key1bitmap>
<key2name>OK</key2name>
<key2visible>1</key2visible>
<key2setclose>1</key2setclose>
<key2bitmap>bmp\m_ok.bmp</key2bitmap>
<sendas>1</sendas>
<eventbitmap>bmp\clipempt.bmp</eventbitmap>
<subject>item changed: <e_itemcode> from <currentuser></subject>
<longtext>item changed: <e_itemcode> from <currentuser> <today> <now>
itemname: <select itemname from oitm where itemcode=N'{e_itemcode}'>
</longtext>
</new>
|
|
Help URL: https://help.beascloud.com/beas202402/index.html?eigene_ereignisse.htm
|