Triggers at Fields
By calling userexits at field triggers you control the behavior at entering or leaving the field in mask-edit state or the functionality after a mouse click on fields in NoSelect, Select, or Widget mode. It is important to note the limitation that field triggers will only trigger in insert- and updates-mode, but not in query mode of mask edit state (search line active). Field triggers are defined at the mask-field relation. If you display a field in several masks, you can install different userexits at the field triggers in each mask.
Any required application parameter is can be added to the userexit entry separated by spaces. There is no separate parameter field. The total entry (userexit and parameter string) may not be longer than 255 characters.
- Pre_Field Trigger:
- You invoke a field userexit at the pre_field-trigger, if you want to initiate program functions on entering the field. For instance you could enter default values into fields, which only result from other field contents at run-time or you could use cch_skp_fld to automatically skip a field.
- Post_Field Trigger
- You invoke a field userexit at the post_field-trigger, if you want to initiate program functions on leaving the field. For instance you could use cch_chk_rng to check field contents, whether they are within a certain range of values, or to trigger actions depending on certain entries.
- Hyper_Field Trigger
- You invoke the userexit at the Hyper_Field trigger if you want to trigger program functions after a single mouseclick on a field. If a Hyper_Field userexit is installed and the field is not empty, the field content is automatically displayed as underlined when the mouse pojnter passes it in NoSelect- and Select state of a list or in Widget state of a form. The mouse cursor will change. A mouse click will then trigger the function.
- Especially the standard menu userexits (not offered in the selection menu) are suitable to be used as Hyper_Field userexits. Mostly you will open masks to display depending data. Thus, you can lighten context menus or context button areas and keep the number of items or buttons at or in masks manageable.
- In order to identify hyperlink fields for the user, you can specify colors for the field contents and the field background with the help of the default variable VIDEOHYPERLINK.
- You cannot execute a mouse double-click on hyperlink fields. As the mouse double-click is a frequently used means for editing something quickly (cch_sel_dtv at the Select_Action trigger), you should not use the hyperlink functionality at fields which have to be edited frequently. In such a case you should prefer to offer the functions in the context menu or in the context button area.